uitooltip
def SetShopItem(self, slotIndex):
itemVnum = shop.GetItemID(slotIndex)
if 0 == itemVnum:
return
price = shop.GetItemPrice(slotIndex)
self.ClearToolTip()
self.isShopItem = TRUE
metinSlot = []
for i in xrange(player.METIN_SOCKET_MAX_NUM):
metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
attrSlot = []
for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
attrSlot.append(shop.GetItemAttribute(slotIndex, i))
if app.ENABLE_CHANGELOOK_SYSTEM:
transmutation = shop.GetItemTransmutation(slotIndex)
if not transmutation:
self.AddItemData(itemVnum, metinSlot, attrSlot)
else:
self.AddItemData(itemVnum, metinSlot, attrSlot, 0, player.INVENTORY, -1, transmutation)
else:
self.AddItemData(itemVnum, metinSlot, attrSlot)
if app.ENABLE_MULTISHOP:
if shop.GetBuyWithItem(slotIndex) != 0:
self.AppendPriceTextLine(shop.GetBuyWithItemCount(slotIndex), shop.GetBuyWithItem(slotIndex))
else:
self.AppendPrice(price)
else:
self.AppendPrice(price)
//cauta
def __DragonSoulInfoString (self, dwVnum):
//adauga sub
if app.ENABLE_MULTISHOP:
def AppendPriceTextLine(self, price, priceVnum):
item.SelectItem(priceVnum)
windowBack = ui.Window()
windowBack.SetParent(self)
textLine = ui.TextLine()
textLine.SetParent(windowBack)
textLine.SetFontName(self.defFontName)
textLine.SetPackedFontColor(self.FONT_COLOR)
textLine.SetText("%sx" % (localeInfo.TOOLTIP_BUYPRICE % int(price)))
textLine.SetOutline()
textLine.SetFeather(False)
textLine.SetPosition(0, 10)
textLine.Show()
itemImage = ui.ImageBox()
itemImage.SetParent(windowBack)
itemImage.LoadImage(item.GetIconImageFileName())
itemImage.SetPosition(textLine.GetTextSize()[0] + 2, 0)
itemImage.Show()
textLineName = ui.TextLine()
textLineName.SetParent(windowBack)
textLineName.SetFontName(self.defFontName)
textLineName.SetPackedFontColor(self.FONT_COLOR)
textLineName.SetText("%s" % item.GetItemName())
textLineName.SetOutline()
textLineName.SetFeather(False)
textLineName.SetPosition(textLine.GetTextSize()[0] + itemImage.GetWidth() + 4, 10)
textLineName.Show()
windowBack.SetPosition(0, self.toolTipHeight)
windowBack.SetSize(textLine.GetTextSize()[0] + itemImage.GetWidth() + textLineName.GetTextSize()[0] + 6, 32)
windowBack.SetWindowHorizontalAlignCenter()
windowBack.Show()
self.toolTipHeight += itemImage.GetHeight()
self.childrenList.append(textLine)
self.childrenList.append(textLineName)
self.childrenList.append(itemImage)
self.childrenList.append(windowBack)
self.ResizeToolTip()