Fixed cheat console in main menu
parent
1dd3a4d57e
commit
2f5d4e3b2f
|
@ -688,18 +688,20 @@ bool CRobotMain::ProcessEvent(Event &event)
|
|||
}
|
||||
|
||||
// Management of the console.
|
||||
if (m_phase != PHASE_NAME &&
|
||||
!m_movie->IsExist() &&
|
||||
!m_movieLock && !m_editLock && !m_engine->GetPause() &&
|
||||
event.type == EVENT_KEY_DOWN &&
|
||||
if (event.type == EVENT_KEY_DOWN &&
|
||||
event.key.key == KEY(BACKQUOTE)) // Pause ?
|
||||
{
|
||||
Ui::CEdit* pe = static_cast<Ui::CEdit*>(m_interface->SearchControl(EVENT_CMD));
|
||||
if (pe == nullptr) return false;
|
||||
pe->SetState(Ui::STATE_VISIBLE);
|
||||
pe->SetFocus(true);
|
||||
if (m_phase == PHASE_SIMUL) ChangePause(PAUSE_CHEAT);
|
||||
m_cmdEdit = true;
|
||||
if(m_phase != PHASE_NAME &&
|
||||
!m_movie->IsExist() &&
|
||||
!m_movieLock && !m_editLock && !m_engine->GetPause())
|
||||
{
|
||||
Ui::CEdit* pe = static_cast<Ui::CEdit*>(m_interface->SearchControl(EVENT_CMD));
|
||||
if (pe == nullptr) return false;
|
||||
pe->SetState(Ui::STATE_VISIBLE);
|
||||
pe->SetFocus(true);
|
||||
if (m_phase == PHASE_SIMUL) ChangePause(PAUSE_CHEAT);
|
||||
m_cmdEdit = true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (event.type == EVENT_KEY_DOWN &&
|
||||
|
|
|
@ -1845,17 +1845,17 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
|
||||
if ( m_phase == PHASE_WELCOME1 && m_phaseTime >= welcomeLength )
|
||||
{
|
||||
ChangePhase(PHASE_WELCOME2);
|
||||
m_main->ChangePhase(PHASE_WELCOME2);
|
||||
return true;
|
||||
}
|
||||
if ( m_phase == PHASE_WELCOME2 && m_phaseTime >= welcomeLength )
|
||||
{
|
||||
ChangePhase(PHASE_WELCOME3);
|
||||
m_main->ChangePhase(PHASE_WELCOME3);
|
||||
return true;
|
||||
}
|
||||
if ( m_phase == PHASE_WELCOME3 && m_phaseTime >= welcomeLength )
|
||||
{
|
||||
ChangePhase(PHASE_NAME);
|
||||
m_main->ChangePhase(PHASE_NAME);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1984,7 +1984,9 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
//? StartQuit(); // would you leave?
|
||||
m_sound->Play(SOUND_TZOING);
|
||||
m_main->ChangePhase(PHASE_GENERIC);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_QUIT:
|
||||
|
@ -2022,7 +2024,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -2271,7 +2273,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -2774,7 +2776,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
if ( event.type == EVENT_KEY_DOWN ||
|
||||
event.type == EVENT_MOUSE_BUTTON_DOWN )
|
||||
{
|
||||
ChangePhase(PHASE_WELCOME2);
|
||||
m_main->ChangePhase(PHASE_WELCOME2);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -2783,7 +2785,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
if ( event.type == EVENT_KEY_DOWN ||
|
||||
event.type == EVENT_MOUSE_BUTTON_DOWN )
|
||||
{
|
||||
ChangePhase(PHASE_WELCOME3);
|
||||
m_main->ChangePhase(PHASE_WELCOME3);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -2792,7 +2794,7 @@ bool CMainDialog::EventProcess(const Event &event)
|
|||
if ( event.type == EVENT_KEY_DOWN ||
|
||||
event.type == EVENT_MOUSE_BUTTON_DOWN )
|
||||
{
|
||||
ChangePhase(PHASE_NAME);
|
||||
m_main->ChangePhase(PHASE_NAME);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue