From d55c0bf45ee872989e4efc7a6d2948e01eafd89f Mon Sep 17 00:00:00 2001 From: Kade M Date: Mon, 24 May 2021 18:26:44 -0700 Subject: [PATCH] polish --- source/OptionsMenu.hx | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 3142805..448b1ef 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -1,5 +1,7 @@ package; +import flixel.tweens.FlxEase; +import flixel.tweens.FlxTween; import openfl.Lib; import Options; import Controls.Control; @@ -26,9 +28,9 @@ class OptionsMenu extends MusicBeatState new GhostTapOption("Ghost Tapping is when you tap a direction and it doesn't give you a miss."), new Judgement("Customize your Hit Timings (LEFT or RIGHT)"), #if desktop - new FPSCapOption("Cap your FPS (Left for -10, Right for +10. SHIFT to go faster)"), + new FPSCapOption("Cap your FPS"), #end - new ScrollSpeedOption("Change your scroll speed (Left for -0.1, right for +0.1. If it's at 1, it will be chart dependent)"), + new ScrollSpeedOption("Change your scroll speed (1 = Chart dependent)"), new AccuracyDOption("Change how accuracy is calculated. (Accurate = Simple, Complex = Milisecond Based)"), new ResetButtonOption("Toggle pressing R to gameover."), // new OffsetMenu("Get a note offset based off of your inputs!"), @@ -37,7 +39,7 @@ class OptionsMenu extends MusicBeatState new OptionCatagory("Appearance", [ #if desktop new DistractionsAndEffectsOption("Toggle stage distractions that can hinder your gameplay."), - new RainbowFPSOption("Make the FPS Counter Rainbow (Only works with the FPS Counter toggled on and Flashing Lights toggled off)"), + new RainbowFPSOption("Make the FPS Counter Rainbow"), new AccuracyOption("Display accuracy information."), new NPSDisplayOption("Shows your current Notes Per Second."), new SongPositionOption("Show the songs current position (as a bar)"), @@ -63,7 +65,7 @@ class OptionsMenu extends MusicBeatState public static var versionShit:FlxText; var currentSelectedCat:OptionCatagory; - + var blackBorder:FlxSprite; override function create() { var menuBG:FlxSprite = new FlxSprite().loadGraphic(Paths.image("menuDesat")); @@ -89,11 +91,20 @@ class OptionsMenu extends MusicBeatState currentDescription = "none"; - versionShit = new FlxText(5, FlxG.height - 18, 0, "Offset (Left, Right): " + FlxG.save.data.offset + " - Description - " + currentDescription, 12); + versionShit = new FlxText(5, FlxG.height + 40, 0, "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription, 12); versionShit.scrollFactor.set(); versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); + + blackBorder = new FlxSprite(-30,FlxG.height + 40).makeGraphic((Std.int(versionShit.width + 900)),Std.int(versionShit.height + 600),FlxColor.BLACK); + blackBorder.alpha = 0.5; + + add(blackBorder); + add(versionShit); + FlxTween.tween(versionShit,{y: FlxG.height - 18},2,{ease: FlxEase.elasticInOut}); + FlxTween.tween(blackBorder,{y: FlxG.height - 18},2, {ease: FlxEase.elasticInOut}); + super.create(); } @@ -127,6 +138,7 @@ class OptionsMenu extends MusicBeatState if (isCat) { + if (currentSelectedCat.getOptions()[curSelected].getAccept()) { if (FlxG.keys.pressed.SHIFT) @@ -159,8 +171,12 @@ class OptionsMenu extends MusicBeatState else if (FlxG.keys.pressed.LEFT) FlxG.save.data.offset -= 0.1; - versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; + } + if (currentSelectedCat.getOptions()[curSelected].getAccept()) + versionShit.text = currentSelectedCat.getOptions()[curSelected].getValue() + " - Description - " + currentDescription; + else + versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; } else { @@ -175,8 +191,6 @@ class OptionsMenu extends MusicBeatState FlxG.save.data.offset += 0.1; else if (FlxG.keys.pressed.LEFT) FlxG.save.data.offset -= 0.1; - - versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; } @@ -234,8 +248,15 @@ class OptionsMenu extends MusicBeatState currentDescription = currentSelectedCat.getOptions()[curSelected].getDescription(); else currentDescription = "Please select a category"; - versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; - + if (isCat) + { + if (currentSelectedCat.getOptions()[curSelected].getAccept()) + versionShit.text = currentSelectedCat.getOptions()[curSelected].getValue() + " - Description - " + currentDescription; + else + versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; + } + else + versionShit.text = "Offset (Left, Right, Shift for slow): " + HelperFunctions.truncateFloat(FlxG.save.data.offset,2) + " - Description - " + currentDescription; // selector.y = (70 * curSelected) + 30; var bullShit:Int = 0; @@ -255,4 +276,4 @@ class OptionsMenu extends MusicBeatState } } } -} \ No newline at end of file +}