From 606d09a4e811a37f0e4f9090a4c2df4242d0f185 Mon Sep 17 00:00:00 2001 From: DrPerkyLegit <116128211+DrPerkyLegit@users.noreply.github.com> Date: Fri, 26 Jun 2026 18:37:56 -0400 Subject: [PATCH] colored boss name --- Minecraft.Client/Common/UI/UIScene_HUD.cpp | 32 ++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/Common/UI/UIScene_HUD.cpp b/Minecraft.Client/Common/UI/UIScene_HUD.cpp index ddf35350..0102ea75 100644 --- a/Minecraft.Client/Common/UI/UIScene_HUD.cpp +++ b/Minecraft.Client/Common/UI/UIScene_HUD.cpp @@ -32,6 +32,17 @@ UIScene_HUD::UIScene_HUD(int iPad, void *initData, UILayer *parentLayer) : UISce IggyValueSetBooleanRS(&labelPath, 0, "m_bUseHtmlText", true); } + //enable colors for boss bar + { + IggyValuePath classPath; + IggyValuePathMakeNameRef(&classPath, m_rootPath, "m_DragonHealthBar"); + + IggyValuePath labelPath; + IggyValuePathMakeNameRef(&labelPath, &classPath, "m_DragonHealthLabel"); + + IggyValueSetBooleanRS(&labelPath, 0, "m_bUseHtmlText", true); + } + for(unsigned int i = 0; i < CHAT_LINES_COUNT; ++i) { m_labelChatText[i].init(L""); @@ -285,6 +296,17 @@ void UIScene_HUD::handleReload() IggyValueSetBooleanRS(&labelPath, 0, "m_bUseHtmlText", true); } + //enable colors for boss bar + { + IggyValuePath classPath; + IggyValuePathMakeNameRef(&classPath, m_rootPath, "m_DragonHealthBar"); + + IggyValuePath labelPath; + IggyValuePathMakeNameRef(&labelPath, &classPath, "m_DragonHealthLabel"); + + IggyValueSetBooleanRS(&labelPath, 0, "m_bUseHtmlText", true); + } + for(unsigned int i = 0; i < CHAT_LINES_COUNT; ++i) { m_labelChatText[i].init(L""); @@ -591,11 +613,17 @@ void UIScene_HUD::SetDragonHealth(float health) void UIScene_HUD::SetDragonLabel(const wstring &label) { + wstring itemName = L""; + if (!label.empty()) { + itemName = app.EscapeHTMLString(label); + itemName = app.FormatColoredString(itemName); + } + IggyDataValue result; IggyDataValue value[1]; IggyStringUTF16 stringVal; - stringVal.string = (IggyUTF16*)label.c_str(); - stringVal.length = label.length(); + stringVal.string = (IggyUTF16*)itemName.c_str(); + stringVal.length = itemName.length(); value[0].type = IGGY_DATATYPE_string_UTF16; value[0].string16 = stringVal; IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ), m_funcSetDragonLabel , 1 , value );