Switch Tooltips Off/On?

2D version of the Torque engine.

Moderator: marauder2k9

7 posts Page 1 of 1
RichardLichten
Posts: 4
Joined: Mon Jan 28, 2019 8:38 pm
by RichardLichten » Wed Nov 20, 2019 4:56 pm
Hi all,

is there a command to set all tooltips to off?
I included those in the gui files, but they should be switchable.

Kindest, thanks, Chris
Online Duion
Posts: 1407
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Nov 20, 2019 6:10 pm
You can bind a key to toggle the GUI on and off, should be relatively simple, if you want them to stay off, you have to create a button in options menu that sets a pref value to disable it or have the pref value set, if you just press the toggle tooltips on/off button.

Look into the code how it is done for other GUIs that you can toggle.
RichardLichten
Posts: 4
Joined: Mon Jan 28, 2019 8:38 pm
by RichardLichten » Wed Nov 20, 2019 7:58 pm
Thanks!

But what i need is a command/function like toggleTooltip (true) or renderTooltip(true) for all tooltips.

Is there a command/function like this or similar in the torquescript-syntax?

Kindest, Chris
Online Duion
Posts: 1407
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Nov 20, 2019 8:40 pm
There are already complete functions like that in the default template I think, I mostly just copy and paste existing functions and extend them to what I need, it's simpler than reinventing the wheel every time.

Isn't there already a tooltip GUI by default in the full template? I remember seeing it.

A toggle function looks like:

function toggleTooltips()
{
if (TooltipsGUI.isAwake()) {
Canvas.popDialog(TooltipsGUI);
}
else
Canvas.pushDialog(TooltipsGUI);
}

Then you bind a key to do that and done. What else you need?
RichardLichten
Posts: 4
Joined: Mon Jan 28, 2019 8:38 pm
by RichardLichten » Wed Nov 20, 2019 10:13 pm
No, isn´t there a function for accesing the tooltips. There isn´t a separate TooltipGUI :cry: .
Online Duion
Posts: 1407
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Wed Nov 20, 2019 10:17 pm
You mean the popups that appear when you hover over a GUI item? You can set them in the properties what you want them to be or enter nothing.

You have to explain in more detail what you mean, maybe a screenshot of what you mean.
rlranft
Posts: 308
Joined: Thu Feb 05, 2015 3:11 pm
 
by rlranft » Mon Dec 02, 2019 5:45 pm
Theoretically you could set the GuiToolTipProfile.opaque field to false to "turn tool tips off" - it should just make them invisible, they'd still technically be there. I don't recall when the profiles are refreshed exactly so it might not function as expected on a hot-key but it would be okay to use in the preferences file as I'm pretty sure the profile is applied any time a UI element is shown/unhidden.

By default GuiToolTipProfile is defined in \modules\Sandbox\1\gui\guiProfiles.cs.
7 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest