diff --git a/Source/UI/Window/UIMessageBox.cpp b/Source/UI/Window/UIMessageBox.cpp index f7e233da8..20ab05067 100644 --- a/Source/UI/Window/UIMessageBox.cpp +++ b/Source/UI/Window/UIMessageBox.cpp @@ -613,7 +613,7 @@ __forceinline void UIMessageBox::FormatCountdown() { // OFFSET: 0x008A7350 // FUNCTION: fn_11713 void UIMessageBox::Configure( - const char* text, int type, bool defaultAccept, int timeout, const char* title, int width, int height, int modalValue, const char* icon + const char* text, int type, int defaultAccept, int timeout, const char* title, int width, int height, int modalValue, const char* icon ) { this->caption = title; this->messageText = text; @@ -1424,7 +1424,7 @@ void UINoticeWnd::OnWheel(int delta) { // OFFSET: 0x008A8AD0 // FUNCTION: fn_11715 void UIPayConfirmWnd::Configure(const std::string& text, int itemId) { - reinterpret_cast(this)->Configure(text.c_str(), 2, true, 0, LookupMessage(MSI_TITLE_QUEST_BOARD_INFO), 0xDC, 0x85, 1, nullptr); + reinterpret_cast(this)->Configure(text.c_str(), 2, 187, 0, LookupMessage(MSI_TITLE_QUEST_BOARD_INFO), 0xDC, 0x85, 1, nullptr); this->viewer->Resize(0xA5, 0x50); this->viewer->Move(7, 0x17); diff --git a/Source/UI/Window/UIMessageBox.h b/Source/UI/Window/UIMessageBox.h index 4b32a0109..923b3f8fd 100644 --- a/Source/UI/Window/UIMessageBox.h +++ b/Source/UI/Window/UIMessageBox.h @@ -16,7 +16,7 @@ public: void OnProcess() override; void Paint() override; int SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) override; - void Configure(const char* text, int type, bool defaultAccept, int timeout, const char* caption, int width, int height, int modal, const char* icon); + void Configure(const char* text, int type, int defaultAccept, int timeout, const char* caption, int width, int height, int modal, const char* icon); /* 00B4 */ UITextViewer* viewer; /* 00B8 */ int padding_00B8; diff --git a/Source/UI/Window/UIWindowMgr.h b/Source/UI/Window/UIWindowMgr.h index d0d0c65d5..c814fbd8a 100644 --- a/Source/UI/Window/UIWindowMgr.h +++ b/Source/UI/Window/UIWindowMgr.h @@ -490,9 +490,9 @@ public: void DeferDeletion(UIWindow* window); UIWindow* Top() const; void RestoreInput(); - int Confirm(const char* text, int type, bool defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect); + int Confirm(const char* text, int type, int defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect); void AddMessageBox( - const char* text, int type, bool defaultAccept, int unused, int timeout, const char* caption, int width, int height, const char* icon, bool track + const char* text, int type, int defaultAccept, int unused, int timeout, const char* caption, int width, int height, const char* icon, bool track ); int RunModal(UIWindow* window); int RunEmailAddress(); diff --git a/Source/UI/Window/WindowDialogs.cpp b/Source/UI/Window/WindowDialogs.cpp index 0f210efb4..d20639062 100644 --- a/Source/UI/Window/WindowDialogs.cpp +++ b/Source/UI/Window/WindowDialogs.cpp @@ -147,7 +147,7 @@ void UIWindowMgr::RestoreInput() { // OFFSET: 0x00A901E0 // FUNCTION: fn_17153 int UIWindowMgr::Confirm( - const char* text, int type, bool defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect + const char* text, int type, int defaultAccept, bool replace, int timeout, const char* caption, int width, int height, unsigned char protect ) { CMode* gameMode = g_modeMgr.GetGameMode(); if (gameMode && static_cast(gameMode)->isInitializing[0] == 1) { @@ -183,6 +183,12 @@ int UIWindowMgr::Confirm( } this->hoverWindow = nullptr; + + if (box == nullptr) { + this->RestoreInput(); + return 185; + } + this->modalResponse = 0; this->modalWindows.push_back(box); int response = 184; @@ -249,7 +255,7 @@ int UIWindowMgr::Confirm( // OFFSET: 0x00AA20F0 // FUNCTION: fn_17211 void UIWindowMgr::AddMessageBox( - const char* text, int type, bool defaultAccept, int, int timeout, const char* caption, int width, int height, const char* icon, bool track + const char* text, int type, int defaultAccept, int, int timeout, const char* caption, int width, int height, const char* icon, bool track ) { if (this->messageBoxes.size() > 5) { MessageBoxA(hWnd, "Max MessageBox Count", "ERROR", 0);