From ee2383ec990e5dbdf4ffdeab06be3722f0680e0c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Wed, 11 Nov 2026 13:54:11 +0000 Subject: [PATCH] Decompile fn_13206 (UICandidateWnd::SendMsg) Batch #17101 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_13206 UICandidateWnd::SendMsg: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Edit/UICandidateWnd.cpp | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Source/UI/Edit/UICandidateWnd.cpp b/Source/UI/Edit/UICandidateWnd.cpp index 8b47bfdb9..5f258e088 100644 --- a/Source/UI/Edit/UICandidateWnd.cpp +++ b/Source/UI/Edit/UICandidateWnd.cpp @@ -145,23 +145,17 @@ int UICandidateWnd::SendMsg(UIWindow* sender, int message, std::intptr_t argumen int width = 0; for (int i = 0; i < this->m_count; ++i) { StringFormat(text, sizeof(text), static_cast(-1), "%d %s", i + 1, this->m_candidates[i].c_str()); - if (g_language == 2) { - int textWidth = this->TextWidth(text, 0, 0, 12, 0, 0) + 8; - if (textWidth < width) { - textWidth = width; - } - width = textWidth; - } else { + if (g_language != 2) { width += 8 + this->TextWidth(text, 0, 0, 12, 0, 0); + } else { + width = std::max(this->TextWidth(text, 0, 0, 12, 0, 0) + 8, width); } } - int height; - if (g_language == 2) { - height = this->m_count * 20 + 14; + if (g_language != 2) { + this->Resize(width + 22, this->geometry.height); } else { - height = this->geometry.height; + this->Resize(width + 22, this->m_count * 20 + 14); } - this->Resize(width + 22, height); this->Invalidate(); return 0; }