From 6c783cc20a5833a79f43c4240e7eea0b44f2c70a Mon Sep 17 00:00:00 2001 From: Jade <45212377+crowplexus@users.noreply.github.com> Date: Tue, 20 May 2025 17:36:15 -0400 Subject: [PATCH] Update UIWindow.hx the titlebar couldn't be null because it was an optional parameter, also checking string length --- source/funkin/editors/ui/UIWindow.hx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/funkin/editors/ui/UIWindow.hx b/source/funkin/editors/ui/UIWindow.hx index 0bb4036a..e6ac6388 100644 --- a/source/funkin/editors/ui/UIWindow.hx +++ b/source/funkin/editors/ui/UIWindow.hx @@ -5,10 +5,10 @@ class UIWindow extends UISliceSprite { public var collapsable:Bool = false; public var content:FlxTypedGroup; - public override function new(x:Float, y:Float, w:Int, h:Int, title:String) { + public override function new(x:Float, y:Float, w:Int, h:Int, ?title:String) { super(x, y, w, h, "editors/ui/normal-popup"); - if(title != null) { + if(title != null && title.length != 0) { members.push(titleSpr = new UIText(x + 25, y, bWidth - 50, title, 15, -1)); titleSpr.y = y + ((30 - titleSpr.height) / 2); } @@ -47,4 +47,4 @@ class UIWindow extends UISliceSprite { } hovered = content.exists && UIState.state.isOverlapping(this, __rect); } -} \ No newline at end of file +}