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,647
Reaction score
15,735
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 Profile Posts

It's definitely discouraging when streamers give a try-to-say-it-nicely (i.e. bad) review of your game demo. It's like jumping into a cold pool. Bad initally, but it gets better with time. And you are now more alert and see better.
Some screenshots of the pub and lodging with the beginnings of clutter taking shape
TTp8uCw.png

jtC202e.png

bSXgyVl.png

eRx9PUF.png
Backgrounds are not my strong suit... :kaodes:
DazI8jt.jpg

Just realized I forgot doing the clouds... woops
Went to get some stuff for February 10, the birthday of my favorite ink monster...
I have a little one-person party for Bendy every year, complete with the life-size plushie I made. And yes, I bake a birthday cake!

Forum statistics

Threads
118,498
Messages
1,116,409
Members
155,493
Latest member
maxboop
Top