tooltip problem

tooltip problem

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

Post Reply
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

tooltip problem

Post by thedude »

I try to change a tooltip widget (fromLolUI) so the tooltip only shows up when the cursor is over a unit or a buildpic or commands.
I changed/added this lines : 163-167; 236-238. But it still doesn't work. :(
Attachments
tooltip.lua
(6.92 KiB) Downloaded 131 times
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: tooltip problem

Post by Caydr »

I probably know enough to fix this but I don't use lolui... what specifically "doesn't work"?
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: tooltip problem

Post by thedude »

When the cursor is over a unit the tooltip is shown but when the cursor is over a buildpic/commandbutton the tooltip is still hidden.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: tooltip problem

Post by Caydr »

Nevermind then, I have no idea how to fix that. Someone smarter and better-looking will help.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: tooltip problem

Post by Regret »

LolUI doesn't use standard spring tooltip system so for it to show up when you mouse over build icons you have to use the LolUI buildmenu.
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: tooltip problem

Post by thedude »

I use the LolUI buildmenu.
I already tried to make it show up when the build menu is shown and it worked but I wont it to show up when the mouse is over an icon not only when the build/commandmenu is shown.
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: tooltip problem

Post by thedude »

Regret can you please have a look at the file I attached once and tell me what I am doing wrong. Now I'm using the whole LolUI but it still doesn't work.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: tooltip problem

Post by Regret »

thedude wrote:Regret can you please have a look at the file I attached once and tell me what I am doing wrong. Now I'm using the whole LolUI but it still doesn't work.
You didn't set your "a" to true when the tooltip comes from other sources than unit or feature.

Try this
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: tooltip problem

Post by thedude »

Thanks it works!
The problem is the tooltip is also shown when the cursor is over trees for example, is it possible to check if the cursor is over a buildpic (or commandbutton)?
like (sadly doesn't work):

Code: Select all

if ((pointedobject == "buildpic")or(pointedobject == "command") ) then ...
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: tooltip problem

Post by Regret »

thedude wrote:Thanks it works!
The problem is the tooltip is also shown when the cursor is over trees for example, is it possible to check if the cursor is over a buildpic (or commandbutton)?
like (sadly doesn't work):

Code: Select all

if ((pointedobject == "buildpic")or(pointedobject == "command") ) then ...
Delete line 169 in the last tooltip.lua I uploaded in this thread.
thedude
Posts: 66
Joined: 21 Aug 2009, 12:47

Re: tooltip problem

Post by thedude »

It's not the way I wanted to do it but it works, thx. :P
Post Reply

Return to “Lua Scripts”