GML:
global.VIEW_W = 960;
global.VIEW_H = 540;
global.VIEW_RES=global.VIEW_W/global.VIEW_H
var camera_W=global.VIEW_W;
var camera_H=global.VIEW_H;
var screen_w=display_get_width();
var screen_h=display_get_height();
var screen_res=screen_w/screen_h;
if(screen_res>global.VIEW_RES)//Screen is Wider
{
camera_W = floor(global.VIEW_H*screen_res);
}
if(screen_res<global.VIEW_RES)//Screen is higher
{
camera_H = floor(global.VIEW_W/screen_res);
}
var _check = true;
var _rm = room_next(room);
var _rprev = _rm;
while (_check = true)
{
var _newcam=camera_create_view(0,0,camera_W,camera_H,0,-1,0,0,0,0);
var _cam=room_get_camera(_rm,0);
camera_destroy(_cam);
room_set_camera(_rm,0,_newcam);
room_set_viewport(_rm, 0, true, 0, 0,screen_w,screen_h);
room_set_view_enabled(_rm, true);
if (_rm = room_last)
{
_check = false;
}
else
{
_rprev = _rm;
_rm = room_next(_rprev);
}
}
view_wport[0]=screen_w;
view_hport[0]=screen_h;
window_set_fullscreen(true)
application_surface_enable(true);
surface_resize(application_surface,screen_w,screen_h);
display_set_gui_size(camera_W,camera_H);
global.GUI_W=display_get_gui_width()
global.GUI_H=display_get_gui_height();
And if I change the parametrs of
Code:
display_set_gui_size(screen_W,screen_H)
I am running the game with basic size of 960x540 on the 1280x1024 PC.
So could you please help me with those Scailing and Resolution twicks andgui resizing, maybe I should use different resolution assets for GUI, and AM I actually doing it alright???
Attachments
-
116.3 KB Views: 8
-
114.5 KB Views: 6
Last edited: