FreezingMoon / AncientBeast

The Turn Based Strategy Game/eSport. Master your beasts! 🐺
https://AncientBeast.com
GNU Affero General Public License v3.0
1.69k stars 589 forks source link

Esc shouldn't leave fullscreen [bounty: 12 XTR] #2594

Closed DreadKnight closed 3 months ago

DreadKnight commented 3 months ago

If the game is fullscreen, pressing Esc key shouldn't remove the fullscreen state. This should improve UX quite a bit and have the game seem a bit less "casual".

udayxyz commented 3 months ago

Hey this is Uday Chand Mukherjee i would like to work on this project please assign it to me

DreadKnight commented 3 months ago

Hey this is Uday Chand Mukherjee i would like to work on this project please assign it to me

Done ✔️ 2 weeks soft deadline 🐻

shricastic commented 3 months ago

his is practically impossible since browser wont allow us to lock esc key or prevent us from exiting full screen. I think better alternative for this can be asking user if he is sure about exiting full screen mode via alert or something.

DreadKnight commented 3 months ago

@shricastic Alright, closing as invalid and going for #2595 only rather.

shricastic commented 3 months ago

ahh.. great. so do i get the bounty for resolving it. 😂 just kidding.

but i think better way to keep user in fullscreen mode is by asking him to hit F11 which is used to keep browser in fullscreen and technically if browser is in fullscreen mode our app is too also it will not exit fullscreen unless user hits F11 again, esc won't work.

DreadKnight commented 3 months ago

ahh.. great. so do i get the bounty for resolving it. 😂 just kidding.

Follow this and I'll give you a XTR -> https://github.com/FreezingMoon/AncientBeast/wiki/Token#mintme

but i think better way to keep user in fullscreen mode is by asking him to hit F11 which is used to keep browser in fullscreen and technically if browser is in fullscreen mode our app is too also it will not exit fullscreen unless user hits F11 again, esc won't work.

Hmm, that gives me an idea... if possible, we could have the game's fullscreen buttons from pre-match screen and during gameplay to actually trigger F11 while still showing the current hotkey (Shift+F) in the tooltip. What do you think? Could open new issue for it.

shricastic commented 3 months ago

I haven't gone through your code base, though it's sounding pretty fair. But, we might wanna make sure that we can trigger F11 and browser doesn't prevent us from doing that. Maybe lets get connected nd discuss it somewhere else. slack/linkedin/X etc. maybe

DreadKnight commented 3 months ago

I haven't gone through your code base, though it's sounding pretty fair. But, we might wanna make sure that we can trigger F11 and browser doesn't prevent us from doing that. Maybe lets get connected nd discuss it somewhere else. slack/linkedin/X etc. maybe

Yeah. We have a channel for coding talks on our Discord server. Link on website footer https://AncientBeast.com