From 38f040504e6bef86e4b37cc034e1d7e7c5c1d4ee Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 11:23:37 +0000 Subject: [PATCH] Maintenance: B4': DrawColoredText/DrawStyledColoredText/DrawOutlinedText/DrawOutlinedColoredText are UIWindow thiscall members in the Batch #18182 by ragnarok-clanker: forced by an admin (6 lower score(s), 45 changed function(s)); checked with 415 compiled unit(s), including every includer of Source/UI/Text/ColoredText.h, Source/UI/Window/UIWindow.h. --- Source/Render/Primitives/ScreenLine.cpp | 4 +- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 2 +- Source/UI/Achievement/UIAchWnd.cpp | 8 ++-- Source/UI/Buttons/UITextButton.cpp | 26 ++++++------- Source/UI/CashShop/UIMileageWnd.cpp | 4 +- Source/UI/Chat/UISubChatHisWnd.cpp | 2 +- Source/UI/Dialogs/UIMessageBox.cpp | 4 +- Source/UI/GameSettings/UIHotKeyWnd.cpp | 4 +- Source/UI/Items/UIChangeMaterialWnd.cpp | 2 +- Source/UI/Items/UIGameItem.cpp | 2 +- Source/UI/Lists/UIListBox.cpp | 2 +- Source/UI/Lists/UIListBoxEx.cpp | 4 +- Source/UI/Lists/UITagListBox.cpp | 8 ++-- Source/UI/Navigation/NavigationLink.cpp | 4 +- Source/UI/Navigation/UIRoMapWnd.cpp | 6 +-- Source/UI/Shop/UIBartermarketWnd.cpp | 8 ++-- Source/UI/Shortcuts/ShortcutCooldowns.cpp | 8 ++-- Source/UI/Shortcuts/UIShortCutWnd.cpp | 14 +++---- Source/UI/Skill/UINewSkillListWnd.cpp | 10 ++--- Source/UI/Text/ColoredText.cpp | 42 ++++++++++----------- Source/UI/Text/ColoredText.h | 19 ---------- Source/UI/Text/UIBalloonText.cpp | 4 +- Source/UI/Text/UIRoundBoxTooltipWnd.cpp | 2 +- Source/UI/Text/UITextViewer.cpp | 6 +-- Source/UI/Text/UITransBalloonText.cpp | 4 +- Source/UI/Window/UIControl.cpp | 12 +++--- Source/UI/Window/UIWindow.cpp | 8 ++-- Source/UI/Window/UIWindow.h | 12 ++++++ 28 files changed, 112 insertions(+), 119 deletions(-) diff --git a/Source/Render/Primitives/ScreenLine.cpp b/Source/Render/Primitives/ScreenLine.cpp index 8102c7b6a..214122247 100644 --- a/Source/Render/Primitives/ScreenLine.cpp +++ b/Source/Render/Primitives/ScreenLine.cpp @@ -409,7 +409,7 @@ void UIRoMapWnd::DrawSelectedMapPreview() { name.resize(name.size() - 4); } - DrawOutlinedText(*this, x + 3, y + 115, name.c_str(), 0, 0xFFFFFF, 0x5C5C5C, 0, 12, 1, 0); + this->DrawOutlinedText(x + 3, y + 115, name.c_str(), 0, 0xFFFFFF, 0x5C5C5C, 0, 12, 1, 0); { std::string path = "유저인터페이스\\map\\"; @@ -419,5 +419,5 @@ void UIRoMapWnd::DrawSelectedMapPreview() { } name = g_session.GetMapDisplayName(this->selectedRecord->name.c_str()); - DrawOutlinedText(*this, x + 3, y + 3, name.c_str(), 0, 0xD2FF, 0, 0, 12, 1, 0); + this->DrawOutlinedText(x + 3, y + 3, name.c_str(), 0, 0xD2FF, 0, 0, 12, 1, 0); } diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 4acd30320..17a450fa8 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -12357,7 +12357,7 @@ void UIExchangeWnd::Paint() { this->DrawBitmap(0, 0, bitmap, false); bitmap = static_cast(ResourceMgr::Instance().Load(Resolve("유저인터페이스\\basic_interface\\exchange_bg2.bmp"))); this->DrawBitmap(0, 17, bitmap, false); - DrawOutlinedText(*this, 123, this->geometry.height - 20, LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE), 0, 0xFF, 0xFFFFFF, 0, 12, 1, 0); + this->DrawOutlinedText(123, this->geometry.height - 20, LookupMessage(MSI_SCREENSHOT_FOR_EXCHANGE), 0, 0xFF, 0xFFFFFF, 0, 12, 1, 0); char title[128]; std::sprintf(title, "%s : ", LookupMessage(MSI_EXCHANGE)); diff --git a/Source/UI/Achievement/UIAchWnd.cpp b/Source/UI/Achievement/UIAchWnd.cpp index 988b5a4a4..fb24c92e4 100644 --- a/Source/UI/Achievement/UIAchWnd.cpp +++ b/Source/UI/Achievement/UIAchWnd.cpp @@ -399,8 +399,8 @@ void UIAchListWnd::Paint() { if (flags[1] == 1) { const std::string date = FormatOwnedString("%4d.%2d.%2d", record.year, record.month, record.day); - DrawOutlinedText( - *this, static_cast(276.0 - this->TextWidth(date.c_str(), 0, 0, 10, 0, 0) * 0.5), this->rowHeight * row + 55, date.c_str(), 0, 0x635AA5, + this->DrawOutlinedText( + static_cast(276.0 - this->TextWidth(date.c_str(), 0, 0, 10, 0, 0) * 0.5), this->rowHeight * row + 55, date.c_str(), 0, 0x635AA5, 0xFFFFFF, 0, 10, 0, 0 ); } @@ -486,7 +486,7 @@ void UIAchTV::Paint() { if (this->outlineColor == 0) { this->DrawTextAt(3, this->lineHeight * row + 4, line.c_str(), line.size(), 0, 12, this->textColor, 0, 0); } else { - DrawOutlinedText(*this, 3, this->lineHeight * row + 4, line.c_str(), line.size(), this->textColor, this->outlineColor, 0, 12, 0, 0); + this->DrawOutlinedText(3, this->lineHeight * row + 4, line.c_str(), line.size(), this->textColor, this->outlineColor, 0, 12, 0, 0); } if (this->underline == 1) { @@ -528,7 +528,7 @@ void UIAchSummaryWnd::Paint() { this->DrawBitmap(x + 12, 360, AchievementBitmap("유저인터페이스\\achievement_re\\list_rewardbox_not_receive.bmp"), true); } - DrawOutlinedText(*this, x - 3, 366, FormatOwnedString("%4d.%2d.%2d", record.year, record.month, record.day).c_str(), 0, 0x635AA5, 0xFFFFFF, 0, 10, 0, 0); + this->DrawOutlinedText(x - 3, 366, FormatOwnedString("%4d.%2d.%2d", record.year, record.month, record.day).c_str(), 0, 0x635AA5, 0xFFFFFF, 0, 10, 0, 0); x += 316; } } diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 2a41c6b2e..8987832b4 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -121,7 +121,7 @@ void UITextButton::Paint() { } if (this->m_outline) { - DrawOutlinedText(*this, 1, 1, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); + this->DrawOutlinedText(1, 1, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); } else { this->DrawTextAt(1, 1, this->m_text.c_str(), 0, this->m_family, this->m_height, this->m_color, 0, 0); } @@ -1537,7 +1537,7 @@ void UITVTextButton::Paint() { } if (this->m_outlined != 0) { - DrawOutlinedText(*this, inset + 1, 2, this->displayText.c_str(), 0, color, this->m_outlineColor, this->m_fontFamily, this->m_fontHeight, 1, 0); + this->DrawOutlinedText(inset + 1, 2, this->displayText.c_str(), 0, color, this->m_outlineColor, this->m_fontFamily, this->m_fontHeight, 1, 0); } else { this->DrawTextAt(inset + 1, 2, this->displayText.c_str(), 0, this->m_fontFamily, this->m_fontHeight, color, 0, 0); } @@ -1861,7 +1861,7 @@ void UIItemMoveInfo::Paint() { } if (this->m_outline != 0) { - DrawOutlinedText(*this, 1, 1, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); + this->DrawOutlinedText(1, 1, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); } else { this->DrawTextAt(1, 1, this->m_text.c_str(), 0, this->m_family, this->m_height, this->m_color, 0, 0); } @@ -1881,7 +1881,7 @@ void UIItemTagButton::Paint() { } if (this->m_outline != 0) { - DrawOutlinedText(*this, 1, this->textY, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); + this->DrawOutlinedText(1, this->textY, this->m_text.c_str(), 0, this->m_color, this->m_outlineColor, this->m_family, this->m_height, 1, 0); } else { this->DrawTextAt(1, this->textY, this->m_text.c_str(), 0, this->m_family, this->m_height, this->m_color, 0, 0); } @@ -1918,7 +1918,7 @@ void UIListBoxNavi::Paint() { } const auto& line = this->lines[index]; - DrawColoredText(*this, 3 - this->horizontalOffset, this->lineHeight * row, line.c_str(), static_cast(line.size()), color, 0, 12, false); + this->DrawColoredText(3 - this->horizontalOffset, this->lineHeight * row, line.c_str(), static_cast(line.size()), color, 0, 12, false); if (this->lineColors[index] == 1) { color = 0; @@ -3009,8 +3009,8 @@ void UIListBoxID::Paint() { this->FillRegion(0, (index - first) * this->lineHeight, this->geometry.width, this->lineHeight - 1, this->selectionColor); } - DrawColoredText( - *this, 3 - this->horizontalOffset, (index - first) * this->lineHeight, this->lines[index].text.c_str(), + this->DrawColoredText( + 3 - this->horizontalOffset, (index - first) * this->lineHeight, this->lines[index].text.c_str(), static_cast(this->lines[index].text.size()), color, 0, 12, false ); } @@ -3046,8 +3046,8 @@ void UIListBoxTitle::Paint() { } } - DrawColoredText( - *this, 3 - this->horizontalOffset, (index - first) * this->lineHeight, this->lines[index].text.c_str(), + this->DrawColoredText( + 3 - this->horizontalOffset, (index - first) * this->lineHeight, this->lines[index].text.c_str(), static_cast(this->lines[index].text.size()), color, 0, 12, false ); } @@ -3163,8 +3163,8 @@ void UIListBox2::Paint() { } const std::string& line = this->lines[index]; - DrawStyledColoredText( - *this, x, y, line.c_str(), static_cast(line.size()), color, this->fontFamily, this->fontHeight, this->bold, this->italic, false + this->DrawStyledColoredText( + x, y, line.c_str(), static_cast(line.size()), color, this->fontFamily, this->fontHeight, this->bold, this->italic, false ); } } @@ -3488,9 +3488,9 @@ void UIString::Paint() { while (cur < end) { cur = ParseColorCode(SegmentEnd(cur, end), color); } - DrawColoredText(*this, 24, 7, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); + this->DrawColoredText(24, 7, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); } else { - DrawColoredText(*this, 0, 0, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); + this->DrawColoredText(0, 0, this->text.c_str(), static_cast(this->text.size()), color, 0, 12, false); } } diff --git a/Source/UI/CashShop/UIMileageWnd.cpp b/Source/UI/CashShop/UIMileageWnd.cpp index e0e220be6..664bd4398 100644 --- a/Source/UI/CashShop/UIMileageWnd.cpp +++ b/Source/UI/CashShop/UIMileageWnd.cpp @@ -57,11 +57,11 @@ void UIMileageWnd::Paint() { } int textWidth = this->TextWidth(text.c_str(), 0, 0, 12, 0, 0); - DrawOutlinedText(*this, (this->geometry.width - textWidth) >> 1, 15, text.c_str(), 0, 0xFFFFFF, 0, 0, 12, 0, 0); + this->DrawOutlinedText((this->geometry.width - textWidth) >> 1, 15, text.c_str(), 0, 0xFFFFFF, 0, 0, 12, 0, 0); text = FormatOwnedString("%d", this->m_point).c_str(); textWidth = this->TextWidth(text.c_str(), 0, 0, 12, 0, 0); - DrawOutlinedText(*this, this->geometry.width - textWidth - 9, this->geometry.height - 16, text.c_str(), 0, 0xFFFFFF, 0, 0, 12, 0, 0); + this->DrawOutlinedText(this->geometry.width - textWidth - 9, this->geometry.height - 16, text.c_str(), 0, 0xFFFFFF, 0, 0, 12, 0, 0); } // OFFSET: 0x0094EE70 diff --git a/Source/UI/Chat/UISubChatHisWnd.cpp b/Source/UI/Chat/UISubChatHisWnd.cpp index c5dcf5402..90cd3d4df 100644 --- a/Source/UI/Chat/UISubChatHisWnd.cpp +++ b/Source/UI/Chat/UISubChatHisWnd.cpp @@ -95,7 +95,7 @@ void UISubChatHisWnd::Paint() { this->ClearSurface(0xFFFF00FF); std::uint32_t color = 0xFFFFFF; this->DrawTextAt(5, 4, this->m_name.c_str(), 0, 0, 12, 0, 0, 0); - DrawColoredText(*this, 4, 3, this->m_name.c_str(), 0, color, 0, 12, false); + this->DrawColoredText(4, 3, this->m_name.c_str(), 0, color, 0, 12, false); this->FillRegion(2, 0, this->m_inputWidth - 5, 1, color); this->FillRegion(1, 1, 1, 1, color); this->FillRegion(0, 2, 1, this->geometry.height - 4, color); diff --git a/Source/UI/Dialogs/UIMessageBox.cpp b/Source/UI/Dialogs/UIMessageBox.cpp index a3e931068..670254393 100644 --- a/Source/UI/Dialogs/UIMessageBox.cpp +++ b/Source/UI/Dialogs/UIMessageBox.cpp @@ -1474,8 +1474,8 @@ void UIReplayRECControlWnd::Paint() { DrawFilledRoundedBorder(*this, 0, 34, this->geometry.width, this->geometry.height - 34, 0xDEDEDE); DrawFilledRoundedBorder(*this, 4, 38, this->geometry.width - 8, 95, 0xFFFFFF); DrawFilledRoundedBorder(*this, 4, 138, this->geometry.width - 8, 57, 0xFFFFFF); - DrawOutlinedText(*this, 10, 42, LookupMessage(MSI_REPLAY_SETREPLAYSAVEDATA), 0, 0x7F3C00, 0xFFFFFF, 0, 12, 1, 0); - DrawOutlinedText(*this, 10, 142, LookupMessage(MSI_REPLAY_SETRECOPTION), 0, 0x7F3C00, 0xFFFFFF, 0, 12, 1, 0); + this->DrawOutlinedText(10, 42, LookupMessage(MSI_REPLAY_SETREPLAYSAVEDATA), 0, 0x7F3C00, 0xFFFFFF, 0, 12, 1, 0); + this->DrawOutlinedText(10, 142, LookupMessage(MSI_REPLAY_SETRECOPTION), 0, 0x7F3C00, 0xFFFFFF, 0, 12, 1, 0); } } diff --git a/Source/UI/GameSettings/UIHotKeyWnd.cpp b/Source/UI/GameSettings/UIHotKeyWnd.cpp index 92b25b340..a6aba0557 100644 --- a/Source/UI/GameSettings/UIHotKeyWnd.cpp +++ b/Source/UI/GameSettings/UIHotKeyWnd.cpp @@ -451,11 +451,11 @@ void UIHotKeyWnd::Paint() { (this->m_prevButton->geometry.width - pagesWidth + 60) / 2 + this->m_prevButton->geometry.x; text = static_cast(FormatOwnedString("%d", this->m_page)); - DrawOutlinedText(*this, pageX, 25, text.c_str(), 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(pageX, 25, text.c_str(), 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); const int currentWidth = this->TextWidth(text.c_str(), 0, 0, 12, 0, 0); text = static_cast(FormatOwnedString(" / %d", this->m_pageCount)); - DrawOutlinedText(*this, pageX + currentWidth, 25, text.c_str(), 0, 0x666666, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(pageX + currentWidth, 25, text.c_str(), 0, 0x666666, 0xFFFFFF, 0, 11, 1, 0); } const int bottomY = this->m_titleHeight + this->m_tabHeight + this->m_verticalMargin; diff --git a/Source/UI/Items/UIChangeMaterialWnd.cpp b/Source/UI/Items/UIChangeMaterialWnd.cpp index 49519c2dd..ff8b30915 100644 --- a/Source/UI/Items/UIChangeMaterialWnd.cpp +++ b/Source/UI/Items/UIChangeMaterialWnd.cpp @@ -550,7 +550,7 @@ void UIChangeMaterialWnd::Paint() { { const std::string amount = FormatOwnedString(LookupMessage(MSI_IQ_POWERFUL_FAITH_OFF), this->m_resultAmount / 10); const int width = this->TextWidth(amount.c_str(), 0, 0x1D, 0x17, 1, 0); - DrawOutlinedText(*this, 0x4F + (0xC8 - width) / 2, 0x64, amount.c_str(), 0, 0x5082DC, 0x643C00, 0x1D, 0x17, 1, 0); + this->DrawOutlinedText(0x4F + (0xC8 - width) / 2, 0x64, amount.c_str(), 0, 0x5082DC, 0x643C00, 0x1D, 0x17, 1, 0); } if (!this->m_resultText.empty()) { diff --git a/Source/UI/Items/UIGameItem.cpp b/Source/UI/Items/UIGameItem.cpp index c673d618e..98872679f 100644 --- a/Source/UI/Items/UIGameItem.cpp +++ b/Source/UI/Items/UIGameItem.cpp @@ -80,7 +80,7 @@ void CUIGameItemWithNum::Paint() { CUIGameItem::Paint(); if (this->itemInfo.quantity > 0 && this->mode == 0) { std::string text = std::to_string(this->itemInfo.quantity); - DrawOutlinedText(*this, 14, 15, text.c_str(), 0, 0, 0xFFFFFF, 0, 11, 0, 0); + this->DrawOutlinedText(14, 15, text.c_str(), 0, 0, 0xFFFFFF, 0, 11, 0, 0); } } diff --git a/Source/UI/Lists/UIListBox.cpp b/Source/UI/Lists/UIListBox.cpp index e92fade87..223356b20 100644 --- a/Source/UI/Lists/UIListBox.cpp +++ b/Source/UI/Lists/UIListBox.cpp @@ -359,7 +359,7 @@ void UIListBox::Paint() { y = static_cast(static_cast((this->lineHeight - this->TextHeight(this->lines[index].c_str(), 0, 0, 12, 0, 0))) * 0.5f + static_cast((row * this->lineHeight))); } - DrawColoredText(*this, x, y, this->lines[index].c_str(), static_cast(this->lines[index].size()), color, 0, 12, false); + this->DrawColoredText(x, y, this->lines[index].c_str(), static_cast(this->lines[index].size()), color, 0, 12, false); } } diff --git a/Source/UI/Lists/UIListBoxEx.cpp b/Source/UI/Lists/UIListBoxEx.cpp index 3b8d4659d..1730f0489 100644 --- a/Source/UI/Lists/UIListBoxEx.cpp +++ b/Source/UI/Lists/UIListBoxEx.cpp @@ -175,8 +175,8 @@ void UIListBoxEx::Paint() { } std::uint32_t color = this->lines[index].color; - DrawColoredText( - *this, 3 - this->horizontalOffset, y, this->lines[index].text.c_str(), static_cast(this->lines[index].text.size()), color, 0, 12, + this->DrawColoredText( + 3 - this->horizontalOffset, y, this->lines[index].text.c_str(), static_cast(this->lines[index].text.size()), color, 0, 12, false ); } diff --git a/Source/UI/Lists/UITagListBox.cpp b/Source/UI/Lists/UITagListBox.cpp index 47ca14588..00aff1429 100644 --- a/Source/UI/Lists/UITagListBox.cpp +++ b/Source/UI/Lists/UITagListBox.cpp @@ -88,16 +88,16 @@ void UITagListBox::Paint() { for (int index = first; index < end; ++index) { const std::string& line = this->lines[index]; const int y = (index - first) * this->lineHeight + 4; - DrawColoredText( - *this, 3, y, line.c_str(), static_cast(line.size()), color, 0, 12, false + this->DrawColoredText( + 3, y, line.c_str(), static_cast(line.size()), color, 0, 12, false ); } } else { for (int index = first; index < end; ++index) { const std::string& line = this->lines[index]; const int y = (index - first) * this->lineHeight + 4; - DrawOutlinedText( - *this, 3, y, line.c_str(), static_cast(line.size()), 0, 0xFFFFFF, 0, 12, 0, 0 + this->DrawOutlinedText( + 3, y, line.c_str(), static_cast(line.size()), 0, 0xFFFFFF, 0, 12, 0, 0 ); } } diff --git a/Source/UI/Navigation/NavigationLink.cpp b/Source/UI/Navigation/NavigationLink.cpp index 91b504d3d..a7d2c47ab 100644 --- a/Source/UI/Navigation/NavigationLink.cpp +++ b/Source/UI/Navigation/NavigationLink.cpp @@ -662,8 +662,8 @@ void LineCutter::UIText::Paint() { } if (this->m_outlined == 1) { - DrawOutlinedText( - *this, 1, 1, this->m_text.c_str(), this->m_text.size(), this->m_style.color, this->m_outlineColor, 0, this->m_style.fontHeight, this->m_style.bold, this->m_style.italic + this->DrawOutlinedText( + 1, 1, this->m_text.c_str(), this->m_text.size(), this->m_style.color, this->m_outlineColor, 0, this->m_style.fontHeight, this->m_style.bold, this->m_style.italic ); } else { this->DrawTextAt(0, 0, this->m_text.c_str(), this->m_text.size(), 0, this->m_style.fontHeight, this->m_style.color, this->m_style.bold, this->m_style.italic diff --git a/Source/UI/Navigation/UIRoMapWnd.cpp b/Source/UI/Navigation/UIRoMapWnd.cpp index 7cdcf36ab..e1f18a001 100644 --- a/Source/UI/Navigation/UIRoMapWnd.cpp +++ b/Source/UI/Navigation/UIRoMapWnd.cpp @@ -163,7 +163,7 @@ void UIRoMapWnd::DrawHoverTooltip() { int textY = y + 5; for (std::list::const_iterator it = this->hoveredRecord->relatedNames.begin(); it != this->hoveredRecord->relatedNames.end(); ++it) { const std::uint32_t color = std::strcmp(it->c_str(), g_session.DecodePlayerName()) == 0 ? 0x8080F0 : 0xFFFFFF; - DrawOutlinedText(*this, boxX + 5, textY, it->c_str(), 0, color, 0, 0, 12, 1, 0); + this->DrawOutlinedText(boxX + 5, textY, it->c_str(), 0, color, 0, 0, 12, 1, 0); textY += lineHeight; } @@ -275,7 +275,7 @@ void UIRoMapWnd::DrawFieldLabels() { } const int levelX = CenteredTextX(*this, name, field->left, field->right, levelHeight, 1); - DrawOutlinedText(*this, levelX, levelY, name.c_str(), 0, levelColor, levelOutline, 0, levelHeight, 1, 0); + this->DrawOutlinedText(levelX, levelY, name.c_str(), 0, levelColor, levelOutline, 0, levelHeight, 1, 0); } } } @@ -642,7 +642,7 @@ void UIRoMapWnd::DrawMapMarker(const RoMapMarker& marker, unsigned char skipSele DrawRoundedBorder(*this, marker.area.left, marker.area.top, static_cast(marker.width), static_cast(marker.height), 0xFFFFFF); DrawAlphaRectangle(marker.area.left, marker.area.top, static_cast(marker.width), static_cast(marker.height), 0x66000000); std::string name = g_session.GetMapDisplayName(marker.name.c_str()); - DrawOutlinedText(*this, marker.area.left + 2, marker.area.top + 5, name.c_str(), 0, 0xD2FF, 0, 0, 12, 1, 0); + this->DrawOutlinedText(marker.area.left + 2, marker.area.top + 5, name.c_str(), 0, 0xD2FF, 0, 0, 12, 1, 0); } // OFFSET: 0x009119B0 diff --git a/Source/UI/Shop/UIBartermarketWnd.cpp b/Source/UI/Shop/UIBartermarketWnd.cpp index 0ee8fddb2..dae2d65e1 100644 --- a/Source/UI/Shop/UIBartermarketWnd.cpp +++ b/Source/UI/Shop/UIBartermarketWnd.cpp @@ -1873,7 +1873,7 @@ void UIExpandedBarterItemPurchaseWnd::Paint() { if (it->field_28 > 0) { std::uint32_t color = 0xFFFFFF; const std::string quantity = std::format("+{}", it->field_28); - DrawOutlinedColoredText(*this, 50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1); + this->DrawOutlinedColoredText(50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1); } int chunkIndex = 0; @@ -1890,7 +1890,7 @@ void UIExpandedBarterItemPurchaseWnd::Paint() { char chunkAmount[16] = {}; StringFormat(chunkAmount, sizeof(chunkAmount), static_cast(-1), "+%d", chunkItem.refiningLevel); std::uint32_t color = 0xFFFFFF; - DrawOutlinedColoredText(*this, chunkX, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1); + this->DrawOutlinedColoredText(chunkX, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1); } ++chunkIndex; } @@ -1972,7 +1972,7 @@ void UIExpandedBartermarketWnd::Paint() { if (it->field_28 > 0) { std::uint32_t color = 0xFFFFFF; const std::string quantity = std::format("+{}", it->field_28); - DrawOutlinedColoredText(*this, 50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1); + this->DrawOutlinedColoredText(50, y + 18, quantity.c_str(), quantity.size(), color, 200, 0, 12, 1); } int chunkIndex = 0; @@ -1993,7 +1993,7 @@ void UIExpandedBartermarketWnd::Paint() { char chunkAmount[16] = {}; StringFormat(chunkAmount, sizeof(chunkAmount), static_cast(-1), "+%d", chunkItem.refiningLevel); std::uint32_t color = 0xFFFFFF; - DrawOutlinedColoredText(*this, chunkX + 8, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1); + this->DrawOutlinedColoredText(chunkX + 8, y + 49, chunkAmount, std::strlen(chunkAmount), color, 200, 0, 12, 1); } ++chunkIndex; } diff --git a/Source/UI/Shortcuts/ShortcutCooldowns.cpp b/Source/UI/Shortcuts/ShortcutCooldowns.cpp index 7dafb60a0..fd6b7eef6 100644 --- a/Source/UI/Shortcuts/ShortcutCooldowns.cpp +++ b/Source/UI/Shortcuts/ShortcutCooldowns.cpp @@ -840,10 +840,10 @@ void UISerachStoreInfoWnd::Paint() { this->DrawPanelBackground(0, 0, ""); this->DrawTitleBar(true, LookupMessage(MSI_SEARCH_STOREINFO), 0); - DrawOutlinedText(*this, 5, 20, "Type", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); - DrawOutlinedText(*this, 98, 20, "Item", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); - DrawOutlinedText(*this, 185, 20, "Card", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); - DrawOutlinedText(*this, 273, 20, "Zeny", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(5, 20, "Type", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(98, 20, "Item", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(185, 20, "Card", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(273, 20, "Zeny", 0, 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); this->DrawTextAt(353, 38, "~", 0, 0, 12, 0, 0, 0); this->DrawRightAlignedText(this->geometry.width - 60, 60, FormatOwnedString(LookupMessage(MSI_SSI_REST_OF_NUMBER_OF_SEARCHES), g_session.storeSearchCount).c_str(), 0, 0, 12, 0, 0); diff --git a/Source/UI/Shortcuts/UIShortCutWnd.cpp b/Source/UI/Shortcuts/UIShortCutWnd.cpp index c9f9275c2..cb5dc08ba 100644 --- a/Source/UI/Shortcuts/UIShortCutWnd.cpp +++ b/Source/UI/Shortcuts/UIShortCutWnd.cpp @@ -802,13 +802,13 @@ void UIMemorialDunWnd::Paint() { sprintf(name, "%s[%s]%s", nameColor, g_session.memorialDungeonName.c_str(), endColor); sprintf(title, LookupMessage(g_session.memorialDungeonState + 0x539), name); const int width = this->ColoredTextWidth(title, 0, 0, 12, 0); - DrawColoredText(*this, (this->geometry.width - width) / 2, 30, title, 0, color, 0, 12, false); + this->DrawColoredText((this->geometry.width - width) / 2, 30, title, 0, color, 0, 12, false); } if (g_session.memorialDungeonState == 0) { sprintf(text, LookupMessage(MSI_MEMORIAL_DUN_PRIORITY), g_session.memorialQueuePosition); const int width = this->ColoredTextWidth(text, 0, 0, 12, 0); - DrawColoredText(*this, (this->geometry.width - width) / 2, (this->geometry.height - 17) / 2, text, 0, color, 0, 12, false); + this->DrawColoredText((this->geometry.width - width) / 2, (this->geometry.height - 17) / 2, text, 0, color, 0, 12, false); } else if (g_session.memorialDungeonState == 1) { if (g_session.memorialExpirationTime) { strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.memorialExpirationTime))); @@ -818,12 +818,12 @@ void UIMemorialDunWnd::Paint() { if (lines.size() > 1) { int y = static_cast((this->geometry.height - lines.size() * 17 - 72) / 2) + 40; for (unsigned int index = 0; index < lines.size(); ++index) { - DrawColoredText(*this, 10, y, lines[index].c_str(), 0, color, 0, 12, false); + this->DrawColoredText(10, y, lines[index].c_str(), 0, color, 0, 12, false); y += 17; } } else { const int width = this->ColoredTextWidth(text, 0, 0, 12, 0); - DrawColoredText(*this, (this->geometry.width - width) / 2, 55, lines[0].c_str(), 0, color, 0, 12, false); + this->DrawColoredText((this->geometry.width - width) / 2, 55, lines[0].c_str(), 0, color, 0, 12, false); } } } else if (g_session.memorialDungeonState == 2) { @@ -832,21 +832,21 @@ void UIMemorialDunWnd::Paint() { strftime(timeText, 128, LookupMessage(MSI_TIME_TYPE2), _localtime32(reinterpret_cast(&g_session.memorialCreationTime))); sprintf(text, "^ff0000%s^ffffff", timeText); const int width = this->ColoredTextWidth(text, 0, 0, 12, 0); - DrawColoredText(*this, (this->geometry.width - width) / 2, 75, text, 0, color, 0, 12, false); + this->DrawColoredText((this->geometry.width - width) / 2, 75, text, 0, color, 0, 12, false); } } else if (g_session.memorialDungeonState == 3) { std::vector lines; this->WrapPixelText(LookupMessage(MSI_MEMORIAL_DUN_OUT1), lines, this->geometry.width - 20); int y = 55; for (unsigned int index = 0; index < lines.size(); ++index) { - DrawColoredText(*this, 5, y, lines[index].c_str(), 0, color, 0, 12, false); + this->DrawColoredText(5, y, lines[index].c_str(), 0, color, 0, 12, false); y += 15; } this->WrapPixelText(LookupMessage(MSI_MEMORIAL_DUN_OUT2), lines, this->geometry.width - 20); y = 70; for (unsigned int index = 0; index < lines.size(); ++index) { - DrawColoredText(*this, 10, y, lines[index].c_str(), 0, color, 0, 12, false); + this->DrawColoredText(10, y, lines[index].c_str(), 0, color, 0, 12, false); y += 15; } } diff --git a/Source/UI/Skill/UINewSkillListWnd.cpp b/Source/UI/Skill/UINewSkillListWnd.cpp index d07367501..7f22fc126 100644 --- a/Source/UI/Skill/UINewSkillListWnd.cpp +++ b/Source/UI/Skill/UINewSkillListWnd.cpp @@ -1624,7 +1624,7 @@ void UINewSkillListWnd::DrawSkillTree() { this->DrawAuxiliary(2, x + 4, y + 44, &bitmap->image, true, true); const std::string value = this->ValueText(static_cast(skill.id)); if (value.size() != 0) { - DrawOutlinedText(*this, x + 30, y + 58, value.c_str(), 0, 0xFFFFFF, 0, 0, 11, 1, 0); + this->DrawOutlinedText(x + 30, y + 58, value.c_str(), 0, 0xFFFFFF, 0, 0, 11, 1, 0); } } else if (this->m_skillPoints != 0 && skill.available != 0 && skill.upgradable != 0) { this->DrawAuxiliary(4, x + 4, y + 44, &bitmap->image, true, true); @@ -1666,9 +1666,9 @@ void UINewSkillListWnd::DrawSkillTree() { std::sprintf(text, "%d / %d", useLevel, skill.level); int textX = (24 - this->TextWidth(text, 0, 0, 11, 1, 0)) / 2 + x + 4; std::sprintf(text, "%d", useLevel); - DrawOutlinedText(*this, textX, textY, text, 0, useLevel == skill.level ? (shade << 8 | shade) << 8 | shade : 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(textX, textY, text, 0, useLevel == skill.level ? (shade << 8 | shade) << 8 | shade : 0x7F3CFF, 0xFFFFFF, 0, 11, 1, 0); textX += this->TextWidth(text, 0, 0, 11, 1, 0); - DrawOutlinedText(*this, textX, textY, " / ", 0, (shade << 8 | shade) << 8 | shade, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(textX, textY, " / ", 0, (shade << 8 | shade) << 8 | shade, 0xFFFFFF, 0, 11, 1, 0); textX += this->TextWidth(" / ", 0, 0, 11, 1, 0); const std::uint32_t id = skill.id; @@ -1682,11 +1682,11 @@ void UINewSkillListWnd::DrawSkillTree() { target = extra->level; } StringFormat(text, sizeof(text), static_cast(-1), "%d", target); - DrawOutlinedText(*this, textX, textY, text, 0, (blue << 8 | green) << 8 | red, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText(textX, textY, text, 0, (blue << 8 | green) << 8 | red, 0xFFFFFF, 0, 11, 1, 0); } else { std::sprintf(text, "%d", skill.level); const int width = this->TextWidth(text, 0, 0, 11, 1, 0); - DrawOutlinedText(*this, (24 - width) / 2 + x + 4, textY, text, 0, (blue << 8 | green) << 8 | red, 0xFFFFFF, 0, 11, 1, 0); + this->DrawOutlinedText((24 - width) / 2 + x + 4, textY, text, 0, (blue << 8 | green) << 8 | red, 0xFFFFFF, 0, 11, 1, 0); } } diff --git a/Source/UI/Text/ColoredText.cpp b/Source/UI/Text/ColoredText.cpp index 81f58a061..27995aeb3 100644 --- a/Source/UI/Text/ColoredText.cpp +++ b/Source/UI/Text/ColoredText.cpp @@ -74,8 +74,8 @@ const char* ParseColorCode(const char* text, std::uint32_t& color) { // OFFSET: 0x00A84E30 // FUNCTION: fn_17015 -void DrawColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, +void UIWindow::DrawColoredText( + int x, int y, const char* text, unsigned bytes, std::uint32_t& color, int family, int height, bool shadow ) { if (bytes == 0) { @@ -85,11 +85,11 @@ void DrawColoredText( const char* current = text; const char* end = text + bytes; const char* marker = text + TextContext::Marker(text, bytes); - TextContext context(*window.geometry.surface); + TextContext context(*this->geometry.surface); context.SetFont(family, height, 0, 0); - if (window.HasTextBackground()) { - context.SetBackgroundColor(window.TextBackground()); + if (this->HasTextBackground()) { + context.SetBackgroundColor(this->TextBackground()); context.SetBackgroundMode(OPAQUE); } @@ -117,15 +117,15 @@ void DrawColoredText( current = next; } - if (window.HasTextBackground()) { + if (this->HasTextBackground()) { context.SetBackgroundMode(TRANSPARENT); } } // OFFSET: 0x00A84B80 // FUNCTION: fn_17014 -void DrawStyledColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, +void UIWindow::DrawStyledColoredText( + int x, int y, const char* text, unsigned bytes, std::uint32_t& color, int family, int height, unsigned char bold, unsigned char italic, bool shadow ) { if (bytes == 0) { @@ -135,11 +135,11 @@ void DrawStyledColoredText( const char* current = text; const char* end = text + bytes; const char* marker = text + TextContext::Marker(text, bytes); - TextContext context(*window.geometry.surface); + TextContext context(*this->geometry.surface); context.SetFont(family, height, bold, italic); - if (window.HasTextBackground()) { - context.SetBackgroundColor(window.TextBackground()); + if (this->HasTextBackground()) { + context.SetBackgroundColor(this->TextBackground()); context.SetBackgroundMode(OPAQUE); } @@ -167,26 +167,26 @@ void DrawStyledColoredText( current = next; } - if (window.HasTextBackground()) { + if (this->HasTextBackground()) { context.SetBackgroundMode(TRANSPARENT); } } // OFFSET: 0x00A85720 // FUNCTION: fn_17016 -void DrawOutlinedText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t color, std::uint32_t outline, +void UIWindow::DrawOutlinedText( + int x, int y, const char* text, unsigned bytes, std::uint32_t color, std::uint32_t outline, int family, int height, unsigned char bold, unsigned char italic ) { if (bytes == 0) { bytes = static_cast(std::strlen(text)); } - TextContext context(*window.geometry.surface); + TextContext context(*this->geometry.surface); context.SetFont(family, height, bold, italic); - if (window.HasTextBackground()) { - context.SetBackgroundColor(window.TextBackground()); + if (this->HasTextBackground()) { + context.SetBackgroundColor(this->TextBackground()); context.SetBackgroundMode(OPAQUE); } @@ -198,15 +198,15 @@ void DrawOutlinedText( context.SetColor(color); context.Draw(x, y, text, bytes); - if (window.HasTextBackground()) { + if (this->HasTextBackground()) { context.SetBackgroundMode(TRANSPARENT); } } // OFFSET: 0x00A848B0 // FUNCTION: fn_17013 -void DrawOutlinedColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, +void UIWindow::DrawOutlinedColoredText( + int x, int y, const char* text, unsigned bytes, std::uint32_t& color, std::uint32_t outline, int family, int height, unsigned char bold ) { if (bytes == 0) { @@ -216,7 +216,7 @@ void DrawOutlinedColoredText( const char* current = text; const char* end = text + bytes; const char* marker = text + TextContext::Marker(text, bytes); - TextContext context(*window.geometry.surface); + TextContext context(*this->geometry.surface); context.SetFont(family, height, bold, 0); while (current < end) { diff --git a/Source/UI/Text/ColoredText.h b/Source/UI/Text/ColoredText.h index 862e5a154..2e403ebde 100644 --- a/Source/UI/Text/ColoredText.h +++ b/Source/UI/Text/ColoredText.h @@ -13,25 +13,6 @@ extern unsigned char g_hexDigits[256]; const char* SegmentEnd(const char* text, const char* end); const char* ParseColorCode(const char* text, std::uint32_t& color); -void DrawColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, - int family, int height, bool shadow -); - -void DrawStyledColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, - int family, int height, unsigned char bold, unsigned char italic, bool shadow -); - -void DrawOutlinedText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t color, std::uint32_t outline, - int family, int height, unsigned char bold, unsigned char italic -); -void DrawOutlinedColoredText( - UIWindow& window, int x, int y, const char* text, unsigned bytes, std::uint32_t& color, - std::uint32_t outline, int family, int height, unsigned char bold -); - std::string StripColorCodes(const char* text, unsigned bytes); #endif diff --git a/Source/UI/Text/UIBalloonText.cpp b/Source/UI/Text/UIBalloonText.cpp index 1416640ac..d84e2bc66 100644 --- a/Source/UI/Text/UIBalloonText.cpp +++ b/Source/UI/Text/UIBalloonText.cpp @@ -215,8 +215,8 @@ void UINameBalloonText::Paint() { lines: for (auto line = this->m_lines.begin(); line != this->m_lines.end(); ++line) { - DrawOutlinedText( - *this, x, y, line->c_str(), static_cast(line->size()), this->m_textColor, this->m_outlineColor, 0, g_nameBalloonFontHeight, + this->DrawOutlinedText( + x, y, line->c_str(), static_cast(line->size()), this->m_textColor, this->m_outlineColor, 0, g_nameBalloonFontHeight, g_serviceFlag06, 0 ); y += g_nameBalloonFontHeight + 2; diff --git a/Source/UI/Text/UIRoundBoxTooltipWnd.cpp b/Source/UI/Text/UIRoundBoxTooltipWnd.cpp index 494363f00..3ba9a8aaa 100644 --- a/Source/UI/Text/UIRoundBoxTooltipWnd.cpp +++ b/Source/UI/Text/UIRoundBoxTooltipWnd.cpp @@ -68,7 +68,7 @@ void UIColoringTextViewer::Paint() { for (int index = first; index < end; ++index) { const auto& line = this->lines[index]; - DrawColoredText(*this, 3, this->lineHeight * (index - first) + 4, line.c_str(), static_cast(line.size()), this->color, 0, 12, false); + this->DrawColoredText(3, this->lineHeight * (index - first) + 4, line.c_str(), static_cast(line.size()), this->color, 0, 12, false); } } diff --git a/Source/UI/Text/UITextViewer.cpp b/Source/UI/Text/UITextViewer.cpp index 3193963d9..74d09f052 100644 --- a/Source/UI/Text/UITextViewer.cpp +++ b/Source/UI/Text/UITextViewer.cpp @@ -213,11 +213,11 @@ void UITextViewer::Paint() { const auto bytes = static_cast(line.size()); if (plain) { - DrawOutlinedText(*this, 3, y, line.c_str(), bytes, 0, 0xFFFFFF, 0, 12, 0, 0); + this->DrawOutlinedText(3, y, line.c_str(), bytes, 0, 0xFFFFFF, 0, 12, 0, 0); } else if (this->outline != 0) { - DrawOutlinedColoredText(*this, 3, y, line.c_str(), bytes, color, this->backgroundColor, 0, 12, this->bold); + this->DrawOutlinedColoredText(3, y, line.c_str(), bytes, color, this->backgroundColor, 0, 12, this->bold); } else { - DrawColoredText(*this, 3, y, line.c_str(), bytes, color, 0, 12, false); + this->DrawColoredText(3, y, line.c_str(), bytes, color, 0, 12, false); } } } diff --git a/Source/UI/Text/UITransBalloonText.cpp b/Source/UI/Text/UITransBalloonText.cpp index ca9533959..3bbae836c 100644 --- a/Source/UI/Text/UITransBalloonText.cpp +++ b/Source/UI/Text/UITransBalloonText.cpp @@ -158,7 +158,7 @@ void UITransBalloonText::Paint() { color = index < this->m_lineColors.size() && this->m_lineColors[index] != 0 ? this->m_lineColors[index] : this->m_textColor; if (this->m_richText != 0) { - DrawColoredText(*this, 6, y, this->m_lines[index].c_str(), 0, color, family, height, true); + this->DrawColoredText(6, y, this->m_lines[index].c_str(), 0, color, family, height, true); } else { this->DrawShadowedText(6, y, this->m_lines[index].c_str(), 0, color, this->m_outlineColor, family, height, 0); } @@ -172,7 +172,7 @@ void UITransBalloonText::Paint() { void UIColorTransBalloonText::Paint() { this->ClearSurface(0xFFFF00FF); std::uint32_t color = 0xFFFFFF; - DrawColoredText(*this, 6, 4, this->m_lines[0].c_str(), 0, color, 0, 12, false); + this->DrawColoredText(6, 4, this->m_lines[0].c_str(), 0, color, 0, 12, false); } // OFFSET: 0x0085B010 diff --git a/Source/UI/Window/UIControl.cpp b/Source/UI/Window/UIControl.cpp index 68a35d88b..f34d8bac4 100644 --- a/Source/UI/Window/UIControl.cpp +++ b/Source/UI/Window/UIControl.cpp @@ -3120,8 +3120,8 @@ void CUITextButton::DrawLabel() { ); } if (this->outline) { - DrawOutlinedText( - *this, this->textX + 1, this->textY + 1, this->displayText.c_str(), 0, this->textColors[this->state], this->outlineColor, this->fontIndex, + this->DrawOutlinedText( + this->textX + 1, this->textY + 1, this->displayText.c_str(), 0, this->textColors[this->state], this->outlineColor, this->fontIndex, this->fontHeight, this->bold, 0 ); return; @@ -3138,8 +3138,8 @@ void CUITextButton::DrawLabel() { ); } if (this->outline) { - DrawOutlinedText( - *this, this->textX, this->textY, this->displayText.c_str(), 0, this->textColors[this->state], this->outlineColor, this->fontIndex, + this->DrawOutlinedText( + this->textX, this->textY, this->displayText.c_str(), 0, this->textColors[this->state], this->outlineColor, this->fontIndex, this->fontHeight, this->bold, 0 ); return; @@ -3192,8 +3192,8 @@ void CUIStaticText::Paint() { ); } if (this->outline) { - DrawOutlinedText( - *this, this->textX, this->textY + 1, this->displayText.c_str(), 0, this->color, this->outlineColor, this->fontIndex, this->fontHeight, this->bold, + this->DrawOutlinedText( + this->textX, this->textY + 1, this->displayText.c_str(), 0, this->color, this->outlineColor, this->fontIndex, this->fontHeight, this->bold, 0 ); return; diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index a03f3ba42..c617877b1 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -2242,7 +2242,7 @@ void UIListBox_NaviSearch::Paint() { } const std::string& line = this->lines[index]; - DrawColoredText(*this, x, y, line.c_str(), static_cast(line.size()), color, 0, 12, false); + this->DrawColoredText(x, y, line.c_str(), static_cast(line.size()), color, 0, 12, false); } } @@ -2489,8 +2489,8 @@ void UINavigationV4Wnd::Paint() { this->DrawMapTexture(3, 0x2e, 0x10a); CNaviInfo* info = static_cast(g_navigationManager.GetCurrentTarget().object); if (info) { - DrawOutlinedText(*this, 9, 0x32, info->GetTitle(), 0, 0xffffff, 0, 0, 0xb, 1, 0); - DrawOutlinedText(*this, 9, 0x41, info->GetName(), 0, 0xffffff, 0, 0, 0xb, 1, 0); + this->DrawOutlinedText(9, 0x32, info->GetTitle(), 0, 0xffffff, 0, 0, 0xb, 1, 0); + this->DrawOutlinedText(9, 0x41, info->GetName(), 0, 0xffffff, 0, 0, 0xb, 1, 0); } if (static_cast(this->noticeUntil) > timeGetTime()) { @@ -2514,7 +2514,7 @@ void UINavigationV4Wnd::Paint() { WrapPlainText(message.c_str(), lines, 0x26); int y = (0x29 - static_cast(lines.size())) * 7; for (unsigned int index = 0; index < lines.size(); ++index) { - DrawOutlinedText(*this, 0x2a, y, lines[index].c_str(), 0, 0xffffff, 0, 0, 0xb, 1, 0); + this->DrawOutlinedText(0x2a, y, lines[index].c_str(), 0, 0xffffff, 0, 0, 0xb, 1, 0); y += 0xe; } } diff --git a/Source/UI/Window/UIWindow.h b/Source/UI/Window/UIWindow.h index b3466c771..2f7770130 100644 --- a/Source/UI/Window/UIWindow.h +++ b/Source/UI/Window/UIWindow.h @@ -131,6 +131,18 @@ public: ); void DrawVerticalText(int x, int y, const char* text, unsigned bytes, int family, int height, std::uint32_t color, unsigned char bold); void DrawCenteredText(int x, int y, const char* text, int width, int family, int height, std::uint32_t color, unsigned char bold); + void DrawColoredText(int x, int y, const char* text, unsigned bytes, std::uint32_t& color, int family, int height, bool shadow); + void DrawStyledColoredText( + int x, int y, const char* text, unsigned bytes, std::uint32_t& color, int family, int height, unsigned char bold, unsigned char italic, + bool shadow + ); + void DrawOutlinedText( + int x, int y, const char* text, unsigned bytes, std::uint32_t color, std::uint32_t outline, int family, int height, unsigned char bold, + unsigned char italic + ); + void DrawOutlinedColoredText( + int x, int y, const char* text, unsigned bytes, std::uint32_t& color, std::uint32_t outline, int family, int height, unsigned char bold + ); void DrawRightOutlinedText( int right, int y, const char* text, int bytes, std::uint32_t color, std::uint32_t outline, int family, int height, unsigned char bold