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

Pressing the ESC key will now EXIT "FullScreen mode" with RM MV. #7324

Closed
koruldia opened this issue Jan 19, 2020 · 12 comments
Closed

Pressing the ESC key will now EXIT "FullScreen mode" with RM MV. #7324

koruldia opened this issue Jan 19, 2020 · 12 comments

Comments

@koruldia
Copy link

NWJS Version : 0.43.6
Operating System : Windows 10 (64bit)

Expected/Actual behavior

I noticed a new behavior in the latest NWJS update, my project was running with 0.43.3 so far (without any problem) but after updating to the latest version (0.43.6) now I notice that pressing the ESC key exits FULLSCREEN mode. It’s a pretty big problem since the ESC key is used to call the in-game menu in the engine I’m using for my project (RPG MAKER MV) and if someone wants to play with a keyboard it can be problematic.

How to reproduce

In order to go in FULLSCREEN with RM MV in the first place you'll need to press F4 since the game will be windowed by default. (Some JS plugins can add a FULLSCREEN option in the game-menu or turn it ON by default but let's assume a vanilla RM MV.)
Now normally the only way to go back to a windowed mode would be to press F4 again (or using the options provided by a plugin) but with the new update unfortunately pushing the ESC key will bring you to the windowed mode and call the in-game menu at the same time.

Thank you in advance and good luck with NW, it's an amazing software.

@rogerwang
Copy link
Member

Could you please provide a sample? It works for me.

@koruldia
Copy link
Author

koruldia commented Jan 20, 2020

Hi Roger, I just made a quick RM MV sample project with your latest (0.43.6) NW:
---updated next message---
Sorry about the file size, I wanted to make sure every base resource from vanilla MV are present just in case. There is no plugin at all, it’s a brand-new virgin project just to try the behavior. And actually, when I said in my previous message that the version I was running so far was 0.43.3, it was a mistake because even that one already had the ESC key problem too, my previous (perfectly working) version was 0.41.3.
Another thing I noticed since recent versions is that the game’s window (it’s windowed by default if you don’t use a plugin as I said) is at the very top left of the screen now, when in 0.41.3 for example, the window was centered at launch. I didn’t think much of it but it’s something I noticed.

In order to reproduce the problem, after you launch the “game sample”, press the F4 key in order to go fullscreen, then push the ESC key like you want to call the in-game menu, and it will make you leave the fullscreen (like if you’d push F4 again) instead of calling the in-game menu.
(Start the “game” if you want to see it, there’s no menu on the title screen.)

I hope you’ll be able to see the same behavior, I tried on 2 other computers and I could reproduce it, tell me if you wan’t me to upload the same sample with 0.41.3 instead (or you can simply replace the data in the folder) because that one was the last time everything was fine but it’s also because I skipped some updates in between, now that I see you keep a list of previous versions, I will try each one following 0.41.3 to see when it began to change. Maybe it will help you.

@koruldia
Copy link
Author

Alright, after trying every version since my “last working one” I can say that the problem begins with version (x64) 0.42.4, and it's also when the game’s window began to be at the top-left instead of centered.
So the very last version “flawlessly usable” for RPG MAKER MV so far is 0.42.3, I'll stay on that one from the time being. Thank you again for your good work and I hope you’ll find what’s causing that problem in further updates.

@rogerwang
Copy link
Member

The sample you provided is based on 0.43.3, not 0.43.6. When I tried to use 0.43.6 to launch your game, it doesn't enter fullscreen mode.

@koruldia
Copy link
Author

koruldia commented Jan 22, 2020

Hi! It doesn’t.. ENTER? Did you mean to write “EXIT”, because it would be worrisome if we can’t even enter fullscreen on some configuration. (I never had that problem though.)

Don’t forget that in vanilla RM MV the games don’t go fullscreen automatically and you have to push F4 first, I tried again with 0.43.6 and it’s always the same behavior (same as 0.43.3 anyway), you launch the game, you push F4 to go fullscreen, then start (to go on the map with all the cats) and when trying to bring the in-game menu pushing the ESC key, the game exits fullscreen instead of calling the menu, of course then if you push ESC again (windowed) the menu will work.

I made a new sample with a plugin to automatically go fullscreen (and skip the menu) so there’s no misunderstanding (and made sure it’s the very last stable NW available on your website), here it is:

http://koruldia.com/nw_mvtest.rar

It’s the same kind of sample but with a plugin to be fullscreen automatically (so you don’t have to bother with F4) now push ESC to bring the menu you’ll see it will go back to windowed, then if you push ESC again you’ll get the intended behavior: calling the menu. Alternatively while fullscreen you can push the X key and you’ll see the normal behavior (calling the menu and staying in fullscreen) since X is an alternative key to ESC, if you have a NUM PAD on your keyboard, the ZERO key is also an alternative to ESC, and I usually use that key when playtesting, this is why I didn’t notice the problem straight away.
(You can also right-click with your mouse.)

If you need me to make a video of myself having the problem I can also do it quickly (filming my screen with my phone), I also was able to reproduce the issue on 3 different computers. As I said the change of behavior is here since 0.42.4 and I just didn’t notice until recent versions.
Hope this will be helpful.

@rogerwang
Copy link
Member

I think the behaviour is in the application, not NW. I tried with the default application, it doesn't exit fullscreen when I press ESC.

fullscreen

@koruldia
Copy link
Author

Yes, it’s probably the case. Maybe some kind of conflict between RMMV (Pixi JS) and Node or Chromium.
The thing is, nothing changed about the application (rmmv) since that time and that new behavior suddenly happened with 0.42.4 so it seems something changed there, and well maybe it will change back to the old behavior in a future update who knows.

Out of curiosity, would it be possible to have an exclusive full-screen (not only the borderless window thing) one day if it’s technically possible? It often helps global performances.
(Like in the good ol’days when we had to push ALT+ENTER to toggle a real full screen ^u^)

Well, tell me if there’s anything I can do to manually correct that “ESC key conflict”.
Maybe I can seek a “plugin solution” to at least maximize the game’s window on start, or mimic a borderless maximized window which would show the frame when hovering the top area with the mouse, something like that.

Now that I think about it, would be amazing to have control on the behavior of the “NW window/frame” like that, giving us the option to fine-tune with our specific needs. Just a suggestion to improve your already great software.

@rogerwang
Copy link
Member

Another user reported with a sample so I can reproduce it now: https://groups.google.com/d/msg/nwjs-general/A3znJx9c0OE/IoPmREdMEwAJ

Will fix it soon. Thanks.

@rogerwang
Copy link
Member

This is fixed in git and will be available in the next nightly build.

@koruldia
Copy link
Author

Great news!
Oh it's Ashley from Scirra. (RM MV and Construct seem to have some common DNA.)

Take care and good luck with future updates Roger. Cheers!

@rogerwang
Copy link
Member

The nightly build for this issue is available at https://dl.nwjs.io/live-build/nw44/20200128-162000/54f5ff5c2

@koruldia
Copy link
Author

Perfect, I tried and it's working just like before.
(The only minor difference is the window launching at the top-left of the screen instead of the middle. Maybe it’s a new deliberate choice, no problem.)

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants