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,144
Reaction score
15,535
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

I'm just so close to replacing LUK with a different stat, maybe DEX but we'll see.
Slapped together a title screen and working on some dungeon clutter + portraits for Dubhghaill and Einar. Usual CW for minor body horror wrt Einar
QVLJIgD.png

OaPcYUy.png

r55FiUJ.png

EIgO94y.png
cT1V4nb.png
>studying for months for an exam
>does exam
>waits 3 months for the results to come out
>me trying to login, incorrect password
>I get recovery password
>me trying to login, incorrect password

What the heck. As a son of a Karen, I'm going to file a few complaints.
Apparently Amazon Prime users get free Genshin Impact stuff like primogems and whatnot every month, but I'm not sure I ever want to fall into the abyss of F2P ever again.

Forum statistics

Threads
117,148
Messages
1,104,950
Members
153,221
Latest member
Kostec
Top