GMS 2 help scalling the game.

J

Jrelvas

Guest
Im working on a new game prototype, but i ran on a problem, once i tried the game on another computer, while the game itself scaled down, the gui was acting like it has on the full rsolution, so how do i rescale the gui (making it big or small) to fit on the display?

note: the game currently runs on 1366 x 768
 

marasovec

Member
Here is my code I use for scaling
6 is autodetect
Code:
switch global.res
    {
    case 1:
        global.view_w = 800;
        global.view_h = 600;
    break;
    case 2:
        global.view_w = 1024;
        global.view_h = 768;
    break;
    case 4:
        global.view_w = 1280;
        global.view_h = 720;
    break;
    case 5:
        global.view_w = 1290;
        global.view_h = 1080;
    break;
    case 3:
        global.view_w = 1280;
        global.view_h = 960;
    break;
    case 6:  // AUTODETECT
        global.view_w = display_get_width();
        global.view_h = display_get_height();
    break;
    }
And code for applying
Code:
view_wport = global.view_w;
view_hport = global.view_h;
view_wview = global.view_w;
view_hview = global.view_h;

window_set_size(view_wport, view_hport);
window_center();
 
J

Jrelvas

Guest
the interface is still on full size, what i want is a way to make it smaller, to fit the window
 
Top