fivem
fivem copied to clipboard
feat(extra-natives/five): add IS_GAME_WINDOW_FOCUSED
Add a simple function for checking game window focus.
... use cases? Impact assessment? Are we just supposed to take this and deal with it?
Personal use case is going to be checking for focus to pause taskbars, while looking for a native similar some people had uses for "Away" statuses, and holding off on cursor manipulation if the game was not focused. I figured a native like this would be better than trying to hackily work around with cursor position, last input, etc.
Flexible - sure. However, for example game pad input works fine if the game isn't focused.
I'm also worried about potential abuse cases for this 'simple' a call. People manage to abuse a lot of 'weird' state checks.
About abuse, I have no idea but it would be handy especially for RP servers we can let players know, others are tab out or not, so they don't expect a response from them
About abuse, I have no idea but it would be handy especially for RP servers we can let players know, others are tab out or not, so they don't expect a response from them
Potential abuse in this very example is RP servers banning/kicking users for being "tabbed out" for too long (via staff instruction or automatically) as some sort of AFK prevention or a naive "anti cheat" measure that gets bypassed by said cheats offering to patch this native to always return true. Seems silly? Remember that widely used "protections" are to ban/kick users for pressing the delete key or console key.
If ruining the user experience wasn't eventual outcome of most newly implemented neat features, the worry for abuse wouldn't be so significant.
In my opinion, worrying about abuse is silly. Why give up a feature that has multiple use cases just because some servers will kick / ban their players. A player can always find another server to play on.
any update
hello can you add this now