diff --git a/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp b/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp index 9a153b14b..4dc3c25b4 100644 --- a/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp +++ b/Source/UI/GameSettings/UIBattleMsgOptionWnd.cpp @@ -26,10 +26,11 @@ void UIBattleMsgOptionWnd::OnWheel(int delta) { if (step > 3) { step = 3; } - if (delta >= 0) { - step = -step; + if (delta < 0) { + this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, step, 0, 0, 0); + } else { + this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, -step, 0, 0, 0); } - this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, step, 0, 0, 0); } } @@ -134,8 +135,12 @@ void UIBattleMsgOptionWnd::OnLBtnDown(int x, int y) { if (this->hoveredOption != -1) { this->optionStates[this->hoveredOption] = this->optionStates[this->hoveredOption] == 0; - (this->useMainChatOptions ? g_session.m_noSubChatWnds : g_session.m_subChatWnds)[this->chatWindowIndex].options[this->hoveredOption] = - this->optionStates[this->hoveredOption]; + const bool state = this->optionStates[this->hoveredOption]; + if (this->useMainChatOptions) { + g_session.m_noSubChatWnds[this->chatWindowIndex].options[this->hoveredOption] = state; + } else { + g_session.m_subChatWnds[this->chatWindowIndex].options[this->hoveredOption] = state; + } this->allChecked = 1; for (int i = 0; i < 25; ++i) { if (this->optionStates[i] == 0) { @@ -143,8 +148,9 @@ void UIBattleMsgOptionWnd::OnLBtnDown(int x, int y) { break; } } - this->m_allCheckBox->geometry.state = this->allChecked; - this->m_allCheckBox->Invalidate(); + UICheckBox* checkBox = this->m_allCheckBox; + checkBox->geometry.state = this->allChecked; + checkBox->Invalidate(); this->Invalidate(); } } diff --git a/Source/UI/Items/MergeItemWnd.cpp b/Source/UI/Items/MergeItemWnd.cpp index 3f0b95883..32a386b37 100644 --- a/Source/UI/Items/MergeItemWnd.cpp +++ b/Source/UI/Items/MergeItemWnd.cpp @@ -217,10 +217,11 @@ void CMergeItemWnd::OnWheel(int delta) { if (step > 3) { step = 3; } - if (delta >= 0) { - step = -step; + if (delta < 0) { + this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, step, 0, 0, 0); + } else { + this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, -step, 0, 0, 0); } - this->SendMsg(this->m_scrollBar, UM_SCROLLVERT, step, 0, 0, 0); } } diff --git a/Source/UI/Login/UIEmailAddressWnd.cpp b/Source/UI/Login/UIEmailAddressWnd.cpp index 497f21dc8..a5deb582d 100644 --- a/Source/UI/Login/UIEmailAddressWnd.cpp +++ b/Source/UI/Login/UIEmailAddressWnd.cpp @@ -8,16 +8,17 @@ // OFFSET: 0x008F9820 // FUNCTION: fn_12341 int UIEmailAddressWnd::SendMsg(UIWindow* sender, int message, std::intptr_t a, std::intptr_t b, std::intptr_t c, std::intptr_t d) { - if (message == UM_COMMAND) { - g_windowMgr.modalResponse = static_cast(a); - if (a == 184) { - g_modeMgr.gameMode->SendMsg(LMM_SET_EMAIL_ADDRESS, reinterpret_cast(this->m_edit->Text()), 0, 0, 0); - } - - return 0; + if (message != UM_COMMAND) { + return UIFrameWnd::SendMsg(sender, message, a, b, c, d); } - return UIFrameWnd::SendMsg(sender, message, a, b, c, d); + g_windowMgr.modalResponse = static_cast(a); + if (a == 184) { + CMode* mode = g_modeMgr.gameMode; + mode->SendMsg(LMM_SET_EMAIL_ADDRESS, reinterpret_cast(this->m_edit->Text()), 0, 0, 0); + } + + return 0; } // OFFSET: 0x008C7800