Skip to content

window_has_focus

drewmccluskey edited this page Feb 12, 2019 · 3 revisions

window_has_focus

Returns if the window is focused

Syntax:

window_has_focus()

Returns: bool

Description:

Returns if the window is focused (in view), can be used for pausing the game when minimizing the window.

Example:

bool focus = window_has_focus();
show_debug_message(focus.ToString());

The above code will check if the window is focused or not. The result is saved to bool focus and then displayed as a debug pop-up message.

Back to window-functions

Clone this wiki locally