merge it into master

This commit is contained in:
Kade M 2021-06-21 02:37:23 -07:00
parent 31fcb2575b
commit ff472ca6e8
3 changed files with 29 additions and 6 deletions

View File

@ -44,8 +44,14 @@ class Alphabet extends FlxSpriteGroup
var isBold:Bool = false; var isBold:Bool = false;
var pastX:Float = 0;
var pastY:Float = 0;
public function new(x:Float, y:Float, text:String = "", ?bold:Bool = false, typed:Bool = false, shouldMove:Bool = false) public function new(x:Float, y:Float, text:String = "", ?bold:Bool = false, typed:Bool = false, shouldMove:Bool = false)
{ {
pastX = x;
pastY = y;
super(x, y); super(x, y);
_finalText = text; _finalText = text;
@ -66,6 +72,24 @@ class Alphabet extends FlxSpriteGroup
} }
} }
public function reType(text)
{
for (i in listOAlphabets)
remove(i);
_finalText = text;
this.text = text;
lastSprite = null;
updateHitbox();
listOAlphabets.clear();
x = pastX;
y = pastY;
addText();
}
public function addText() public function addText()
{ {
doSplitWords(); doSplitWords();

View File

@ -312,7 +312,7 @@ class Judgement extends Option
FlxG.save.data.frames = Conductor.safeFrames; FlxG.save.data.frames = Conductor.safeFrames;
Conductor.recalculateTimings(); Conductor.recalculateTimings();
return true; return false;
} }
override function getValue():String { override function getValue():String {
@ -370,6 +370,7 @@ class ScoreScreen extends Option
public override function press():Bool public override function press():Bool
{ {
FlxG.save.data.scoreScreen = !FlxG.save.data.scoreScreen; FlxG.save.data.scoreScreen = !FlxG.save.data.scoreScreen;
display = updateDisplay();
return true; return true;
} }

View File

@ -214,10 +214,8 @@ class OptionsMenu extends MusicBeatState
if (isCat) if (isCat)
{ {
if (currentSelectedCat.getOptions()[curSelected].press()) { if (currentSelectedCat.getOptions()[curSelected].press()) {
grpControls.remove(grpControls.members[curSelected]); grpControls.members[curSelected].reType(currentSelectedCat.getOptions()[curSelected].getDisplay());
var ctrl:Alphabet = new Alphabet(0, (70 * curSelected) + 30, currentSelectedCat.getOptions()[curSelected].getDisplay(), true, false); trace(currentSelectedCat.getOptions()[curSelected].getDisplay());
ctrl.isMenuItem = true;
grpControls.add(ctrl);
} }
} }
else else
@ -236,7 +234,7 @@ class OptionsMenu extends MusicBeatState
curSelected = 0; curSelected = 0;
} }
changeSelection(curSelected); changeSelection();
} }
} }
FlxG.save.flush(); FlxG.save.flush();