Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions source/funkin/util/WindowUtil.hx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class WindowUtil
*/
public static function showError(name:String, desc:String):Void
{
lime.app.Application.current.window.alert(lime.ui.MessageBoxType.ERROR, desc, name);
alert(lime.ui.MessageBoxType.ERROR, desc, name);
}

/**
Expand All @@ -171,7 +171,7 @@ class WindowUtil
*/
public static function showWarning(name:String, desc:String):Void
{
lime.app.Application.current.window.alert(lime.ui.MessageBoxType.WARNING, desc, name);
alert(lime.ui.MessageBoxType.WARNING, desc, name);
}

/**
Expand All @@ -181,7 +181,22 @@ class WindowUtil
*/
public static function showInformation(name:String, desc:String):Void
{
lime.app.Application.current.window.alert(lime.ui.MessageBoxType.INFORMATION, desc, name);
alert(lime.ui.MessageBoxType.INFORMATION, desc, name);
}

/**
* Displays a native system alert dialog.
* @param type The type/severity icon of the message box (e.g. ERROR, WARNING, INFORMATION). Defaults to INFORMATION.
* @param message The main body content/description of the alert dialog.
* @param title The title text displayed in the window header.
* @param buttons Optional list of custom button labels for the dialog.
*/
public static function alert(type:lime.ui.MessageBoxType = INFORMATION, ?message:String, ?title:String, ?buttons:Array<String>) {
@:privateAccess
FlxG.sound?.onFocusLost();
lime.app.Application.current.window.alert(type, message, title, buttons);
@:privateAccess
FlxG.sound?.onFocus();
}

/**
Expand Down
Loading