From 81dd7f7f960759acbb4e9f3315c8dffc727a43c2 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 02:51:03 +0000 Subject: [PATCH] Decompile fn_11393 (UITextViewEX::Paint) Batch #15462 by youko: 0 byte-identical, 1 confirmed by peer review. - fn_11393 UITextViewEX::Paint: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, Yommy, alisonrag Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index cb025d34b..2b9665f6d 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -3347,20 +3347,21 @@ void UITextViewEX::Paint() { const int top = this->topLine; int y = 7; int line = 0; - for (auto it = this->lineLinks.begin(); it != this->lineLinks.end(); ++it, ++line) { + for (auto it = this->lineLinks.begin(), end = this->lineLinks.end(); it != end; ++it, ++line) { std::vector buttons = *it; if (line >= top) { int x = 0; for (UITextButton* button : buttons) { UIString* text = reinterpret_cast(button); - if (text->text != "\n") { + if (StringText(*text) != "\n") { text->Show(1); x = text->enabled == 0 ? x : x - 5; if (x < 0) { x = 0; } - text->Move(x, !text->image.empty() ? y - 7 : y); - x = text->geometry.width + x + 5; + const bool hasImage = !StringImage(*text).empty(); + text->Move(x, hasImage ? y - 7 : y); + x = x + 5 + text->geometry.width; } } y += 21;