Good evening, I am working on the wheel menu. However, there is an issue: when the menu opens, I am forced to select a tool. I want it to open and close like a flip flop when I press the tab key, without needing to select a tool. Where am I going wrong?
Hey @raphaenn!
You need some kind of variable, like a bool saying “Menu is Open.”
Then, you’ll make a branch, and if Menu is Open==True:
get that widget and “Remove From Parent” to get rid of it! Then Set Menu is Open==False.
You’ll also need to add
If Menu is Open ==False:
Set Menu is Open ==True and then open wheel menu.
Also, add a Set Menu is Open ==False when a tool is selected and the wheel menu closes.
Really, you’re just asking “When is press this button, is the menu open already? If it is, do this. If it isn’t, do this.”
Somewhat!
When you think about bools, think of it as yes and no.
“IsMenuOpen?” Yes=True, so on True, remove from parent and set “IsMenuOpen?” ==False.
I am assuming you need to set the input mode again, probably to game only.
Look at the code for when you choose a tool. What happens there? That’s what you need to choose.