clean menus

This commit is contained in:
Yoshman29
2023-03-14 19:36:30 +01:00
parent 758a02c379
commit b35b8b2a33
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -1 +1 @@
2495
2498
+6
View File
@@ -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));
+3 -1
View File
@@ -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);
}