The Reverend
Member
Using GM:S 1.4.1763
What I want to do:
This is before I change the windowsize and without any GUI manipulation:
The red crosses and the green circle are on the GUI layer and are drawn realtive to the GUI-layers width & height. The Text is not on the GUI layer.
When I use:
display_set_gui_size(surface_get_width(application_surface)/2, surface_get_height(application_surface)/2);
The GUI layer is not covering the black bars, but is scaled properly by factor 2.
(small bug in the screenshot: gui height is actually 240, not 480)
When I use:
display_set_gui_maximise();
The GUI layer is covering the black bars, but is not scaled.
When I use:
display_set_gui_maximise(2, 2);
The GUI layer is covering the black bars, is scaled but is only showing the upper-left quadrant of the GUI layer.
When I use:
display_set_gui_maximise(0.5, 0.5);
The GUI layer is covering the black bars, is scaled but is only covering the upper quadrant of the window.
So how can I make the GUI layer cover the whole window but all elements be scaled by factor 2 (or any other facotr)?
What I want to do:
- The game is set to keep aspect ratio. So depending on the screen or window aspect there will be black bars - wich is intended in this case.
- The GUI layer is set to maximise so GUI elements can be drawn on the black bars.
- All elements on the GUI layer need to be scaled up by a factor to get a pixelated look.
This is before I change the windowsize and without any GUI manipulation:
The red crosses and the green circle are on the GUI layer and are drawn realtive to the GUI-layers width & height. The Text is not on the GUI layer.
When I use:
display_set_gui_size(surface_get_width(application_surface)/2, surface_get_height(application_surface)/2);
The GUI layer is not covering the black bars, but is scaled properly by factor 2.
(small bug in the screenshot: gui height is actually 240, not 480)
When I use:
display_set_gui_maximise();
The GUI layer is covering the black bars, but is not scaled.
When I use:
display_set_gui_maximise(2, 2);
The GUI layer is covering the black bars, is scaled but is only showing the upper-left quadrant of the GUI layer.
When I use:
display_set_gui_maximise(0.5, 0.5);
The GUI layer is covering the black bars, is scaled but is only covering the upper quadrant of the window.
So how can I make the GUI layer cover the whole window but all elements be scaled by factor 2 (or any other facotr)?
Last edited: