How to create an item tooltip
Hi,
I's like to show an item tooltip (when hovering over certain control). It's not the problem to register the required mouse event listener. What I need is a way to display the tooltip itself when the item (e.g. a potion, a weapon, ...) is given/known, e.g. by an item link or whatever. I noticed the "TooltipControl" which seems to be fairly complicated for creating a tooltip from scratch. There must be some higher level function(s) from ZO which manages tooltip creation. Also I do want to look the tooltips not any different, so the best would be to use existing ZO code. But I can't find any code example or other hint. I searched half of the Internet, I promise ;) Cheers, Klaro |
For item info, there's preconstructed ItemTooltip. You can find examples in ZOS UI scripts, if you can get those.
Lua Code:
Also you can check addons like this one to see how you can add simple text lines to the bottom. |
As merlight said, when you want to show tooltip call (arguments in square bracket can be nil):
Code:
InitializeTooltip(tooltipControl, [owner, point, offsetX, offsetY, relativePoint]) Code:
tooltipControl:SetLink(itemLink) Code:
ClearTooltip(tooltipControl) Lua Code:
Similar topic: http://www.esoui.com/forums/showthread.php?t=1647 |
Thanks & works! Didn't realize that "ItemTooltip" is a predefined tooltip control (I started to create & configure my own tooltip control, then I saw ItemToolTip is one of many prefined ones, and now it looks perfect).
Thanks for your help. // Klaro |
All times are GMT -6. The time now is 09:01 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI