• 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!

Problems with the GUI layer

C

Conannet

Guest
Hi guys!

So i'm making this game and stuff and since I'm making pretty big rooms like 10000x10000 or something the use of views and the GUI layer is inevitable.

The problem comes when the player is resizing the window of the game. The draw GUI layer just kinda stays in the same place, which is really strange. All other objects scale along with the game window, but not the GUI layer. This is bad, because today I wanted to show this game on my friend's laptop, but the screen of the laptop is much smaller than the original dimensions of the game. I scaled down the window and most of the GUI was gone and the game was practically unplayable.

Any ideas how to fix it? I searched around the manual, but no luck with everything I've tried :( The GUI just wont scale with the application screen.
 

Mert

Member
Code:
display_set_gui_size(width,height);
//Use it in CREATE event
This will resize the GUI window. Draw every GUI element in DRAW GUI event.
 
C

Conannet

Guest
I just realized what I was doing wrong. I was trying to adjust it to the display width and height. So this function actually locks it in the desired dimensions. It doesn't resize it according to the width and height. Thank you :)
 
Top