huge progress

This commit is contained in:
Yoshman29
2023-04-25 16:22:19 +02:00
parent b95e97b5d4
commit 0033a8fae4
7 changed files with 140 additions and 23 deletions
+5 -2
View File
@@ -40,8 +40,6 @@ class UISubstateWindow extends MusicBeatSubstate {
FlxG.cameras.add(subCam, false);
windowSpr = new UISliceSprite(0, 0, winWidth, winHeight, "editors/ui/warning-popup");
windowSpr.x = (FlxG.width - windowSpr.bWidth) / 2;
windowSpr.y = (FlxG.height - windowSpr.bHeight) / 2;
add(windowSpr);
add(titleSpr = new UIText(windowSpr.x + 25, windowSpr.y, windowSpr.bWidth - 50, winTitle, 15, -1));
@@ -59,4 +57,9 @@ class UISubstateWindow extends MusicBeatSubstate {
FlxTween.cancelTweensOf(subCam);
FlxG.cameras.remove(subCam);
}
public override function update(elapsed:Float) {
super.update(elapsed);
subCam.scroll.set(Std.int(-(FlxG.width - windowSpr.bWidth) / 2), Std.int(-(FlxG.height - windowSpr.bHeight) / 2));
}
}