• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

SOLVED Itch.io fullscreen button functions

There is this feature in itch to add a full screen button on the bottom-right corner.
1594292910999.png
1594292859958.png
Now when press this full screen button, I want to adjust certain values asides from full screen. How do I do that?

Also, the f10 full screen button doesn't seem to work in Itch.io.
 

Rucksack

Member
If you click the fullscreen button on itch, the display size changes. So every step, I check if the display size changed, and if it did, I change the window size accordingly:

GML:
// check if display is larger than the window
if display_get_width()!=window_get_width() {
    // resize window to display
    window_set_size(display_get_width(),display_get_height());
}
This is a minimal example, it will scale your game to fullscreen without taking the aspect ratio of the display into account.
 
Top