Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI not showing when switching states rapidly #23

Open
guifes opened this issue May 25, 2021 · 3 comments
Open

UI not showing when switching states rapidly #23

guifes opened this issue May 25, 2021 · 3 comments

Comments

@guifes
Copy link

guifes commented May 25, 2021

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
Copy link
Member

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
Copy link
Author

guifes commented Jun 16, 2021

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.

@ianharrigan
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants