Jump to content

ShopEX editing price tooltip


Recommended Posts

Hi all, wish you all a great day. I have installed ShopEX Renewal by Mali and I would like to ask some silly questions. As you can see in the screenshot the item picture is not centered. Why could that be?

Also I would like to edit the tooltip in a way that everything show up in a single line like on Aeldra. How may I do that.

How it is now:

spacer.png

 

How I want it to be:

spacer.png

 

My uitooltip for ShopEX

	if app.ENABLE_RENEWAL_SHOPEX:
		def SetShopItemByShopEx(self, slotIndex, type):
			itemVnum = shop.GetItemID(slotIndex)
			PriceVnum = shop.GetItemPriceVnum(slotIndex)
			if itemVnum == 0 or (PriceVnum == 0 and type == shop.SHOPEX_ITEM):
				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))
			self.AddItemData(itemVnum, metinSlot, attrSlot)
			self.AppendSpace(5)
			if type == shop.SHOPEX_ITEM:
				self.AddSHOPEXItem(PriceVnum, price)
			else:
				self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE  % (localeInfo.NumberToShopEXP(price)), self.GetPriceColor(price))

		def AddSHOPEXItem(self, itemVnum, price):
			self.AppendTextLine(localeInfo.SHOPEX_PRICE)
			item.SelectItem(itemVnum)
			name = "%dx %s" % (price, item.GetItemName())
			self.AutoAppendTextLine(name, self.NORMAL_COLOR)
			itemImage = ui.ImageBox()
			itemImage.SetParent(self)
			itemImage.Show()			
			itemImage.LoadImage(item.GetIconImageFileName())
			itemImage.SetPosition(75, self.toolTipHeight)
			self.toolTipHeight += itemImage.GetHeight() - 10
			self.childrenList.append(itemImage)
			self.ResizeToolTip()

 

Edited by Metin2 Dev
Core X - External 2 Internal
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.