Skip to content

Commit 7a39947

Browse files
TedyesNexIsDumb
andauthored
a little charter bugfixs and dont show strumlines locks if there no strumline in the chart (#664)
* dbssdbihsadibjsdainbi * g * a little charter fixs * Update README.md * ihateyou GitHub * there --------- Co-authored-by: ⍚~Nex <[email protected]>
1 parent 07ae6b6 commit 7a39947

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

source/funkin/editors/charter/Charter.hx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ class Charter extends UIState {
609609
// Just for now until i add event stacking -lunar
610610
try {__relinkUndos();}
611611
catch (e) {Logs.trace('Failed to relink undos: ${Std.string(e)}', ERROR);}
612-
612+
613613
__applyPlaytestInfo();
614614
}
615615

@@ -1282,8 +1282,11 @@ class Charter extends UIState {
12821282
for(id=>str in strumLines.members)
12831283
if (str != null) str.y = strumlineInfoBG.y;
12841284

1285+
strumlineAddButton.x = 0;
12851286
strumlineAddButton.y = strumlineInfoBG.y;
12861287
strumlineLockButton.y = strumlineInfoBG.y;
1288+
1289+
strumlineLockButton.text.visible = strumlineLockButton.button.selectable = strumlineLockButton.button.visible = (strumLines.members.length != 0) ? true : false;
12871290
}
12881291

12891292
var zoom(default, set):Float = 0;
@@ -1641,7 +1644,7 @@ class Charter extends UIState {
16411644
t.icon = (Options.charterLowDetailWaveforms = !Options.charterLowDetailWaveforms) ? 1 : 0;
16421645
for (shader in waveformHandler.waveShaders) shader.data.lowDetail.value = [Options.charterLowDetailWaveforms];
16431646
}
1644-
1647+
16451648
inline function _snap_increasesnap(_) changequant(1);
16461649
inline function _snap_decreasesnap(_) changequant(-1);
16471650
inline function _snap_resetsnap(_) setquant(16);

source/funkin/editors/charter/CharterStrumlineButton.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class CharterStrumlineButton extends UISprite {
5858

5959
super.update(elapsed);
6060

61-
UIState.state.updateSpriteRect(button);
62-
if(UIState.state.curContextMenu == null && UIState.state.isOverlapping(button, button.__rect)) {
61+
if (UIState.state.curContextMenu == null && UIState.state.isOverlapping(button, button.__rect) && button.visible) {
62+
UIState.state.updateSpriteRect(button);
6363
buttonScale.set(0.95, 0.95);
6464
if (FlxG.mouse.justPressed && onClick != null) {
6565
onClick();

0 commit comments

Comments
 (0)