From c22e55b99a38d405fb79184106261229bd2d1855 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Thu, 10 Jul 2014 16:52:29 +0200 Subject: Removed some unused code related to Quit button The button itself has been removed a long time ago --- src/object/robotmain.cpp | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'src/object') diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 76c234d..83b9fc9 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -859,8 +859,6 @@ CRobotMain::CRobotMain(CApplication* app, bool loadProfile) CBotProgram::DefineNum("ResearchSubber", RESEARCH_SUBM); CBotProgram::DefineNum("ResearchSniffer", RESEARCH_SNIFFER); -//? CBotProgram:: - CBotProgram::DefineNum("PolskiPortalColobota", 1337); CBotClass* bc; @@ -1215,14 +1213,6 @@ void CRobotMain::ChangePhase(Phase phase) m_app->ResetTimeAfterLoading(); - /*Math::Point ddim; - - pos.x = 620.0f/640.0f; - pos.y = 460.0f/480.0f; - ddim.x = 20.0f/640.0f; - ddim.y = 20.0f/480.0f; - m_interface->CreateButton(pos, ddim, 11, EVENT_BUTTON_QUIT);*/ - if (m_immediatSatCom && !loading && m_infoFilename[SATCOM_HUSTON][0] != 0) StartDisplayInfo(SATCOM_HUSTON, false); // shows the instructions @@ -1638,18 +1628,6 @@ bool CRobotMain::ProcessEvent(Event &event) m_cameraZoom = 0.0f; break; - case EVENT_BUTTON_QUIT: - if (m_movie->IsExist()) - StartDisplayInfo(SATCOM_HUSTON, false); - else if (m_winDelay > 0.0f) - ChangePhase(PHASE_WIN); - else if (m_lostDelay > 0.0f) - - ChangePhase(PHASE_LOST); - else - m_dialog->StartAbort(); // do you want to leave? - break; - case EVENT_OBJECT_LIMIT: StartShowLimit(); break; @@ -2189,12 +2167,6 @@ void CRobotMain::StartDisplayInfo(const char *filename, int index) m_sound->MuteAll(true); } - Ui::CButton* pb = static_cast(m_interface->SearchControl(EVENT_BUTTON_QUIT)); - if (pb != nullptr) - { - pb->ClearState(Ui::STATE_VISIBLE); - } - bool soluce = m_dialog->GetSceneSoluce(); m_displayInfo = new Ui::CDisplayInfo(); @@ -2223,10 +2195,6 @@ void CRobotMain::StopDisplayInfo() if (!m_editLock) { - Ui::CButton* pb = static_cast(m_interface->SearchControl(EVENT_BUTTON_QUIT)); - if (pb != nullptr) - pb->SetState(Ui::STATE_VISIBLE); - SelectObject(m_infoObject, false); // gives the command buttons m_displayText->HideText(false); @@ -2264,20 +2232,12 @@ void CRobotMain::StartSuspend() m_infoObject = DeselectAll(); // removes the control buttons m_displayText->HideText(true); - Ui::CButton* pb = static_cast(m_interface->SearchControl(EVENT_BUTTON_QUIT)); - if (pb != nullptr) - pb->ClearState(Ui::STATE_VISIBLE); - m_suspend = true; } //! End of dialogue during the game void CRobotMain::StopSuspend() { - Ui::CButton* pb = static_cast(m_interface->SearchControl(EVENT_BUTTON_QUIT)); - if (pb != nullptr) - pb->SetState(Ui::STATE_VISIBLE); - SelectObject(m_infoObject, false); // gives the command buttons m_map->ShowMap(m_mapShow); m_displayText->HideText(false); -- cgit v1.2.3-1-g7c22