DAS: in die uiaffectshower eintragen im root ordner ( auf die TABS achten beim kopieren )
Code:
# AUTO_POTION
class AutoPotionImage(ui.ExpandedImageBox):
FILE_PATH_HP = "d:/ymir work/ui/pattern/auto_hpgauge/"
FILE_PATH_SP = "d:/ymir work/ui/pattern/auto_spgauge/"
def __init__(self):
ui.ExpandedImageBox.__init__(self)
self.loverName = ""
self.lovePoint = 0
self.potionType = player.AUTO_POTION_TYPE_HP
self.filePath = ""
self.toolTip = uiToolTip.ToolTip(100)
self.toolTip.HideToolTip()
def __del__(self):
ui.ExpandedImageBox.__del__(self)
def SetPotionType(self, type):
self.potionType = type
if player.AUTO_POTION_TYPE_HP == type:
self.filePath = self.FILE_PATH_HP
elif player.AUTO_POTION_TYPE_SP == type:
self.filePath = self.FILE_PATH_SP
def OnUpdateAutoPotionImage(self):
self.__Refresh()
def __Refresh(self):
print "__Refresh"
isActivated, currentAmount, totalAmount, slotIndex = player.GetAutoPotionInfo(self.potionType)
amountPercent = (float(currentAmount) / totalAmount) * 100.0
grade = math.ceil(amountPercent / 20)
if 5.0 > amountPercent:
grade = 0
if 80.0 < amountPercent:
grade = 4
if 90.0 < amountPercent:
grade = 5
fmt = self.filePath + "%.2d.dds"
fileName = fmt % grade
print self.potionType, amountPercent, fileName
try:
self.LoadImage(fileName)
except:
import dbg
dbg.TraceError("AutoPotionImage.__Refresh(potionType=%d) - LoadError %s" % (self.potionType, fileName))
self.SetScale(0.7, 0.7)
self.toolTip.ClearToolTip()
if player.AUTO_POTION_TYPE_HP == type:
self.toolTip.SetTitle(locale.TOOLTIP_AUTO_POTION_HP)
else:
self.toolTip.SetTitle(locale.TOOLTIP_AUTO_POTION_SP)
self.toolTip.AppendTextLine(locale.TOOLTIP_AUTO_POTION_REST % (amountPercent))
self.toolTip.ResizeToolTip()
def OnMouseOverIn(self):
self.toolTip.ShowToolTip()
def OnMouseOverOut(self):
self.toolTip.HideToolTip()
# END_OF_AUTO_POTION
den Anhang " pattern " in
ymir work/ui/pattern
einfügen.. diese liegt im ETC ordner..
und hab die uiaffectshower nochmal als Anhang
mfg hoffe konnte helfen.