-
Notifications
You must be signed in to change notification settings - Fork 14
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
auto focus on wasm Ebiten game? #59
Comments
Hm, this sounds like a web programming that might not be related to Ebiten. I'm not sure. Let me think. Thank you for the suggestion! |
By default, the game should run even when the game is unfocused (as of v2). Have you tried v2? |
The game runs automatically, it just doesn't take keyboard input without gaining focus via the mouse. I'm sure it is a web programming issue, I was just wonder if the tutorial which mentions how to embed the game in a web page via webassemby might also mention how to automatically give it focus. I'll try a few things. thanks |
Ah yes, the first inputting is a general web programming issue, and I'm sure this is not an Ebiten issue. The first focused element should be determined by the browser or the web author, and personally I don't think this is a good behavior to focus an iframe automatically just after loading a page. |
https://ebiten.org/documents/webassembly.html
Having followed the steps in the page above to embed my ebiten game into a web page with wasm, I find that the games does not have focus until clicked on. This behavior occurs on both firefox and chromium. Perhaps you could add another step in the directions to make game the focus upon load?
The text was updated successfully, but these errors were encountered: