From b35b8b2a3359be2d7c7126a40484d6308f8a8eb9 Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Tue, 14 Mar 2023 19:36:30 +0100 Subject: [PATCH] clean menus --- buildnumber.txt | 2 +- source/funkin/editors/UIDebugState.hx | 6 ++++++ source/funkin/editors/ui/UICheckbox.hx | 4 +++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 09397688..b2ae9591 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2495 \ No newline at end of file +2498 \ No newline at end of file diff --git a/source/funkin/editors/UIDebugState.hx b/source/funkin/editors/UIDebugState.hx index edd91d44..3e522d16 100644 --- a/source/funkin/editors/UIDebugState.hx +++ b/source/funkin/editors/UIDebugState.hx @@ -4,6 +4,12 @@ import funkin.editors.ui.*; class UIDebugState extends UIState { public override function create() { + var bg = new FlxSprite().makeGraphic(0xFF888888); + bg.scale.set(FlxG.width, FlxG.height); + bg.updateHitbox(); + bg.scrollFactor.set(); + add(bg); + super.create(); add(new UICheckbox(10, 10, "Test unchecked", false)); add(new UICheckbox(10, 40, "Test checked", true)); diff --git a/source/funkin/editors/ui/UICheckbox.hx b/source/funkin/editors/ui/UICheckbox.hx index 52c237a0..a2c6d597 100644 --- a/source/funkin/editors/ui/UICheckbox.hx +++ b/source/funkin/editors/ui/UICheckbox.hx @@ -33,7 +33,7 @@ class UICheckbox extends UISprite { pressed = false; // CHECKMARK HANDLING - check.visible = checked; + check.alpha = checked ? 1 : 0; check.scale.x = CoolUtil.fpsLerp(check.scale.x, 1, 0.25); check.scale.y = CoolUtil.fpsLerp(check.scale.y, 1, 0.25); @@ -44,6 +44,8 @@ class UICheckbox extends UISprite { } public inline function updatePositions() { + check.cameras = field.cameras = cameras; + field.setPosition(x + 30, y); check.setPosition(x, y); }