Merge pull request #174 from FNF-CNE-Devs/revert-171-main

Revert "Add a setter for the text variable of the Alphabet class"
This commit is contained in:
lunarcleint
2023-07-04 00:45:13 -07:00
committed by GitHub
2 changed files with 14 additions and 21 deletions
@@ -35,4 +35,4 @@ class FramerateCounter extends Sprite {
fpsLabel.x = fpsNum.x + fpsNum.width;
fpsLabel.y = (fpsNum.y + fpsNum.height) - fpsLabel.height;
}
}
}
+13 -20
View File
@@ -23,7 +23,7 @@ class Alphabet extends FlxSpriteGroup
public var targetY:Float = 0;
public var isMenuItem:Bool = false;
public var text(default, set):String = "";
public var text:String = "";
var _finalText:String = "";
var _curText:String = "";
@@ -51,24 +51,6 @@ class Alphabet extends FlxSpriteGroup
return super.set_color(c);
}
private function set_text(v:String):String {
text = v;
while (members.length > 0) {
var character = members[0];
remove(character, true);
character.destroy();
}
if (text != "") {
if (typed)
startTypedText();
else
addText();
}
return v;
}
// TODO: fix this shit refreshing
public function refreshAlphabetXML(path:String) {
AlphaCharacter.__alphaPath = path;
@@ -102,6 +84,7 @@ class Alphabet extends FlxSpriteGroup
{
super(x, y);
_finalText = this.text = text;
isBold = bold;
var alphabetPath = Paths.xml("alphabet");
@@ -128,7 +111,17 @@ class Alphabet extends FlxSpriteGroup
}
#end
_finalText = this.text = text;
if (text != "")
{
if (typed)
{
startTypedText();
}
else
{
addText();
}
}
}
public function addText()