haxeui / haxeui-flixel

The Flixel backend of the HaxeUI framework
MIT License
45 stars 13 forks source link

UI not showing when switching states rapidly #23

Open guifes opened 3 years ago

guifes commented 3 years ago

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.

HaxeuiDebug.zip

ianharrigan commented 3 years ago

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?

guifes commented 3 years ago

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:

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.

ianharrigan commented 3 years ago

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