Skip to content

Commit

Permalink
[HaCreator] fix prior commit -- mob name tooltip uses white
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Nov 25, 2024
1 parent 76a1486 commit 463fe11
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions HaCreator/MapSimulator/MapSimulatorLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,9 @@ public static MobItem CreateMobFromProperty(TexturePool texturePool, MobInstance
}
}

System.Drawing.Color color_foreGround = System.Drawing.Color.White; // mob foreground color
NameTooltipItem nameTooltip = MapSimulatorLoader.CreateNPCMobNameTooltip(
mobInstance.MobInfo.Name, mobInstance.X, mobInstance.Y,
mobInstance.MobInfo.Name, mobInstance.X, mobInstance.Y, color_foreGround,
texturePool, UserScreenScaleFactor, device);

return new MobItem(mobInstance, frames, nameTooltip);
Expand Down Expand Up @@ -478,8 +479,9 @@ public static NpcItem CreateNpcFromProperty(TexturePool texturePool, NpcInstance
}
}
}
System.Drawing.Color color_foreGround = System.Drawing.Color.FromArgb(255, 255, 255, 0); // gold npc foreground color
NameTooltipItem nameTooltip = MapSimulatorLoader.CreateNPCMobNameTooltip(
npcInstance.NpcInfo.Name, npcInstance.X, npcInstance.Y,
npcInstance.NpcInfo.Name, npcInstance.X, npcInstance.Y, color_foreGround,
texturePool, UserScreenScaleFactor, device);
return new NpcItem(npcInstance, frames, nameTooltip);
}
Expand Down Expand Up @@ -1097,15 +1099,17 @@ public static TooltipItem CreateTooltipFromProperty(TexturePool texturePool, flo
/// <param name="renderText"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="color_foreGround"></param>
/// <param name="texturePool"></param>
/// <param name="UserScreenScaleFactor"></param>
/// <param name="device"></param>
/// <returns></returns>
public static NameTooltipItem CreateNPCMobNameTooltip(string renderText, int x, int y, TexturePool texturePool, float UserScreenScaleFactor, GraphicsDevice device)
public static NameTooltipItem CreateNPCMobNameTooltip(string renderText, int x, int y, System.Drawing.Color color_foreGround,
TexturePool texturePool, float UserScreenScaleFactor, GraphicsDevice device)
{
//System.Drawing.Color color_bgFill = System.Drawing.Color.FromArgb(230, 17, 54, 82); // pre V patch (dark blue theme used post-bb), leave this here in case someone needs it
System.Drawing.Color color_bgFill = System.Drawing.Color.FromArgb(200, 17, 17, 17); // post V patch (dark black theme used), use color picker on paint via image extracted from WZ if you need to get it
System.Drawing.Color color_foreGround = System.Drawing.Color.FromArgb(255, 255, 255, 0); // gold

const int WIDTH_PADDING = 6; // use even numbers or it gets odd
const int HEIGHT_PADDING = 2;

Expand Down

0 comments on commit 463fe11

Please sign in to comment.