RichardLichten Posted November 20, 2019 Share Posted November 20, 2019 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 Quote Link to comment Share on other sites More sharing options...
Duion Posted November 20, 2019 Share Posted November 20, 2019 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. Quote Link to comment Share on other sites More sharing options...
RichardLichten Posted November 20, 2019 Author Share Posted November 20, 2019 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 Quote Link to comment Share on other sites More sharing options...
Duion Posted November 20, 2019 Share Posted November 20, 2019 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? Quote Link to comment Share on other sites More sharing options...
RichardLichten Posted November 20, 2019 Author Share Posted November 20, 2019 No, isn´t there a function for accesing the tooltips. There isn´t a separate TooltipGUI :cry: . Quote Link to comment Share on other sites More sharing options...
Duion Posted November 20, 2019 Share Posted November 20, 2019 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. Quote Link to comment Share on other sites More sharing options...
rlranft Posted December 2, 2019 Share Posted December 2, 2019 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.