From b047eb7a723d5ad27f27e7cc6a735321a4f67dac Mon Sep 17 00:00:00 2001 From: Kade M Date: Mon, 24 May 2021 19:46:07 -0700 Subject: [PATCH] more fixes and other crap --- source/Alphabet.hx | 9 ++++++++- source/FreeplayState.hx | 2 +- source/Options.hx | 2 +- source/OptionsMenu.hx | 2 +- source/PlayState.hx | 29 ++++++++++++++++------------- 5 files changed, 27 insertions(+), 17 deletions(-) diff --git a/source/Alphabet.hx b/source/Alphabet.hx index c16de50..56d07e2 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -1,5 +1,7 @@ package; +import flixel.tweens.FlxEase; +import flixel.tweens.FlxTween; import flixel.FlxG; import flixel.FlxSprite; import flixel.graphics.frames.FlxAtlasFrames; @@ -36,11 +38,13 @@ class Alphabet extends FlxSpriteGroup var xPosResetted:Bool = false; var lastWasSpace:Bool = false; + var listOAlphabets:List = new List(); + var splitWords:Array = []; var isBold:Bool = false; - public function new(x:Float, y:Float, text:String = "", ?bold:Bool = false, typed:Bool = false) + public function new(x:Float, y:Float, text:String = "", ?bold:Bool = false, typed:Bool = false, shouldMove:Bool = false) { super(x, y); @@ -58,6 +62,7 @@ class Alphabet extends FlxSpriteGroup { addText(); } + } } @@ -93,6 +98,7 @@ class Alphabet extends FlxSpriteGroup // var letter:AlphaCharacter = new AlphaCharacter(30 * loopNum, 0); var letter:AlphaCharacter = new AlphaCharacter(xPos, 0); + listOAlphabets.add(letter); if (isBold) letter.createBold(character); @@ -178,6 +184,7 @@ class Alphabet extends FlxSpriteGroup // var letter:AlphaCharacter = new AlphaCharacter(30 * loopNum, 0); var letter:AlphaCharacter = new AlphaCharacter(xPos, 55 * yMulti); + listOAlphabets.add(letter); letter.row = curRow; if (isBold) { diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 53af317..97366d3 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -76,7 +76,7 @@ class FreeplayState extends MusicBeatState for (i in 0...songs.length) { - var songText:Alphabet = new Alphabet(0, (70 * i) + 30, songs[i].songName, true, false); + var songText:Alphabet = new Alphabet(0, (70 * i) + 30, songs[i].songName, true, false, true); songText.isMenuItem = true; songText.targetY = i; grpSongs.add(songText); diff --git a/source/Options.hx b/source/Options.hx index f3a1473..6b324d5 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -302,7 +302,7 @@ class Judgement extends Option } override function getValue():String { - return Conductor.safeFrames + " - " + + return "Safe Frames: " + Conductor.safeFrames + " - SIK: " + HelperFunctions.truncateFloat(45 * Conductor.timeScale, 0) + "ms GD: " + HelperFunctions.truncateFloat(90 * Conductor.timeScale, 0) + "ms BD: " + HelperFunctions.truncateFloat(135 * Conductor.timeScale, 0) + diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 5156348..3526ccc 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -83,7 +83,7 @@ class OptionsMenu extends MusicBeatState for (i in 0...options.length) { - var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, options[i].getName(), true, false); + var controlLabel:Alphabet = new Alphabet(0, (70 * i) + 30, options[i].getName(), true, false, true); controlLabel.isMenuItem = true; controlLabel.targetY = i; grpControls.add(controlLabel); diff --git a/source/PlayState.hx b/source/PlayState.hx index 7b31a0a..8b8f567 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2288,21 +2288,24 @@ class PlayState extends MusicBeatState dad.playAnim('singLEFT' + altAnim, true); } - cpuStrums.forEach(function(spr:FlxSprite) + if (FlxG.save.data.cpuStrums) { - if (Math.abs(daNote.noteData) == spr.ID) + cpuStrums.forEach(function(spr:FlxSprite) { - spr.animation.play('confirm', true); - } - if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) - { - spr.centerOffsets(); - spr.offset.x -= 13; - spr.offset.y -= 13; - } - else - spr.centerOffsets(); - }); + if (Math.abs(daNote.noteData) == spr.ID) + { + spr.animation.play('confirm', true); + } + if (spr.animation.curAnim.name == 'confirm' && !curStage.startsWith('school')) + { + spr.centerOffsets(); + spr.offset.x -= 13; + spr.offset.y -= 13; + } + else + spr.centerOffsets(); + }); + } #if windows if (luaModchart != null)