From b47d4a5ff071cbe324e46705ea0037eec8b0b92e Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 12 Nov 2026 03:18:18 +0000 Subject: [PATCH] Decompile 2 functions in Source/UI/Buttons/UITextButton.cpp Batch #17749 by eAthena: 0 byte-identical, 2 confirmed by peer review. - fn_11379 UIScrollBar3::Paint: logic confirmed by peer review - fn_11380 UIScrollBar4::Paint: logic confirmed by peer review Peer-reviewed-by: Yommy, cremane, bibinir Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Buttons/UITextButton.cpp | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/Source/UI/Buttons/UITextButton.cpp b/Source/UI/Buttons/UITextButton.cpp index 00f9b9126..3085198ea 100644 --- a/Source/UI/Buttons/UITextButton.cpp +++ b/Source/UI/Buttons/UITextButton.cpp @@ -2023,17 +2023,15 @@ void UIScrollBar3::Paint() { } std::string path = "유저인터페이스\\basic_interface\\"; - if (this->vertical == 1) { + switch (this->vertical) { + case 1: { this->FillRegion(0, 10, 9, this->geometry.height - 20, 0xF1F1F1); if (this->state == 1) { - auto* up = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))); - this->DrawBitmap(0, 0, up, false); + this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))), false); } else if (this->state == 4) { - auto* up = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))); - this->DrawBitmap(0, 0, up, false); + this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))), false); } else { - auto* up = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))); - this->DrawBitmap(0, 0, up, false); + this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_up1.bmp").c_str()))), false); } int thumb = this->ThumbOffset() + this->arrowLength; @@ -2048,15 +2046,14 @@ void UIScrollBar3::Paint() { this->FillRegion(0, thumb + 1, 9, length - 1, 0xE9E9E9); if (this->state == 2) { - auto* down = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))); - this->DrawBitmap(0, this->geometry.height - this->arrowLength, down, false); + this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))), false); } else if (this->state == 5) { - auto* down = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))); - this->DrawBitmap(0, this->geometry.height - this->arrowLength, down, false); + this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))), false); } else { - auto* down = static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))); - this->DrawBitmap(0, this->geometry.height - this->arrowLength, down, false); + this->DrawBitmap(0, this->geometry.height - this->arrowLength, static_cast(ResourceMgr::Instance().Load(Resolve((path + "dialscr_down1.bmp").c_str()))), false); } + break; + } } this->minimumThumb = 0; @@ -2072,12 +2069,10 @@ void UIScrollBar4::Paint() { std::string path = "유저인터페이스\\basic_interface\\"; if (this->vertical == 0) { - auto* track = static_cast(ResourceMgr::Instance().Load(Resolve((path + "scrollbar.bmp").c_str()))); - this->DrawBitmap(0, 0, track, true); + this->DrawBitmap(0, 0, static_cast(ResourceMgr::Instance().Load(Resolve((path + "scrollbar.bmp").c_str()))), true); const int offset = this->ThumbOffset(); - auto* thumb = static_cast(ResourceMgr::Instance().Load(Resolve((path + "scroll_bar.bmp").c_str()))); - this->DrawBitmap(offset, 0, thumb, true); + this->DrawBitmap(offset, 0, static_cast(ResourceMgr::Instance().Load(Resolve((path + "scroll_bar.bmp").c_str()))), true); } this->minimumThumb = 0;