From e0985b78ec533a40cc61880cda00196e279cc441 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 11:09:40 +0000 Subject: [PATCH] Decompile 3 functions in Source/UI/Lists/UIScrollBar.cpp, Source/UI/Lists/UIScrollBarVariants.h Batch #7657 by secret: 0 byte-identical, 3 confirmed by peer review. - fn_11072 UIScrollBar4::UIScrollBar4: logic confirmed by peer review - fn_11074 UIScrollBar_Custom::UIScrollBar_Custom: logic confirmed by peer review - fn_11088 UIZeroQuestScrollBar::UIZeroQuestScrollBar: logic confirmed by peer review Peer-reviewed-by: Yommy, Tanke Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Lists/UIScrollBar.cpp | 23 +++++++++++++++++++++++ Source/UI/Lists/UIScrollBarVariants.h | 11 +++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index eef0dcd3..a9c6523c 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -4,6 +4,7 @@ #include "Resource/ResourceMgr.h" #include "UI/Window/UIWindowMgr.h" #include "UI/Lists/UIScrollBar.h" +#include "UI/Lists/UIScrollBarVariants.h" #include "Contents/Items/ItemDescription.h" #include "Resource/TextureNames.h" #include "UI/Buttons/UIButton.h" @@ -44,6 +45,28 @@ UIScrollBar::UIScrollBar(UIWindowContext& windows) // OFFSET: 0x00873FA0 UIScrollBar::~UIScrollBar() = default; +// OFFSET: 0x0086E4D0 +// FUNCTION: fn_11072 +UIScrollBar4::UIScrollBar4(UIWindowContext& windows) : UIScrollBar(windows) { + this->thickness = 6; + this->arrowLength = 0; + this->m_thumbLength = 12; +} + +// OFFSET: 0x0086E630 +// FUNCTION: fn_11074 +UIScrollBar_Custom::UIScrollBar_Custom(UIWindowContext& windows) + : UIScrollBar(windows), m_trackTop(nullptr), m_trackMiddle(nullptr), m_trackBottom(nullptr), m_arrowUp(nullptr), m_arrowDown(nullptr), + m_thumbTop(nullptr), m_thumbMiddle(nullptr), m_thumbBottom(nullptr) { +} + +// OFFSET: 0x0086F240 +// FUNCTION: fn_11088 +UIZeroQuestScrollBar::UIZeroQuestScrollBar(UIWindowContext& windows) : UIScrollBar(windows) { + this->arrowLength = 12; + this->thickness = 9; +} + // OFFSET: 0x00897830 // FUNCTION: fn_11535 void UIScrollBar::Resize(int width, int height) { diff --git a/Source/UI/Lists/UIScrollBarVariants.h b/Source/UI/Lists/UIScrollBarVariants.h index d24c0fc7..34db0527 100644 --- a/Source/UI/Lists/UIScrollBarVariants.h +++ b/Source/UI/Lists/UIScrollBarVariants.h @@ -27,15 +27,16 @@ public: class UIScrollBar4 : public UIScrollBar { public: + explicit UIScrollBar4(UIWindowContext& windows); + void Paint() override; + + /* 00B4 */ int m_thumbLength; }; class UIScrollBar_Custom : public UIScrollBar { public: - explicit UIScrollBar_Custom(UIWindowContext& windows) - : UIScrollBar(windows), m_trackTop(nullptr), m_trackMiddle(nullptr), m_trackBottom(nullptr), m_arrowUp(nullptr), m_arrowDown(nullptr), - m_thumbTop(nullptr), m_thumbMiddle(nullptr), m_thumbBottom(nullptr) { - } + explicit UIScrollBar_Custom(UIWindowContext& windows); /* 00B4 */ CBitmapRes* m_trackTop; /* 00B8 */ CBitmapRes* m_trackMiddle; @@ -53,6 +54,8 @@ public: class UIZeroQuestScrollBar : public UIScrollBar { public: + explicit UIZeroQuestScrollBar(UIWindowContext& windows); + void Paint() override; };