Hey all,
This one's bugging me. I want to have an option for the player to change between 16/9 aspect ratio and 4/3... I've seen a guide suggesting using the command display_set_gui_size(w, h) but that didn't work at all...
Here is the code I have that appears for a persistent object at the event "room start":
var base_h = 768;
var max_w = display_get_width();
var max_h = display_get_height();
var aspect = display_get_width() / display_get_height();
global.VIEW_HEIGHT = min(base_h, max_h);
global.VIEW_WIDTH = global.VIEW_HEIGHT * aspect;
camera_set_view_size(view_camera[0], floor(global.VIEW_WIDTH), floor(global.VIEW_HEIGHT))
view_wport[0] = max_w;
view_hport[0] = max_h;
surface_resize(application_surface, view_wport[0], view_hport[0]);
------------------------------------------------------------------------------------------
Edit: added pictures in a reply to show what I mean.
Thanks to any who can help!
This one's bugging me. I want to have an option for the player to change between 16/9 aspect ratio and 4/3... I've seen a guide suggesting using the command display_set_gui_size(w, h) but that didn't work at all...
Here is the code I have that appears for a persistent object at the event "room start":
var base_h = 768;
var max_w = display_get_width();
var max_h = display_get_height();
var aspect = display_get_width() / display_get_height();
global.VIEW_HEIGHT = min(base_h, max_h);
global.VIEW_WIDTH = global.VIEW_HEIGHT * aspect;
camera_set_view_size(view_camera[0], floor(global.VIEW_WIDTH), floor(global.VIEW_HEIGHT))
view_wport[0] = max_w;
view_hport[0] = max_h;
surface_resize(application_surface, view_wport[0], view_hport[0]);
------------------------------------------------------------------------------------------
Edit: added pictures in a reply to show what I mean.
Thanks to any who can help!
Last edited: