From 280d14056e92086dc96d6d68d6691a87fd4a279e Mon Sep 17 00:00:00 2001 From: Sword352 <99792114+Sword352@users.noreply.github.com> Date: Tue, 4 Jul 2023 08:34:03 +0200 Subject: [PATCH] Destroy the characters before setting the new text --- source/funkin/menus/ui/Alphabet.hx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/funkin/menus/ui/Alphabet.hx b/source/funkin/menus/ui/Alphabet.hx index fcc82a34..f147d240 100644 --- a/source/funkin/menus/ui/Alphabet.hx +++ b/source/funkin/menus/ui/Alphabet.hx @@ -53,6 +53,13 @@ class Alphabet extends FlxSpriteGroup 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();