UI not showing when switching states rapidly
When switching states very rapidly, eventually, the ui won't show up.
Steps to reproduce: click the button on the screen as fast as you can, after a few clicks the ui will not show up when the states is switched back. The ui state has a red background and the other state has a green background.
Tested on Windows target.
Im not sure i understand how to reproduce, i click the first button and i just get a red screen, no way to go back - ive tried clicking the initial button super fast but i just get that second (red) state
Am i missing something?
So the red screen means exactly that the ui has not loaded. What you should get is a green screen and then go back to the screen with the button right after. So you've reproduced the problem in your first try.
Basically there are 2 FlxStates:
- InitialState with green bkg color. The initialState switches automatically to the LobbyState as soon as it loads. So it should just blink green when you click the button.
- LobbyState with red bkg color and a white haxe ui component that takes the whole screen with the button. If this ui component does not load properly, you get just the red background color, with no UI over it.
In my case, to reproduce, I have to keep clicking the button everytime the LobbyState reloads until eventually it loads without the UI and then I get the red screen.
oh, interesting... i thought the red was a new view... guess i should have guessed with the colour coding :D
Nice one, ill have a play now - i think it happens for me everytime, first time.
Cheers, Ian