Merge remote-tracking branch 'origin/main'

This commit is contained in:
Frakits
2025-07-25 18:35:32 +03:00
6 changed files with 40 additions and 29 deletions
+3 -3
View File
@@ -26,9 +26,9 @@ class Flags {
public static var MOD_DOWNLOAD_LINK:String = "";
public static var MOD_DEPENDENCIES:Array<String> = [];
public static var MOD_ICON64:String = "";
public static var MOD_ICON32:String = "";
public static var MOD_ICON16:String = "";
@:noCompletion public static var MOD_ICON64:String = "";
@:noCompletion public static var MOD_ICON32:String = "";
@:noCompletion public static var MOD_ICON16:String = "";
public static var MOD_ICON:String = "";
public static var MOD_DISCORD_CLIENT_ID:String = "";
@@ -57,6 +57,17 @@ final class WindowUtils {
updateTitle();
}
/**
* Sets the window title and icon.
* @param title The title to set.
* @param image The image to set as the icon.
**/
public static inline function setWindow(?name:String, ?image:String)
{
Lib.application.window.setIcon(lime.graphics.Image.fromBytes(Assets.getBytes(Flags.MOD_ICON != null ? Flags.MOD_ICON : image)));
title = Flags.MOD_NAME != null ? Flags.MOD_NAME : title;
}
/**
* Updates the window title to have the current title and prefix/suffix.
**/