Obsolete Display Functions

These functions are for dealing with aspects of how the game is displayed.

Function List:

Function Description
screen_refresh Refreshes the screen using the current room image (not performing drawing events).
screen_wait_vsync Waits for the next vertical synchronization of the monitor.
set_automatic_draw Indicates whether to automatically redraw the room (true, default) or not (false).
set_synchronization Indicates whether to synchronize the drawing with the refresh frequency of the monitor.
display_set_size Sets the width and height of the display in pixels. Returns whether this was successful. (Realize that only certain combinations are allowed.)
display_set_colourdepth Sets the colour depth. In general only 16 and 32 are allowed values. Returns whether successful.
display_set_frequency Sets the refresh frequency for the display. Only few frequencies are allowed. Typically you could set this to 60 with a same room speed to get smooth 60 frames per second motion. Returns whether successful.
display_set_all Sets all at once. Use -1 for values you do not want to change. Returns whether successful.
display_test_all Tests whether the indicated settings are allowed. It does not change the settings. Use -1 for values you do not want to change. Returns whether the settings are allowed.
window_set_region_size Set the width and height of the drawing region in the window. adaptwindow indicates whether the window size must be adapted if the region does not fit in. The window size will always be adapted if you use fixed scaling.
window_set_region_scale If the window is larger than the actual room normally the room is displayed in a region centered in the window. It is though possible to indicate that it must be scaled to fill the whole or part of the window. A value of 1 is no scaling. If you use a value of 0 the region will be scaled to fill the whole window. If you set it to a negative value it will be scaled to the maximal size inside the window while maintaining the aspect ratio (this is often what you want). adaptwindow indicates whether the window size must be adapted if the scaled room does not fit in. Adapting the window is only effective when the scale factor is positive.
window_get_region_scale Returns the scale factor for the drawing region.
window_get_region_width Returns the current width of the drawing region.
window_get_region_height Returns the current height of the drawing region.
window_set_visible Sets whether the game window is visible. Clearly you normally want the window to remain visible during the whole game. The program will not receive keyboard events when the window is invisible.
window_get_visible Returns whether the game window is visible.
window_set_showborder Sets whether the border around the window is shown. (In full screen mode it is never shown.)
window_get_showborder Returns whether the border around the window is shown in windowed mode.
window_set_showicons Sets whether the border icons (iconize, maximize, close) are shown. (In full screen mode these are never shown.)
window_get_showicons Returns whether the border icons are shown in windowed mode.
window_set_stayontop Sets whether the window must always stay on top of other Windows.
window_get_stayontop Returns whether the window always stays on top of other Windows.
window_set_sizeable Sets whether the window is sizeable by the player. (The player can only size it when the border is shown and the window is not in full screen mode.)
window_get_sizeable Returns whether the window is sizeable by the player.
window_default Gives the window the default size and position (centered) on the screen.
window_view_mouse_set Sets the position of the mouse with respect to the view with index id.
window_views_mouse_set Sets the position of the mouse with respect to the first view that is visible.
room_set_caption Sets the room caption for the given room index.

Why These Are Obsolete

These functions are now considered obsolete due to the changes in the way that GameMaker: Studio draws things to the screen, as well as the fact that some of them are legacy functions from quite a while back which are no longer valid for modern computers and devices, or that they don't work on any device except a Windows machine, and even then they are usually not necessary.





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here