display_set_gui_maximise

Description

This function can be used to maximise the GUI layer and set it
to be scaled and offset in relation to the screen dimensions,
rather than the default application surface position and
dimensions. By default, the GUI layer is 1:1 with the application
surface resolution and drawn at the (0,0) position of the surface
too. However this is not always what you want and so you can use
this function to set it to be drawn relative to the absolute (0,0)
position of the display or game window. What arguments you provide
to this function will depend on the effect you wish it to have on
the GUI layer. Simply calling the function with no arguments will
set the GUI layer to be drawn at the (0,0) position of the screen
or game window, with the width and height being scaled to fit the
whole area:

display_set_gui_maximise();

However, you can set the scaling factor for the GUI
layer, and the width and height will be scaled by that amount.
Remember that the GUI layer is always made to fit the size of the
display or game window, or the application surface, so setting this
value to anything other than 1 basically scales the pixel count
along the width and height. If your display is 1024x768 and you set
the scaling factor to scale by 0.5, then your GUI layer will be
half the size of the display, effectively doubling the pixel
size:

display_set_gui_maximise(0.5, 0.5);

Setting the values in this way will also set the draw position
to the (0,0) of the display or game window, so you can provide
offset values to "move" the (0,0) position:

Finally, you can reset the GUI layer using this function by
setting the scaling factors to -1. This will set the GUI layer to
have a 1:1 scale again and set the draw position to the (0,0)
position of the application surface rather than the display or
window.