diff --git a/Source/UI/Buttons/UIButton.cpp b/Source/UI/Buttons/UIButton.cpp index 4cb3faec..69763790 100644 --- a/Source/UI/Buttons/UIButton.cpp +++ b/Source/UI/Buttons/UIButton.cpp @@ -174,10 +174,10 @@ void UIButton::Slot31(int x, int y) { if (parent) { if (WindowPolicy(g_windowMgr.policy[0].actions, g_replayAnimationScaling != 0, 3, parent->geometry.id) != 0) { int id = this->geometry.id; - if (id == 185 && g_charViewMode && static_cast(g_charViewMode)->cursorType == 2) { + if (id == 185 && g_modeMgr.gameMode && g_modeMgr.gameMode->cursorType == 2) { const char* text = LookupMessage(17); if (g_windowMgr.Confirm(text, 2, true, false, 0, "Message", 280, 120, 0) == 187) { - static_cast(g_charViewMode)->SendMsg(2, 0, 0, 0, 0); + g_modeMgr.gameMode->SendMsg(2, 0, 0, 0, 0); } } else { if (id == 184 || id == 321) { @@ -190,7 +190,7 @@ void UIButton::Slot31(int x, int y) { } } } else { - static_cast(g_charViewMode)->SendMsg(0, this->geometry.id, this->m_argument, 0, 0); + g_modeMgr.gameMode->SendMsg(0, this->geometry.id, this->m_argument, 0, 0); } }