FIX DUMB BUG WITH BUTTONS
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user