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