dev-time-step
piotrwalkusz1 2015-11-08 19:03:35 +01:00
parent ad9915d1e4
commit ce480c1720
4 changed files with 39 additions and 30 deletions

View File

@ -427,6 +427,12 @@ void CRobotMain::ChangePhase(Phase phase)
m_phase = phase;
if (m_phase != PHASE_SIMUL)
{
Ui::CWindow* pw = static_cast<Ui::CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if ( pw != nullptr ) pw->ClearState(Ui::STATE_VISIBLE | Ui::STATE_ENABLE);
}
if (resetWorld)
{
m_winDelay = 0.0f;
@ -5914,6 +5920,8 @@ void CRobotMain::StartDetectEffect(COldObject* object, CObject* target)
}
void CRobotMain::CreateCodeBattleInterface()
{
if(m_phase == PHASE_SIMUL)
{
Math::Point pos, ddim;
@ -5943,6 +5951,7 @@ void CRobotMain::CreateCodeBattleInterface()
pw->CreateButton(pos, ddim, 13, EVENT_CODE_BATTLE_SPECTATOR);
}
}
}
void CRobotMain::DestroyCodeBattleInterface()
{

View File

@ -368,7 +368,7 @@ void CDisplayInfo::StartDisplayInfo(std::string filename, int index, bool bSoluc
m_camera->SetType(Gfx::CAM_TYPE_INFO);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if (pw != nullptr) pw->ClearState(STATE_VISIBLE);
if (pw != nullptr) pw->ClearState(STATE_VISIBLE | STATE_ENABLE);
pos = m_infoActualPos = m_infoFinalPos;
dim = m_infoActualDim = m_infoFinalDim;
@ -830,7 +830,7 @@ void CDisplayInfo::StopDisplayInfo()
m_main->SetEditLock(false, false);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if (pw != nullptr) pw->SetState(STATE_VISIBLE);
if (pw != nullptr) pw->SetState(STATE_VISIBLE | STATE_ENABLE);
}
m_pause->DeactivatePause(m_satcomPause);
m_satcomPause = nullptr;

View File

@ -371,7 +371,7 @@ void CMainDialog::StartDialog(Math::Point dim, bool fireParticles)
if ( pw != nullptr ) pw->ClearState(STATE_ENABLE);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if ( pw != nullptr ) pw->ClearState(STATE_VISIBLE);
if ( pw != nullptr ) pw->ClearState(STATE_VISIBLE | STATE_ENABLE);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW7));
if ( pw != nullptr ) pw->ClearState(STATE_ENABLE);
@ -526,7 +526,7 @@ void CMainDialog::StopDialog()
if ( pw != nullptr ) pw->SetState(STATE_ENABLE);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if ( pw != nullptr ) pw->SetState(STATE_VISIBLE);
if ( pw != nullptr ) pw->SetState(STATE_VISIBLE | STATE_ENABLE);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW7));
if ( pw != nullptr ) pw->SetState(STATE_ENABLE);

View File

@ -585,7 +585,7 @@ void CStudio::StartEditScript(CScript *script, std::string name, Program* progra
m_script->SetStepMode(!m_bRealTime);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if (pw != nullptr) pw->ClearState(STATE_VISIBLE);
if (pw != nullptr) pw->ClearState(STATE_VISIBLE | STATE_ENABLE);
pos = m_editFinalPos = m_editActualPos = m_settings->GetWindowPos();
dim = m_editFinalDim = m_editActualDim = m_settings->GetWindowDim();
@ -911,7 +911,7 @@ bool CStudio::StopEditScript(bool bCancel)
m_interface->DeleteControl(EVENT_WINDOW3);
pw = static_cast<CWindow*>(m_interface->SearchControl(EVENT_WINDOW6));
if (pw != nullptr) pw->SetState(STATE_VISIBLE);
if (pw != nullptr) pw->SetState(STATE_VISIBLE | STATE_ENABLE);
m_pause->DeactivatePause(m_editorPause);
m_editorPause = nullptr;