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

GM2 GUI Icon size **SOLVED**

Laura Bravo

Member
Anyone know a way to make drawing to the GUI consistent across screens? What I am running into is when the screen is changed to full screen my Icons, text, drawn shapes for bars ect all stay the same size in pixels and thus are smaller on screen. I want the icons and such to be consistent across platforms. Here is my view change code.

/////Code Controls ZOOM level///
ratio = display_get_width() / display_get_height() ;

view_set_hport(0,640);
view_set_wport(0,640 * ratio);

window_set_size(view_wport[0], view_hport[0]);

display_set_gui_size(view_wport[0], view_hport[0]);
gui_ratio = display_get_gui_height() / 640;
display_set_gui_maximise(gui_ratio, gui_ratio, 0, 0);

camera_set_view_size(view_camera[0], view_wport[0] * screen_zoom, view_hport[0] * screen_zoom );

As you can see I have been trying to play with the gui_maximise to get the effect. While there does need to be room for the width I want to scale everything off of the hight. so a 640 base on a screen that is 1280 will make everything 2x bigger and 320 1/2 as small so the menu and game look the same no matter what the device resolution.
 

Laura Bravo

Member
Fixed. It was the display_set_gui_maximise(gui_ratio, gui_ratio, 0, 0); causing the issues. once removed all together works just fine.
 
Top