So I have a button, made in the GUI of creator, its a label button, 100% stock, I have one callback on i set in the GUI. This seems to be the best way to make one, I couldn’t find any good examples for TS on how to make one programmatically, and they seem complicated.
Thing is I need to hide and show it. So eventually after much searching, pondering and hunting through docs I found the way to hide/show them is to make a cc.hide/cc.show action and run it as an action on it… ?? really??
All seemed well however, when it is hidden, I still get click/touch events from the button, so I can accidentally click and run the code for the button even though it is hidden.
So how do I make it so I can hide and stop the button from working? It would also be good if I could make the button NOT allow a mouse event to go through to the main canvas/tilemap I have below it. I.e they clicked on the button and not the thing behind the button.
Also what is the best way to position it in Screen space?
My c++ hat says use a layer, but I can’t see how to make one in the creator gui, are they a thing in Creator?