Utilities for operating on the current window, such as changing the title.

Static variables

@:value(~/^https?:/?/?(?:www\.)?[-a-zA-Z0-9@:%_\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)$/)staticfinalread onlyURL_REGEX:EReg = ~/^https?:/?/?(?:www\.)?[-a-zA-Z0-9@:%_\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_\+.~#?&/=]*)$/

A regex to match valid URLs.

@:value(new FlxTypedSignal<Int>())staticfinalread onlywindowExit:FlxTypedSignal<Int ‑> Void> = new FlxTypedSignal<Int>()

Dispatched when the game window is closed.

Static methods

staticinitWindowEvents():Void

Wires up FlxSignals that happen based on window activity. For example, we can run a callback when the window is closed.

staticopenURL(targetUrl:String):Void

Runs platform-specific code to open a URL in a web browser.

Parameters:

targetUrl

The URL to open.

staticsanitizeURL(targetUrl:String):String

Sanitizes a URL via a regex.

Parameters:

targetUrl

The URL to sanitize.

Returns:

The sanitized URL, or an empty string if the URL is invalid.

staticsetDarkMode(window:Window, value:Bool):Void

Sets the dark mode appearance for the specified window.

Parameters:

window

The window instance to modify.

value

Whether to enable (true) or disable (false) dark mode.

staticsetVSyncMode(value:WindowVSyncMode):Void

staticsetWindowTitle(value:String):Void

Sets the title of the application window.

Parameters:

value

The title to use.

staticshowError(name:String, desc:String):Void

Shows an error dialog with an error icon.

Parameters:

name

The title of the dialog window.

desc

The error message to display.

staticshowInformation(name:String, desc:String):Void

Shows an information dialog with an information icon.

Parameters:

name

The title of the dialog window.

desc

The information message to display.

staticshowWarning(name:String, desc:String):Void

Shows a warning dialog with a warning icon.

Parameters:

name

The title of the dialog window.

desc

The warning message to display.