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
4
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
4
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,133
Reaction score
15,531
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

For some reason, I found this is kinda stylist
ready to fall into another development hell...
Mega has been giving me a lot of problems as of late, so I think I'll need to switch to another cloud service. I'm considering Dropbox.
Rough week, but in the end there's light in the darkness.
Mental health is an issue I wish was taken more seriously.
Take care.
1638421271905.jpeg
By the power of timezones! This picture shall still be posted on december 1st!!!
7xI2Gc2.jpg

Forum statistics

Threads
117,126
Messages
1,104,777
Members
153,170
Latest member
hotcupofjoe2
Top