From be95f5a298723fd3c12804947e88a09c7ad3df5d Mon Sep 17 00:00:00 2001
From: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Date: Mon, 1 Mar 2021 18:59:51 -0500
Subject: [PATCH] freeplay menu polish thingie

---
 source/FreeplayState.hx | 10 +++++++++-
 source/HealthIcon.hx    | 13 +++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx
index d00b40264..464ba7452 100644
--- a/source/FreeplayState.hx
+++ b/source/FreeplayState.hx
@@ -34,7 +34,7 @@ class FreeplayState extends MusicBeatState
 
 		for (i in 0...initSonglist.length)
 		{
-			songs.push(new SongMetadata(initSonglist[i], 1, 'dad'));
+			songs.push(new SongMetadata(initSonglist[i], 1, 'gf'));
 		}
 
 		/* 
@@ -51,6 +51,9 @@ class FreeplayState extends MusicBeatState
 		isDebug = true;
 		#end
 
+		if (StoryMenuState.weekUnlocked[2] || isDebug)
+			addWeek(['Bopeebo', 'Fresh', 'Dadbattle'], 1, ['dad']);
+
 		if (StoryMenuState.weekUnlocked[2] || isDebug)
 			addWeek(['Spookeez', 'South', 'Monster'], 2, ['spooky']);
 
@@ -82,6 +85,11 @@ class FreeplayState extends MusicBeatState
 			songText.isMenuItem = true;
 			songText.targetY = i;
 			grpSongs.add(songText);
+
+			var icon:HealthIcon = new HealthIcon(songs[i].songCharacter);
+			icon.sprTracker = songText;
+			add(icon);
+
 			// songText.x += 40;
 			// DONT PUT X IN THE FIRST PARAMETER OF new ALPHABET() !!
 			// songText.screenCenter(X);
diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx
index a7c71578a..ff967e990 100644
--- a/source/HealthIcon.hx
+++ b/source/HealthIcon.hx
@@ -4,6 +4,11 @@ import flixel.FlxSprite;
 
 class HealthIcon extends FlxSprite
 {
+	/**
+	 * Used for FreeplayState! If you use it elsewhere, prob gonna annoying
+	 */
+	public var sprTracker:FlxSprite;
+
 	public function new(char:String = 'bf', isPlayer:Bool = false)
 	{
 		super();
@@ -32,4 +37,12 @@ class HealthIcon extends FlxSprite
 		animation.play(char);
 		scrollFactor.set();
 	}
+
+	override function update(elapsed:Float)
+	{
+		super.update(elapsed);
+
+		if (sprTracker != null)
+			setPosition(sprTracker.x + sprTracker.width + 10, sprTracker.y - 30);
+	}
 }