FIX DUMB BUG WITH BUTTONS

This commit is contained in:
lunarcleint
2024-03-21 13:53:15 -07:00
parent 2034e9cedb
commit 1fafc96509
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -432,7 +432,7 @@ class Charter extends UIState {
}
quants.reverse();
strumlineInfoBG = new UISprite();
strumlineInfoBG = new FlxSprite();
strumlineInfoBG.loadGraphic(Paths.image('editors/charter/strumline-info-bg'));
strumlineInfoBG.y = 23;
strumlineInfoBG.scrollFactor.set();
@@ -59,9 +59,9 @@ class CharterStrumlineButton extends UISprite {
super.update(elapsed);
UIState.state.updateSpriteRect(button);
if(UIState.state.isOverlapping(button, button.__rect)) {
if(UIState.state.curContextMenu == null && UIState.state.isOverlapping(button, button.__rect)) {
buttonScale.set(0.95, 0.95);
if (FlxG.mouse.justReleased && onClick != null) {
if (FlxG.mouse.justPressed && onClick != null) {
onClick();
if (animationOnClick) pressAnimation();
}
+1 -1
View File
@@ -96,7 +96,7 @@ class UIContextMenu extends MusicBeatSubstate {
}
public override function update(elapsed:Float) {
if (__oobDeletion && FlxG.mouse.justPressed && !bg.hoveredByChild)
if (__oobDeletion && FlxG.mouse.justReleased && !bg.hoveredByChild)
close();
__oobDeletion = true;
+1 -1
View File
@@ -65,7 +65,7 @@ class UITopMenuButton extends UISliceSprite {
var opened = curMenu != null ? curMenu.contextMenuOpened() : false;
if(opened && FlxG.mouse.justPressed) {
if(opened && FlxG.mouse.justReleased) {
__rect.x = x;
__rect.y = y;
__rect.width = bWidth;