Nifty: Using hide effect onStartScreen

Hello everyone,

What I want:
I have a panel and want to switch the content in that panel when I press a button.

My approach:
I made multiple panels and thought I could hide the ones that are not needed. I tried using the hide effect with onStartScreen. This is a failing example of how I thought it would work:
<screen id=“start” controller=“mygame.NiftyController”>
<layer id=“layer” backgroundColor="#000f" childLayout=“center”>
<panel id=“mainPanel” height=“65%” width=“75%” childLayout=“horizontal”>
<panel id=“testpanel1” height=“100%” width=“50%” backgroundColor="#111f" childLayout=“center”>
<control id=“testbutton” name=“button” label=“test button”>
<interact onClick=“test()”/>
<panel id=“testpanel2” height=“100%” width=“50%” backgroundColor="#f11f" childLayout=“horizontal”>
<onStartScreen name=“hide” targetElement=“testpanel2” inherit=“true”/>
<onHover name=“show” targetElement=“testpanel2” inherit=“true”/>

The problem:
While the panel gets hidden as expected, somehow nifty stops responding: I can’t show it again and I can’t click the button. It doesn’t even react when I move my mouse over it.
I tested the hide effect using onHover as well, this works fine.

Am I doing something wrong or is this a nifty bug?
Also, if anyone thinks of a better way to implement content changing panels - suggestions are welcome!

This still does not work.
However, I now do not use the hide effect onStartScreen anymore.
I needed to call the hide effect manually…
It works at least. :slight_smile: