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,170
Reaction score
15,542
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

Happy Saint Nicholas Day! May there nice stuff in your shoes when you wake up!
Choosing Beggars are the best source of entertainment.
DavidUchina wrote on caethyril's profile.
You chad, thanks a lot for your plugins. You helped me costumize the buttons in my game.
I created the first teaser for my game! I decided to make an animation of Cabaret Helen advertising the Pizza Time Theater, set to an actual radio commercial. But this is no ordinary advertisement...
"Somber melody and stunning visuals takes one through the bittersweet tale of False Rebirth" ~ Marmalade
https://rpgmaker.net/games/12069/reviews/7576/

Got a first review on my game, on RPG Maker dot net. :kaothx:

Forum statistics

Threads
117,216
Messages
1,105,546
Members
153,362
Latest member
Luxxusburger
Top