PDA

View Full Version : Buttons on a Panel (show, hide)



berserk3k
07-26-2018, 02:36 PM
I have completely stopped using show/hide for various reasons but the last reason why I'm no longer using it is because there may potentially be a bug with UI.show/hide

I made a Panel with one button for testing in the Global XML (not on an object). Made a simple toggle function (set on the scripting button event down [1]) for that Panel. Pressing the Num1 opens and closes the Panel (Ui.show and UI.hide; I want the animations is my only reason to use these). The button on the Panel just goes to a simple function called printMe() onClick="printMe". The function works and the output in the chat panel says "You clicked me". So Far So Good. But if I close the Panel (Num1) and open it again the function on the button does not work again. Ever, until reloading the game.

Using set attributes "active" false/true does not have this effect so I can't think of any reason why [UI] show/hide does.