From 30b11a2cd6daa8f1185dfc12f04d9778d39d591f Mon Sep 17 00:00:00 2001 From: Frakist <90983918+Frakist@users.noreply.github.com> Date: Sat, 25 Nov 2023 13:40:55 +0200 Subject: [PATCH] fixes --- source/funkin/editors/charter/Charter.hx | 6 ++++-- source/funkin/editors/charter/CharterStrumline.hx | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 0aa884ead..783892d0a 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -592,10 +592,11 @@ class Charter extends UIState { selection = [cast n]; } if (FlxG.mouse.justReleasedRight) { + var mousePos = FlxG.mouse.getPositionInCameraView(charterCamera); if (!selection.contains(cast n)) selection = [cast n]; closeCurrentContextMenu(); - openContextMenu(topMenu[1].childs); + openContextMenu(topMenu[1].childs, null, mousePos.x, mousePos.y); } } }); @@ -745,8 +746,9 @@ class Charter extends UIState { } if (FlxG.mouse.justReleasedRight) { + var mousePos = FlxG.mouse.getPositionInCameraView(charterCamera); closeCurrentContextMenu(); - openContextMenu(topMenu[1].childs); + openContextMenu(topMenu[1].childs, null, mousePos.x, mousePos.y); } } addEventSpr.selectable = !selectionBox.visible; diff --git a/source/funkin/editors/charter/CharterStrumline.hx b/source/funkin/editors/charter/CharterStrumline.hx index d67d5bdc4..8c6488485 100644 --- a/source/funkin/editors/charter/CharterStrumline.hx +++ b/source/funkin/editors/charter/CharterStrumline.hx @@ -53,7 +53,7 @@ class CharterStrumline extends UISprite { button = new CharterStrumlineOptions(this); members.push(button); - vocals = strumLine.vocalsSuffix != "" ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound(); + vocals = strumLine.vocalsSuffix.length > 0 ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound(); vocals.group = FlxG.sound.defaultMusicGroup; } @@ -100,7 +100,7 @@ class CharterStrumline extends UISprite { members.push(healthIcon); vocals = null; - vocals = strumLine.vocalsSuffix != "" ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound(); + vocals = strumLine.vocalsSuffix.length > 0 ? FlxG.sound.load(Paths.voices(PlayState.SONG.meta.name, PlayState.difficulty, strumLine.vocalsSuffix)) : new FlxSound(); vocals.group = FlxG.sound.defaultMusicGroup; } }