RMMV *SOLVED* Web browser: fullscreen plugin: remains at non-fullscreen size

Status
Not open for further replies.

violgamba

Villager
Member
Joined
Oct 7, 2021
Messages
7
Reaction score
5
First Language
English
Primarily Uses
RMMV
EDIT: I actually found a simple solution to this. I put it in a reply post below.

It's very exciting to be able to put projects on a website for easy access, but I've come across an issue. I've written a small plugin to add a fullscreen toggle menu option to the game. It just calls "Graphics._requestFullScreen()" to turn this on. This works perfectly on pc, and not quite perfectly on web deployment. On web deployment the website does take up the full screen, but the RMMV view remains at the size it was when NOT fullscreen. What would be great would be for the RMMV view to stretch to take up the full screen, while retaining aspect ratio with black bars, similar to how fullscreen works on pc.

I recognize that the html could be modified to accomplish stretching the RMMV view while in fullscreen mode, but am I missing a simpler way?

I've seen similar posted question, such as this one, but no answers. Thanks for any help you can provide.
 
Last edited:

violgamba

Villager
Member
Joined
Oct 7, 2021
Messages
7
Reaction score
5
First Language
English
Primarily Uses
RMMV
!!! SOLUTION !!!

Ok. I got pretty far into making a custom stretching plugin when I saw, in the code, the variable "Graphics._stretchEnabled". By default this is set to true on pc deployment and false on web deployment. If set to true in the browser then it does what I am looking for: stretching the game view to match the browser view!

A few things:
a) If I'd known that the answer was embedded in javascript like this than I would have posted to plugins. Sorry about that.
b) I believe that this flag is false by default because turning it on causes the game to take up the full browser, which people often wouldn't want. Still, you'd think that turning it on when the fullscreen flag is on would make sense. *shrug*
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
44,153
Reaction score
15,541
First Language
English
Primarily Uses
RMMV
(excuse approaching blue-text wall)

@violgamba, please avoid double posting, as it is against the forum rules. You can use the "Edit" function on your posts to add additional information you've forgotten or respond to multiple people. You can review our forum rules here. Thank you.



I've moved this thread to Plugin Support. Thank you.



This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Reading about metaverses recently. I can totally imagine myself in the future, logging in with VR glasses to a virtual beach villa sitting in a virtual chair, with a virtual laptop facing the sea...coding 16-bit RM.
Mod name: "[Game name] Gameplay Overhaul"
What they actually mean: "Here is a mod that makes the game harder."
I decided to reinstall one of my most favourite game of all times, Gothic 2. Time to get back to Khorinis!
So much game make... I needs to rest. The foods call.
-Casino with bunnysuit green check.png
1638563168795.png

Forum statistics

Threads
117,166
Messages
1,105,098
Members
153,259
Latest member
litespace
Top