From fb5f5ef5cda814a81c953dd3a31dbc6a683ef416 Mon Sep 17 00:00:00 2001 From: NitrogenDioxide <45130240+Kiffolisk@users.noreply.github.com> Date: Wed, 10 Mar 2021 09:23:20 +0100 Subject: [PATCH 1/3] accuracy display shits --- source/OptionsMenu.hx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 1678f41..d5b7b56 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -32,9 +32,12 @@ class OptionsMenu extends MusicBeatState if (FlxG.save.data.dfjk == null) FlxG.save.data.dfjk = false; + + if (FlxG.save.data.accuracyDisplay == null) + FlxG.save.data.accuracyDisplay = true; var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image('menuDesat')); - controlsStrings = CoolUtil.coolStringFile((FlxG.save.data.dfjk ? 'DFJK' : 'WASD') + "\n" + (FlxG.save.data.newInput ? "New input" : "Old Input") + "\n" + (FlxG.save.data.downscroll ? 'Downscroll' : 'Upscroll') + "\nLoad replays"); + controlsStrings = CoolUtil.coolStringFile((FlxG.save.data.dfjk ? 'DFJK' : 'WASD') + "\n" + (FlxG.save.data.newInput ? "New input" : "Old Input") + "\n" + (FlxG.save.data.downscroll ? 'Downscroll' : 'Upscroll') + "\nToggle accuracy display " + (FlxG.save.data.accuracyDisplay ? "off" : "on") + "\nLoad replays"); trace(controlsStrings); @@ -120,6 +123,12 @@ class OptionsMenu extends MusicBeatState ctrl.targetY = curSelected - 2; grpControls.add(ctrl); case 3: + FlxG.save.data.accuracyDisplay = !FlxG.save.data.accuracyDisplay; + var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, "Toggle accuracy display " + (FlxG.save.data.accuracyDisplay ? "off" : "on"), true, false) + ctrl.isMenuItem = true; + ctrl.targetY = curSelected - 3; + grpControls.add(ctrl); + case 4: trace('switch'); FlxG.switchState(new LoadReplayState()); } From 5e59c97909a8c582e1ed030ed72d92cfb42c7cd8 Mon Sep 17 00:00:00 2001 From: NitrogenDioxide <45130240+Kiffolisk@users.noreply.github.com> Date: Wed, 10 Mar 2021 09:29:09 +0100 Subject: [PATCH 2/3] accuracy display shits lol im pretty dumb so idk if this works --- source/PlayState.hx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/PlayState.hx b/source/PlayState.hx index 3ce4a69..2d4f0a5 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1336,8 +1336,14 @@ class PlayState extends MusicBeatState super.update(elapsed); - scoreTxt.text = "Score:" + songScore + " | Misses:" + misses + " | Accuracy:" + truncateFloat(accuracy, 2) + "% " + (fc ? "| FC" : misses == 0 ? "| A" : accuracy <= 75 ? "| BAD" : ""); - + if (FlxG.save.data.accuracyDisplay) + { + scoreTxt.text = "Score:" + songScore + " | Misses:" + misses + " | Accuracy:" + truncateFloat(accuracy, 2) + "% " + (fc ? "| FC" : misses == 0 ? "| A" : accuracy <= 75 ? "| BAD" : ""); + } + else + { + scoreTxt.text = "Score:" + songScore); + } if (FlxG.keys.justPressed.ENTER && startedCountdown && canPause) { persistentUpdate = false; From a898c72884ea395589e0340dcf7484b642e0224c Mon Sep 17 00:00:00 2001 From: Kade M Date: Wed, 10 Mar 2021 11:43:34 -0800 Subject: [PATCH 3/3] updated index selection --- source/OptionsMenu.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index d5b7b56..1c21fa7 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -95,7 +95,7 @@ class OptionsMenu extends MusicBeatState if (controls.ACCEPT) { - if (curSelected != 3) + if (curSelected != 4) grpControls.remove(grpControls.members[curSelected]); switch(curSelected) {