Erayd
Member
I have a theory I'm wondering if anyone passing by here can confirm or not.
My gui layer is set to the resolution of the player's monitor so as to have the highest resolution for certain graphics. Before I built that function in, I had been setting all my element's locations by static values like x= 50, y = 120. The obvious problem with that is that after resizing the gui layer, 50 x 120 is no longer where I wanted it to be, so my whole gui was still visually the same size.
One answer is to have different resolution options the player can choose and then adapt the gui based on that choice, however, I'm wondering if I can instead just use ratio values to place all of my objects on the gui layer?
Example: (where gui_width is recorded when the gui layer changes, in this case, display_get_gui_width())
I don't have a bunch of monitors to test this on, plus its still just a theory. If nobody has any ideas then I could just adjust the gui size to several different common monitor sizes and see what happens. Just throwing it out there for now. My hope is that by using ratios, the sprite objects always render in the same location since the game view will be the size of the display but a small scale resolution and the gui layer will also be the same size as the display, but a much higher resolution.
My gui layer is set to the resolution of the player's monitor so as to have the highest resolution for certain graphics. Before I built that function in, I had been setting all my element's locations by static values like x= 50, y = 120. The obvious problem with that is that after resizing the gui layer, 50 x 120 is no longer where I wanted it to be, so my whole gui was still visually the same size.
One answer is to have different resolution options the player can choose and then adapt the gui based on that choice, however, I'm wondering if I can instead just use ratio values to place all of my objects on the gui layer?
Example: (where gui_width is recorded when the gui layer changes, in this case, display_get_gui_width())
Code:
var picked_x = gui_width/15;
var picked_y = gui_height - picked_item_back_height - gui_height/10;
//Background
draw_sprite_ext(picked_item_back, -1, picked_x, picked_y, 1, 1, 0, c_white, picked_item_a);