For the sake of memorability and forwards-compatibility, Xtend provides built-in keywords and custom macros to aid in developing projects with responsive design. It is strongly recommended to always use keywords and macros when available, as their literal values may change in future updates.
Note that most macros are read-only, and should be used for reference, not for modification. For example, to change the position of the master scaling view within the room,
view_x = 50; is invalid. Instead, use regular built-in GML functions for modifying view camera properties, e.g.
camera_set_view_pos(view_camera, 50, 0);.
Many macros are prefixed, meaning you don't have to memorize each one to use them. Simply begin typing the first few letters of a macro or keyword in your code editor and you'll be shown auto-complete options to choose the desired item from a list.
|Returns the room X coordinate of the master scaling view, in pixels|
|Returns the room Y coordinate of the master scaling view, in pixels|
|Returns the width of the master scaling view, in pixels|
|Returns the height of the master scaling view, in pixels|
|Returns half the width of the master scaling view, in pixels (does not include room X coord)|
|Returns half the height of the master scaling view, in pixels (does not include room Y coord)|
|Returns the relative horizontal scale of the master scaling view as compared to base width, as a multplier|
|Returns the relative vertical scale of the master scaling view as compared to base height, as a multplier|
|Returns the aspect ratio of the master scaling view, as a fraction|
As of version 1.0.5, Xtend supports rendering cutout areas in Android 9+. While Android 8 and below do not support cutouts, they do handle the system UI in different ways depending on manufacturer. This can include showing or hiding different system UI elements, which cut into an app's rendering space. To explicitly set system UI behavior, GameMaker Studio includes the function
display_set_ui_visibility, but does not provide the flags needed to actually use it. Xtend solves this problem by including predefined flags consistent with the Android SDK.
|0||View has requested the system UI (status bar) to be visible (the default).|
|1||View has requested the system UI to enter an unobtrusive "low profile" mode. Status bar and/or navigation icons may dim.|
|2||View has requested that the system navigation (Home, Back, and the like) be temporarily hidden.|
|4||View has requested to go into the normal fullscreen mode so that its content can take over the screen while still allowing the user to interact with the application.|
|16||Requests the navigation bar to draw in a mode that is compatible with light navigation bar backgrounds. For this to take effect, the window must request |
|256||Requests content insets to always represent the worst case that the application can expect as a continuous state (depending on other active flags).|
|512||View would like its window to be laid out as if it has requested |
|1024||View would like its window to be laid out as if it has requested SYSTEM_UI_FLAG_FULLSCREEN, even if it currently hasn't.|
|2048||View would like to remain interactive when hiding the navigation bar with |
|4096||View would like to remain interactive when hiding the status bar with |
|8192||Requests the status bar to draw in a mode that is compatible with light status bar backgrounds. For this to take effect, the window must request |
Multiple flags can be assigned in
display_set_ui_visibility at once by separating values with bitwise OR, aka the pipe symbol (