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

If more than one screen is shown on the same frame, only the first is shown #43

Closed
totebo opened this issue Mar 19, 2019 · 6 comments
Closed

Comments

@totebo
Copy link

totebo commented Mar 19, 2019

Took me while to realise why my game over screen didn't fire. The use case here is:

  1. The game starts by a ball being fired based on an angle set by the player, and the hud is shown (preloaded)
  2. The ball immediately triggers game over, because that was a BAD shot, and shows game over screen (also preloaded)

The game over screen never shows in this scenario. The workaround is to wait a frame to show the game over screen, which is fine, but thought I'd mention it because it took me a while to figure out why it's not working as expected.

@britzl
Copy link
Owner

britzl commented Mar 19, 2019

Does monarch.show() return false? You can also do monarch.is_busy() to check if Monarch is currently busy showing a screen or not.

@totebo
Copy link
Author

totebo commented Mar 19, 2019

Yes, it does return false! Good to know.

@britzl
Copy link
Owner

britzl commented Jul 31, 2019

I'm thinking that maybe a monarch.when_idle(cb) function could be added that will get invoked when Monarch isn't busy anymore. Or that monarch.show() would have a queue of requests and handle them one by one.

@totebo
Copy link
Author

totebo commented Jul 31, 2019

"monarch.show() would have a queue of requests and handle them one by one."

That sounds like a good option to me, then it would "just work" from the devs perspective.

@britzl
Copy link
Owner

britzl commented Aug 1, 2019

Queue support added to branch https://github.com/britzl/monarch/tree/dev-queue

@Jerakin and @totebo would you mind trying this branch on some of your projects and let me know if anything isn't working as expected?

@britzl
Copy link
Owner

britzl commented Aug 5, 2019

I decided to merge to master and release 3.0.0 with queue support.

https://github.com/britzl/monarch/releases/tag/3.0.0

@britzl britzl closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants