From 8cc308255e6f91051f7fa2c31d10b04e2737fe7c Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 01:02:23 +0000 Subject: [PATCH] Decompile fn_11425 (UIScrollBar::Slot25) Batch #11521 by cremane: 1 byte-identical, 0 confirmed by peer review. - fn_11425 UIScrollBar::Slot25: byte-identical Peer-reviewed-by: Yommy, Tanke, dori Merged automatically: every function is byte-identical to the original. --- Source/UI/Lists/UIScrollBar.cpp | 40 +++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/Source/UI/Lists/UIScrollBar.cpp b/Source/UI/Lists/UIScrollBar.cpp index 43e52f88..489941a4 100644 --- a/Source/UI/Lists/UIScrollBar.cpp +++ b/Source/UI/Lists/UIScrollBar.cpp @@ -212,10 +212,8 @@ int UIScrollBar::Part(int x, int y) { // OFFSET: 0x00890720 // FUNCTION: fn_11425 void UIScrollBar::Slot25(int x, int y) { - UIWindow* owner = this->parent; - if (this->maximum == 0) { - owner->Slot25((x + this->geometry.x), (y + this->geometry.y)); + this->parent->Slot25((x + this->geometry.x), (y + this->geometry.y)); return; } @@ -225,29 +223,47 @@ void UIScrollBar::Slot25(int x, int y) { this->pressX = x; this->dragAmount = 0; - if (this->vertical == 0 || this->vertical == 1) { - const bool vertical = this->vertical == 1; - + switch (this->vertical) { + case 0: switch (part) { case 0: - owner->SendMsg(this, vertical ? 7 : 8, (0 - (vertical ? this->verticalStep : this->horizontalStep)), 0, 0, 0); + this->parent->SendMsg(this, 8, -this->horizontalStep, 0, 0, 0); break; case 1: - owner->SendMsg(this, vertical ? 9 : 11, 0, 0, 0, 0); + this->parent->SendMsg(this, 11, 0, 0, 0, 0); break; case 2: g_windowMgr.SetCapture(this); this->state = 6; break; case 3: - owner->SendMsg(this, vertical ? 10 : 12, 0, 0, 0, 0); + this->parent->SendMsg(this, 12, 0, 0, 0, 0); break; case 4: - owner->SendMsg(this, vertical ? 7 : 8, vertical ? this->verticalStep : this->horizontalStep, 0, 0, 0); - break; - default: + this->parent->SendMsg(this, 8, this->horizontalStep, 0, 0, 0); break; } + break; + case 1: + switch (part) { + case 0: + this->parent->SendMsg(this, 7, -this->verticalStep, 0, 0, 0); + break; + case 1: + this->parent->SendMsg(this, 9, 0, 0, 0, 0); + break; + case 2: + g_windowMgr.SetCapture(this); + this->state = 6; + break; + case 3: + this->parent->SendMsg(this, 10, 0, 0, 0, 0); + break; + case 4: + this->parent->SendMsg(this, 7, this->verticalStep, 0, 0, 0); + break; + } + break; } if (previous != this->state) {