From 97b17caa417ec2946f21f2320a1f5df2c1de6f3f Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 17:10:23 +0000 Subject: [PATCH] Decompile fn_12966 (UIStaticText_LF::SetText) Batch #18635 by eAthena: 1 byte-identical, 0 confirmed by peer review. - fn_12966 UIStaticText_LF::SetText: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/UI/Text/UIStaticText_LF.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Source/UI/Text/UIStaticText_LF.cpp b/Source/UI/Text/UIStaticText_LF.cpp index 696f8d5d9..ba17a30bb 100644 --- a/Source/UI/Text/UIStaticText_LF.cpp +++ b/Source/UI/Text/UIStaticText_LF.cpp @@ -49,19 +49,11 @@ void UIStaticText_LF::OnWheel(int delta) { // OFFSET: 0x00951BF0 // FUNCTION: fn_12966 void UIStaticText_LF::SetText(std::string text) { - *reinterpret_cast(reinterpret_cast(this) + 0x7C) = text; + this->m_text = text; std::list lines; - this->WrapFormattedText( - text, &lines, this->geometry.width, - *reinterpret_cast(reinterpret_cast(this) + 0x9C), - *reinterpret_cast(reinterpret_cast(this) + 0xA0), - *reinterpret_cast(reinterpret_cast(this) + 0xA8) - ); + this->WrapFormattedText(text, &lines, this->geometry.width, this->m_fontFamily, this->m_fontHeight, this->m_bold); const int count = static_cast(lines.size()); - this->Resize( - this->geometry.width, - (count - 1) * *reinterpret_cast(reinterpret_cast(this) + 0x94) + - *reinterpret_cast(reinterpret_cast(this) + 0xA0) * count - ); + const int height = (count - 1) * this->m_lineSpacing + this->m_fontHeight * count; + this->Resize(this->geometry.width, height); this->Invalidate(); }