Trouble with tooltips

If you have a module that you'd like comments on or would like to know how to create your very own module, post here

Moderator: Moderator

Post Reply
Message
Author
Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Trouble with tooltips

#1 Post by Castler »

I'm trying to add tooltips to my ShowEquipInven.lua (by using an on_select function, similar to ToME's) and am running into problems. If I use the normal game.tooltip, it generally works, but it's shown under the inventory / equipment dialog. If I try making a new tooltip owned by ShowEquipInven, it's shown on top, but it disappears as soon as its shown. What's the proper way to do this? How do I control tooltips' Z order and lifetime?
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

Castler
Thalore
Posts: 153
Joined: Mon Mar 25, 2013 10:09 pm

Re: Trouble with tooltips

#2 Post by Castler »

This ended up being a very simple fix. In Game.lua, move the targetDisplayTooltip call after the engine.GameTurnBased.display call.
Qi Daozei (QDZ) - an Oriental-themed fantasy game for T-Engine. ToME Tips - auto-generated spoilers for ToME.

Post Reply