diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index ae8da173..88351491 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -763,6 +763,7 @@ class Charter extends UIState { var strID = getStrumlineID(strL); FlxG.state.openSubState(new CharterStrumlineScreen(strID, strL, (_) -> { strumLines.members[strID].strumLine = _; + strumLines.members[strID].updateInfo(); })); } diff --git a/source/funkin/editors/charter/CharterStrumline.hx b/source/funkin/editors/charter/CharterStrumline.hx index 3fa94e77..e2b746a9 100644 --- a/source/funkin/editors/charter/CharterStrumline.hx +++ b/source/funkin/editors/charter/CharterStrumline.hx @@ -39,13 +39,23 @@ class CharterStrumline extends UISprite { } public override function update(elapsed:Float) { - healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, 0); + if (healthIcon != null) + healthIcon.follow(this, ((40 * 4) - healthIcon.width) / 2, 0); button.follow(this, 0, 95); super.update(elapsed); } public function updateInfo() { - // todo + members.remove(healthIcon); + healthIcon.destroy(); + + var icon = Character.getIconFromCharName(strumLine.characters != null ? strumLine.characters[0] : null); + + healthIcon = new HealthIcon(icon); + healthIcon.scale.set(80 / 150, 80 / 150); + healthIcon.updateHitbox(); + healthIcon.alpha = strumLine.visible ? 1 : 0.4; + members.push(healthIcon); } } diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index a60b89c3..3751500f 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -127,6 +127,7 @@ class CharterStrumlineScreen extends UISubstateWindow { (charactersTextBox.y + 16) - (iconSprite.height/2) ); add(iconSprite); + characterIcons.push(iconSprite); } }