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

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.

09-15-2019, 03:29 PM
Apparently the bug is still there. I seem to have done exactly what you did, but with a whole dialog panel. If I hide it and then show it again, it will be totally dead. It doesn't respond to clicks, doesn't select toggles, and does not even drag. So clearly "show" is not undoing whatever "hide" did. I'm going to report it as a bug. Surprised that this hasn't been fixed already.