Iris2.de http://iris2.de/forum/ |
|
Adding ToolTip ? http://iris2.de/forum/viewtopic.php?f=16&t=1384 |
Page 1 of 1 |
Author: | Sehlor [ Mon Apr 27, 2009 9:23 pm ] |
Post subject: | Adding ToolTip ? |
Want To Add a Tooltip When Mouse Over my Gump Widget? How can i do it ? |
Author: | ghoulsblade [ Mon Apr 27, 2009 10:11 pm ] |
Post subject: | |
try this : widget.on_simple_tooltip = function (self) return "bla" end if it doesn't work try this : widget.on_tooltip = function (self) StartUOToolTipAtMouse_Text("bla") end |
Author: | Sehlor [ Mon Apr 27, 2009 10:13 pm ] |
Post subject: | |
will try both thanks |
Author: | Sehlor [ Mon Apr 27, 2009 11:10 pm ] |
Post subject: | |
Tried Code: local priAbilityWidget = dialog:GetCtrlByName("btnPrimaryAbility") priAbilityWidget.tooltip_offx = kUOToolTippOffX -- Both defined at priAbilityWidget.tooltip_offy = kUOToolTippOffY -- obj.container.lua priAbilityWidgetstylesetname = gGuiDefaultStyleSet priAbilityWidget.mobile = body -- for mousepick priAbilityWidget.on_tooltip = function (self) return StartUOToolTipAtMouse_Text("BLAH BLAH \n ") end And Code: local priAbilityWidget = dialog:GetCtrlByName("btnPrimaryAbility")
priAbilityWidget.tooltip_offx = kUOToolTippOffX priAbilityWidget.tooltip_offy = kUOToolTippOffY priAbilityWidget.stylesetname = gGuiDefaultStyleSet priAbilityWidget.on_simple_tooltip = function (priAbilityWidget) local tooltiptext = "BLAH BLAH" return (tooltiptext .. " \n ") or "?" end And Can't Make it Work |
Author: | ghoulsblade [ Tue Apr 28, 2009 11:14 am ] |
Post subject: | |
try widget:SetConsumeChildHit(true) (i'm not sure, but if the button contains an image, that would be a child widget, and so while you hold the mouse over the image, the tooltip of the button itself wouldn't be triggered. this call could solve the problem) if that still doesn't work : add a print("##TOOLTIP METHOD SET") to make sure that the code that sets priAbilityWidget.on_tooltip is actually executed. hold the mouse over the widget you want to have a tooltip and make a screenshot please, there are some debug infos in the bottom line, e.g. the widget type. see lua/widgets/widget.uobutton.lua for implementation details of the button type if that's what you used. |
Author: | Sehlor [ Tue Apr 28, 2009 2:07 pm ] |
Post subject: | |
SetConsumeChildHit(true) That Worked Thanks |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |