From 388b35eace4876b9e9cb19bc9efaf12581a1c0df Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Sat, 31 Oct 2026 20:12:39 +0000 Subject: [PATCH] Decompile fn_12121 (UISayDialogWnd::ButtonX) Batch #8692 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_12121 UISayDialogWnd::ButtonX: logic confirmed by peer review Peer-reviewed-by: eAthena, alisonrag, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/UI/Acceptance/UIChooseSellBuyWnd.cpp | 10 ++++++++++ Source/UI/Dialogs/UISayDialogWnd.h | 1 + 2 files changed, 11 insertions(+) diff --git a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp index 4f323192..61434a95 100644 --- a/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp +++ b/Source/UI/Acceptance/UIChooseSellBuyWnd.cpp @@ -3199,6 +3199,16 @@ void UInCashWnd::Slot35(int delta) { } // OFFSET: 0x008D7660 +// FUNCTION: fn_12121 +int UISayDialogWnd::ButtonX(UIBitmapButton* button) { + int x = this->geometry.width - 4; + for (UIWindow* other : this->m_buttons) { + if (button != other) { + x += -4 - static_cast(other)->BitmapWidth(); + } + } + return x - button->BitmapWidth(); +} // OFFSET: 0x008FFBE0 // FUNCTION: fn_12363 diff --git a/Source/UI/Dialogs/UISayDialogWnd.h b/Source/UI/Dialogs/UISayDialogWnd.h index 7ffd6525..4a672e63 100644 --- a/Source/UI/Dialogs/UISayDialogWnd.h +++ b/Source/UI/Dialogs/UISayDialogWnd.h @@ -23,6 +23,7 @@ public: void Slot11() override; void Slot19() override; void Paint() override; + int ButtonX(UIBitmapButton* button); }; #endif