Torchmodders
Modding => HUD & UI => Topic started by: Wolven on July 24, 2018, 10:02:27 am
-
Hi all.
It's been a while since I was modding, but in the last few days I've started working on a small project. One mod I'm trying to do is to make a simple show/hide toggle for the in-game side tabs.
I can make the tabs show and hide with a standard button, but I can't figure out the logic on how to do it with a toggle button. I guess it's not so hard, but I can't wrap my head around it... I've tried looking at some logic, but the once I've found contains more than what I'm looking to do, so I get confused.
Once I know how to use the toggle button, I need to figure out how to prevent the tabs from showing again after the side panels have been opened. I'm guessing this can be done with the Game State Controller some how.
Any help or pointers to example mods are appreciated.
-
Any help or pointers to example mods are appreciated.
Maybe you can see this Mod: Smart Panel Tabs Toggle (https://steamcommunity.com/sharedfiles/filedetails/?id=902472349)
I'm guessing this can be done with the Game State Controller some how.
If you are looking Mod for Game State Controller, you can see this Mod: Steam Controller Custom UI (https://steamcommunity.com/sharedfiles/filedetails/?id=1444204436)
I hope this can help. :D
-
Thanks for your reply.
I've looked at the Smart Panel Tabs Toggle mod, but that's the one that confuse me. The logic has much more going on than the toggle, so I'm having a hard time understanding what is what.
-
Maybe you can see this Mod:
- Auto Consume (https://steamcommunity.com/sharedfiles/filedetails/?id=883381751&searchtext=Auto+Consume)
- Map keybinds (Toggle & hold) (https://steamcommunity.com/sharedfiles/filedetails/?id=138591494&searchtext=toggle)
- UI Display Toggle (https://steamcommunity.com/sharedfiles/filedetails/?id=239380339&searchtext=toggle)
I don't know if this is simpler than the previous one or not. :)
-
Hi @Wolven ! Firstly, i hope youre using GUTS to work with your UI elements! I personally find it horrific to try and work with UI .LAYOUT files via a text editor.
Next, just to check i'm getting it sraight - you say you can make stuff open and close with "standard buttons" but can't make a "toggle button" work. But isn't "toggle" how the standard buttons are operating (click it once, it opens something. click it again, it closes that something)? So my question is, what is it you want to make into a toggle - some UI element other than the standard buttons, or a keystroke?
-
The best example is "hide menu buttons in combat" mod by zParticle
https://steamcommunity.com/sharedfiles/filedetails/?id=142102840
Then if you want the tabs to be kept hidden even after you exited the game...
What you'll need:
1. Savable STAT (Data Editors/Stats)
2. Logic Group (If there's an existing, no need to add new)
3. Stat Operator x2
4. Stat Evaluator x1
5. Timer x1 (Loops forever)
LOGIC in logic group:
- Insert your button and 2 stat operators
- Set your button to (Stat) operate for active value and inactive value (I use 0 for OFF and 1 for ON)
- Insert your Timer, Stat Evaluator, and the object you want hidden/shown
- Set a timer that (Stat) evaluates your custom stat's value for true or false
- If Stat Evaluator is true/false then hide/show the object.
Note: Make sure that no other LOGIC is trying to hide/show your object
Note2: If you intend to hide/show the whole menu with menu controller, be sure to mind other LOGIC also. Specially during combat and pause menu.
-
Ah. A reply from the UI master. Thank you very much. I'll see if I can get it working with these instructions.
-
@doudley !!! So nice to hear from you :D
Yep getting a reply from doudley is like opening a boss chest ;) !
-
@doudley !!! So nice to hear from you :D
Yep getting a reply from doudley is like opening a boss chest ;) !
:D
Thanks @Phanjam !