def __AppendHairIcon(self, itemVnum):
itemImage = ui.ImageBox()
itemImage.SetParent(self)
itemImage.Show()
if self.__IsOldHair(itemVnum):
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum)+".tga")
elif self.__IsNewHair3(itemVnum):
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
elif self.__IsNewHair(itemVnum): # ?? ?? ??? ????? ????. ??? ???? 1000?? ??? ???.
itemImage.LoadImage("d:/ymir work/item/quest/"+str(itemVnum-1000)+".tga")
elif self.__IsNewHair2(itemVnum):
itemImage.LoadImage("icon/hair/%d.sub" % (itemVnum))
itemImage.SetPosition(itemImage.GetWidth()/2, self.toolTipHeight)
self.toolTipHeight += itemImage.GetHeight()
#self.toolTipWidth += itemImage.GetWidth()/2
self.childrenList.append(itemImage)
self.ResizeToolTip()
## ???? ? Description ? ?? ?? ???? ????
def __AdjustMaxWidth(self, attrSlot, desc):
newToolTipWidth = self.toolTipWidth
newToolTipWidth = max(self.__AdjustAttrMaxWidth(attrSlot), newToolTipWidth)
newToolTipWidth = max(self.__AdjustDescMaxWidth(desc), newToolTipWidth)
if newToolTipWidth > self.toolTipWidth:
self.toolTipWidth = newToolTipWidth
self.ResizeToolTip()