diff --git a/Source/UI/Text/UIAchWnd.cpp b/Source/UI/Text/UIAchWnd.cpp index f1ae7459d..cad764a31 100644 --- a/Source/UI/Text/UIAchWnd.cpp +++ b/Source/UI/Text/UIAchWnd.cpp @@ -367,11 +367,10 @@ void UIAchListWnd::Paint() { 0, this->rowHeight * row, AchievementBitmap(flags[1] == 1 ? "유저인터페이스\\achievement_re\\list_complete_press.bmp" : "유저인터페이스\\achievement_re\\list_press.bmp"), false ); + } else if (flags[1] == 1) { + this->DrawBitmap(0, this->rowHeight * row, AchievementBitmap("유저인터페이스\\achievement_re\\list_complete_out.bmp"), false); } else { - this->DrawBitmap( - 0, this->rowHeight * row, - AchievementBitmap(flags[1] == 1 ? "유저인터페이스\\achievement_re\\list_complete_out.bmp" : "유저인터페이스\\achievement_re\\list_out.bmp"), false - ); + this->DrawBitmap(0, this->rowHeight * row, AchievementBitmap("유저인터페이스\\achievement_re\\list_out.bmp"), false); } CBitmapRes* icon = static_cast(ResourceMgr::Instance().Load(Resolve(("유저인터페이스\\achievement_re\\icon_" + info.iconName + ".bmp").c_str()))); @@ -379,7 +378,7 @@ void UIAchListWnd::Paint() { this->DrawBitmap(8, this->rowHeight * row + 3, icon, true); } - if (g_session.HasTrackedAchievement(this->ids[this->firstRow + row])) { + if (g_session.HasTrackedAchievement(this->ids[this->firstRow + row]) == true) { this->DrawBitmap(8, this->rowHeight * row + 3, AchievementBitmap("유저인터페이스\\achievement_re\\list_pin.bmp"), true); } @@ -390,14 +389,12 @@ void UIAchListWnd::Paint() { this->DrawBitmap(250, this->rowHeight * row + 5, AchievementBitmap("유저인터페이스\\achievement_re\\badge_complete.bmp"), true); } - if (HasReward(info) && record.rewarded == 0) { - this->DrawBitmap( - 263, this->rowHeight * row + 49, - AchievementBitmap( - flags[1] == 1 ? "유저인터페이스\\achievement_re\\list_rewardbox_not_receive.bmp" : "유저인터페이스\\achievement_re\\list_rewardbox_default.bmp" - ), - true - ); + if (HasReward(info) == true && record.rewarded == 0) { + if (flags[1] == 1) { + this->DrawBitmap(263, this->rowHeight * row + 49, AchievementBitmap("유저인터페이스\\achievement_re\\list_rewardbox_not_receive.bmp"), true); + } else { + this->DrawBitmap(263, this->rowHeight * row + 49, AchievementBitmap("유저인터페이스\\achievement_re\\list_rewardbox_default.bmp"), true); + } } if (flags[1] == 1) { diff --git a/Source/UI/Window/UIWindow.cpp b/Source/UI/Window/UIWindow.cpp index 25c275cb3..2de0e0dca 100644 --- a/Source/UI/Window/UIWindow.cpp +++ b/Source/UI/Window/UIWindow.cpp @@ -1661,7 +1661,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::listpush_back(line); if (colorCode.empty()) { @@ -1689,7 +1689,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::listpush_back(line); } continue; @@ -1699,7 +1699,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::listpush_back(line); } continue; @@ -1713,7 +1713,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::listpush_back(line); } continue; @@ -1721,17 +1721,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::list(g_textCodePage), current, 0); - const std::string character(current, next); - const char* const measured = character.c_str(); - int characterWidth = 0; - if (measured) { - const unsigned bytes = static_cast(std::strlen(measured)); - if (bytes) { - TextContext context(*this->geometry.surface); - context.SetFont(family, height, currentBold, 0); - characterWidth = context.Measure(measured, bytes).cx; - } - } + const int characterWidth = this->TextWidth(std::string(current, next).c_str(), 0, family, height, currentBold, 0); if (maxWidth < characterWidth + width) { lines->push_back(line); @@ -1747,7 +1737,7 @@ std::list UIWindow::WrapFormattedText(std::string text, std::listpush_back(line); } }