hajimehoshi / ebiten

Ebitengine - A dead simple 2D game engine for Go
https://ebitengine.org
Apache License 2.0
11.12k stars 664 forks source link

ebiten: add `RequestAttention` #2998

Closed erexo closed 2 months ago

erexo commented 6 months ago

Operating System

What feature would you like to be added?

I'm in need to inform the player that there is something going on in the game even when the game is minimized, that is to call the FlashWindow. I've noticed that we already have the RequestAttention method in the Window platform specific struct, but I don't think that I'm able to call this code externally from my game, can we push that to mby ebiten.RequestAttention() or smth?

Why is this needed?

No response

hajimehoshi commented 6 months ago

So do you want GLFW's RequestAttention? I'll consider this

erexo commented 6 months ago

I'm not sure how that RequestAttention work, but I'm specifically in need of when game is not focused then flash, if the game is focused there is no need for flashing. So if this RequestAttention flash regardless of focus state then maybe an additional IsFocused func could be implemented?