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

SOLVED GUI isn't drawed correctly

M

master2015hp

Guest
Hi, i have my room at size of 1280 x 720. I setup some objects at the bottom left of the view.
They're drawn all via drawGUI event.
However when i run this app on my android phone, which has resolution of 854x480, all of those objects are displayed off screen.
How can i make sure they always stay in their correct position regardless of the screen resolution?
Thank you/
1609036338244.png
 

rytan451

Member
Make a variable to hold the GUI width and height display_get_gui_width(), display_get_gui_height(). Then, when creating GUI elements anchored to the bottom edge, draw it at a position based on the height.
 
M

master2015hp

Guest
I used display_set_gui_maximise() function, why wasn't the GUI scaled to fit the smartphone resolution?
 
M

master2015hp

Guest
I ran this code but it doesn't seem to work
GML:
display_set_gui_size(window_get_width(), window_get_height());
display_set_gui_maximise();
 
Top