From 7a39947b7feb37adac684ac2b61623080eed914a Mon Sep 17 00:00:00 2001 From: Tedyes <159284708+Tedyes@users.noreply.github.com> Date: Sat, 5 Jul 2025 08:04:10 +0800 Subject: [PATCH] a little charter bugfixs and dont show strumlines locks if there no strumline in the chart (#664) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * dbssdbihsadibjsdainbi * g * a little charter fixs * Update README.md * ihateyou GitHub * there --------- Co-authored-by: ⍚~Nex <87421482+NexIsDumb@users.noreply.github.com> --- source/funkin/editors/charter/Charter.hx | 7 +++++-- source/funkin/editors/charter/CharterStrumlineButton.hx | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 83985370..860ba63c 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -609,7 +609,7 @@ class Charter extends UIState { // Just for now until i add event stacking -lunar try {__relinkUndos();} catch (e) {Logs.trace('Failed to relink undos: ${Std.string(e)}', ERROR);} - + __applyPlaytestInfo(); } @@ -1282,8 +1282,11 @@ class Charter extends UIState { for(id=>str in strumLines.members) if (str != null) str.y = strumlineInfoBG.y; + strumlineAddButton.x = 0; strumlineAddButton.y = strumlineInfoBG.y; strumlineLockButton.y = strumlineInfoBG.y; + + strumlineLockButton.text.visible = strumlineLockButton.button.selectable = strumlineLockButton.button.visible = (strumLines.members.length != 0) ? true : false; } var zoom(default, set):Float = 0; @@ -1641,7 +1644,7 @@ class Charter extends UIState { t.icon = (Options.charterLowDetailWaveforms = !Options.charterLowDetailWaveforms) ? 1 : 0; for (shader in waveformHandler.waveShaders) shader.data.lowDetail.value = [Options.charterLowDetailWaveforms]; } - + inline function _snap_increasesnap(_) changequant(1); inline function _snap_decreasesnap(_) changequant(-1); inline function _snap_resetsnap(_) setquant(16); diff --git a/source/funkin/editors/charter/CharterStrumlineButton.hx b/source/funkin/editors/charter/CharterStrumlineButton.hx index c5619330..016f0eb2 100644 --- a/source/funkin/editors/charter/CharterStrumlineButton.hx +++ b/source/funkin/editors/charter/CharterStrumlineButton.hx @@ -58,8 +58,8 @@ class CharterStrumlineButton extends UISprite { super.update(elapsed); - UIState.state.updateSpriteRect(button); - if(UIState.state.curContextMenu == null && UIState.state.isOverlapping(button, button.__rect)) { + if (UIState.state.curContextMenu == null && UIState.state.isOverlapping(button, button.__rect) && button.visible) { + UIState.state.updateSpriteRect(button); buttonScale.set(0.95, 0.95); if (FlxG.mouse.justPressed && onClick != null) { onClick();