mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2024-11-27 01:55:52 -05:00
Rewrote documentation for InitState
This commit is contained in:
parent
6f737a1805
commit
4c85e59037
1 changed files with 10 additions and 2 deletions
|
@ -11,17 +11,21 @@ import flixel.util.FlxSignal.FlxTypedSignal;
|
|||
#end
|
||||
class WindowUtil
|
||||
{
|
||||
/**
|
||||
* Runs platform-specific code to open a URL in a web browser.
|
||||
* @param targetUrl The URL to open.
|
||||
*/
|
||||
public static function openURL(targetUrl:String)
|
||||
{
|
||||
#if CAN_OPEN_LINKS
|
||||
#if linux
|
||||
// Sys.command('/usr/bin/xdg-open', [, "&"]);
|
||||
Sys.command('/usr/bin/xdg-open', [targetUrl, "&"]);
|
||||
#else
|
||||
// This should work on Windows and HTML5.
|
||||
FlxG.openURL(targetUrl);
|
||||
#end
|
||||
#else
|
||||
trace('Cannot open');
|
||||
throw 'Cannot open URLs on this platform.';
|
||||
#end
|
||||
}
|
||||
|
||||
|
@ -30,6 +34,10 @@ class WindowUtil
|
|||
*/
|
||||
public static final windowExit:FlxTypedSignal<Int->Void> = new FlxTypedSignal<Int->Void>();
|
||||
|
||||
/**
|
||||
* Wires up FlxSignals that happen based on window activity.
|
||||
* For example, we can run a callback when the window is closed.
|
||||
*/
|
||||
public static function initWindowEvents()
|
||||
{
|
||||
// onUpdate is called every frame just before rendering.
|
||||
|
|
Loading…
Reference in a new issue