you can maximize windows now + messageboxes

This commit is contained in:
Yoshman29
2022-10-28 00:36:19 +02:00
parent 2398a44ed8
commit 0aba35ccf3
17 changed files with 250 additions and 61 deletions
@@ -0,0 +1,25 @@
package funkin.desktop.sprites;
import flixel.text.FlxText;
import flixel.addons.ui.FlxUIText;
import funkin.desktop.theme.Theme.ThemeData;
class WindowText extends FlxText {
// TODO: VISUAL STYLES SHIT
public function new(x:Float, y:Float, w:Float, t:String) {
super(x, y, w, t);
color = 0xFF000000;
scrollFactor.set();
applyFontSettings(DesktopMain.theme.window);
// setFormat(Paths.font(.font))
}
public function applyFontSettings(data:ThemeData) {
var fontPath = Paths.font(data.font);
if (data.font.startsWith("file://")) {
fontPath = data.font.substr(7);
while(fontPath.charAt(0) == "/") fontPath = fontPath.substr(1);
}
setFormat(fontPath, Std.int(data.fontSize), data.textColor);
}
}