From 7bb34250a4703971a86c2ba8aeba72c3a803ca04 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sun, 1 Nov 2026 12:46:12 +0000 Subject: [PATCH] Decompile fn_10463 (CCreateLineInfo::CreateLinkWindow) Batch #9416 by secret: 0 byte-identical, 1 confirmed by peer review. - fn_10463 CCreateLineInfo::CreateLinkWindow: logic confirmed by peer review Peer-reviewed-by: Yommy, gordaoprogramas, Toshiro, seumadruga Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.h | 1 + Source/UI/Text/NavigationLink.cpp | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/Source/UI/Buttons/UITextButton.h b/Source/UI/Buttons/UITextButton.h index 69123707..0e9ecc4b 100644 --- a/Source/UI/Buttons/UITextButton.h +++ b/Source/UI/Buttons/UITextButton.h @@ -29,6 +29,7 @@ public: friend void RequestTextButtonService(UITextButton* button); friend void OpenTextButtonNavigation(UITextButton* button); + UITextButton(); UITextButton(UIWindowContext& windows, UIButtonContext& buttons); ~UITextButton() override; void Paint() override; diff --git a/Source/UI/Text/NavigationLink.cpp b/Source/UI/Text/NavigationLink.cpp index 5aa9c7f1..28f7ea62 100644 --- a/Source/UI/Text/NavigationLink.cpp +++ b/Source/UI/Text/NavigationLink.cpp @@ -1101,6 +1101,25 @@ int CCreateLineInfo::AddLink(int index, int type) { } // OFFSET: 0x0083A5F0 +// FUNCTION: fn_10463 +UITextButton* CCreateLineInfo::CreateLinkWindow(const std::string& text, const std::vector& parts, int type, LineTextStyle style) { + if (text.empty() || parts.empty()) { + return nullptr; + } + + const int width = MeasureText(this->m_parent, text, style).cx; + UITextButton* button = new UITextButton(); + button->Configure(text.c_str(), type == LINE_SEGMENT_URL ? 0xE6A300 : 0xF4934A, 0, 12, 0, 1); + button->m_hoverColor = type == LINE_SEGMENT_URL ? 0xEFB700 : 0xFF7864; + button->SetId(type); + button->ResizeToTextClipped(width + 1, button->geometry.height); + + for (std::string part : parts) { + button->m_lines.push_back(part); + } + + return button; +} // OFFSET: 0x0083ACF0 // FUNCTION: fn_10467