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.
This commit is contained in:
ragnarok-clanker 2026-11-12 11:23:37 +00:00
commit 38f040504e
28 changed files with 112 additions and 119 deletions

View file

@ -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);
}

View file

@ -12357,7 +12357,7 @@ void UIExchangeWnd::Paint() {
this->DrawBitmap(0, 0, bitmap, false);
bitmap = static_cast<CBitmapRes*>(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));

View file

@ -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<int>(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<int>(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;
}
}

View file

@ -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<unsigned>(line.size()), color, 0, 12, false);
this->DrawColoredText(3 - this->horizontalOffset, this->lineHeight * row, line.c_str(), static_cast<unsigned>(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<unsigned>(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<unsigned>(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<unsigned>(line.size()), color, this->fontFamily, this->fontHeight, this->bold, this->italic, false
this->DrawStyledColoredText(
x, y, line.c_str(), static_cast<unsigned>(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<unsigned>(this->text.size()), color, 0, 12, false);
this->DrawColoredText(24, 7, this->text.c_str(), static_cast<unsigned>(this->text.size()), color, 0, 12, false);
} else {
DrawColoredText(*this, 0, 0, this->text.c_str(), static_cast<unsigned>(this->text.size()), color, 0, 12, false);
this->DrawColoredText(0, 0, this->text.c_str(), static_cast<unsigned>(this->text.size()), color, 0, 12, false);
}
}

View file

@ -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

View file

@ -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);

View file

@ -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);
}
}

View file

@ -451,11 +451,11 @@ void UIHotKeyWnd::Paint() {
(this->m_prevButton->geometry.width - pagesWidth + 60) / 2 + this->m_prevButton->geometry.x;
text = static_cast<const std::string&>(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<const std::string&>(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;

View file

@ -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()) {

View file

@ -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);
}
}

View file

@ -359,7 +359,7 @@ void UIListBox::Paint() {
y = static_cast<int>(static_cast<float>((this->lineHeight - this->TextHeight(this->lines[index].c_str(), 0, 0, 12, 0, 0))) * 0.5f + static_cast<float>((row * this->lineHeight)));
}
DrawColoredText(*this, x, y, this->lines[index].c_str(), static_cast<unsigned>(this->lines[index].size()), color, 0, 12, false);
this->DrawColoredText(x, y, this->lines[index].c_str(), static_cast<unsigned>(this->lines[index].size()), color, 0, 12, false);
}
}

View file

@ -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<unsigned>(this->lines[index].text.size()), color, 0, 12,
this->DrawColoredText(
3 - this->horizontalOffset, y, this->lines[index].text.c_str(), static_cast<unsigned>(this->lines[index].text.size()), color, 0, 12,
false
);
}

View file

@ -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<unsigned>(line.size()), color, 0, 12, false
this->DrawColoredText(
3, y, line.c_str(), static_cast<unsigned>(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<unsigned>(line.size()), 0, 0xFFFFFF, 0, 12, 0, 0
this->DrawOutlinedText(
3, y, line.c_str(), static_cast<unsigned>(line.size()), 0, 0xFFFFFF, 0, 12, 0, 0
);
}
}

View file

@ -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

View file

@ -163,7 +163,7 @@ void UIRoMapWnd::DrawHoverTooltip() {
int textY = y + 5;
for (std::list<std::string>::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<int>(marker.width), static_cast<int>(marker.height), 0xFFFFFF);
DrawAlphaRectangle(marker.area.left, marker.area.top, static_cast<int>(marker.width), static_cast<int>(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

View file

@ -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<std::size_t>(-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<std::size_t>(-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;
}

View file

@ -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);

View file

@ -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<const __time32_t*>(&g_session.memorialExpirationTime)));
@ -818,12 +818,12 @@ void UIMemorialDunWnd::Paint() {
if (lines.size() > 1) {
int y = static_cast<int>((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<const __time32_t*>(&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<std::string> 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;
}
}

View file

@ -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<int>(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<std::size_t>(-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);
}
}

View file

@ -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<unsigned>(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) {

View file

@ -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

View file

@ -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<unsigned>(line->size()), this->m_textColor, this->m_outlineColor, 0, g_nameBalloonFontHeight,
this->DrawOutlinedText(
x, y, line->c_str(), static_cast<unsigned>(line->size()), this->m_textColor, this->m_outlineColor, 0, g_nameBalloonFontHeight,
g_serviceFlag06, 0
);
y += g_nameBalloonFontHeight + 2;

View file

@ -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<unsigned>(line.size()), this->color, 0, 12, false);
this->DrawColoredText(3, this->lineHeight * (index - first) + 4, line.c_str(), static_cast<unsigned>(line.size()), this->color, 0, 12, false);
}
}

View file

@ -213,11 +213,11 @@ void UITextViewer::Paint() {
const auto bytes = static_cast<unsigned>(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);
}
}
}

View file

@ -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

View file

@ -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;

View file

@ -2242,7 +2242,7 @@ void UIListBox_NaviSearch::Paint() {
}
const std::string& line = this->lines[index];
DrawColoredText(*this, x, y, line.c_str(), static_cast<unsigned>(line.size()), color, 0, 12, false);
this->DrawColoredText(x, y, line.c_str(), static_cast<unsigned>(line.size()), color, 0, 12, false);
}
}
@ -2489,8 +2489,8 @@ void UINavigationV4Wnd::Paint() {
this->DrawMapTexture(3, 0x2e, 0x10a);
CNaviInfo* info = static_cast<CNaviInfo*>(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<DWORD>(this->noticeUntil) > timeGetTime()) {
@ -2514,7 +2514,7 @@ void UINavigationV4Wnd::Paint() {
WrapPlainText(message.c_str(), lines, 0x26);
int y = (0x29 - static_cast<int>(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;
}
}

View file

@ -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