summaryrefslogtreecommitdiffstats
path: root/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/displayinfo.cpp11
-rw-r--r--src/ui/displayinfo.h19
-rw-r--r--src/ui/maindialog.cpp7
-rw-r--r--src/ui/maindialog.h33
-rw-r--r--src/ui/studio.cpp13
-rw-r--r--src/ui/studio.h13
6 files changed, 54 insertions, 42 deletions
diff --git a/src/ui/displayinfo.cpp b/src/ui/displayinfo.cpp
index 79eb38a..8db53c5 100644
--- a/src/ui/displayinfo.cpp
+++ b/src/ui/displayinfo.cpp
@@ -59,6 +59,7 @@ CDisplayInfo::CDisplayInfo()
m_main = CRobotMain::GetInstancePointer();
m_interface = m_main->GetInterface();
m_camera = m_main->GetCamera();
+ m_pause = CPauseManager::GetInstancePointer();
m_bInfoMaximized = true;
m_bInfoMinimized = false;
@@ -330,13 +331,13 @@ void CDisplayInfo::HyperUpdate()
void CDisplayInfo::StartDisplayInfo(std::string filename, int index, bool bSoluce)
{
- Gfx::Light light;
+ Gfx::Light light;
Math::Point pos, dim;
Ui::CWindow* pw;
Ui::CEdit* edit;
Ui::CButton* button;
Ui::CSlider* slider;
- CMotionToto* toto;
+ CMotionToto* toto;
m_index = index;
m_bSoluce = bSoluce;
@@ -355,8 +356,8 @@ void CDisplayInfo::StartDisplayInfo(std::string filename, int index, bool bSoluc
m_main->SetEditLock(true, false);
m_main->SetEditFull(false);
- m_bInitPause = m_engine->GetPause();
- m_engine->SetPause(true);
+ m_bInitPause = m_pause->GetPauseType();
+ m_pause->SetPause(PAUSE_SATCOM);
m_infoCamera = m_camera->GetType();
m_camera->SetType(Gfx::CAM_TYPE_INFO);
@@ -839,7 +840,7 @@ void CDisplayInfo::StopDisplayInfo()
}
else
{
- if ( !m_bInitPause ) m_engine->SetPause(false);
+ m_pause->SetPause(m_bInitPause);
m_main->SetEditLock(false, false);
}
m_camera->SetType(m_infoCamera);
diff --git a/src/ui/displayinfo.h b/src/ui/displayinfo.h
index eea50b7..891551b 100644
--- a/src/ui/displayinfo.h
+++ b/src/ui/displayinfo.h
@@ -25,6 +25,8 @@
#include "graphics/engine/camera.h"
+#include "app/pausemanager.h"
+
class CRobotMain;
class CObject;
class CEventQueue;
@@ -67,13 +69,14 @@ protected:
void CreateObjectsFile();
protected:
- Gfx::CEngine* m_engine;
- CEventQueue* m_event;
- CRobotMain* m_main;
- Gfx::CCamera* m_camera;
- CInterface* m_interface;
- Gfx::CParticle* m_particle;
- Gfx::CLightManager* m_light;
+ Gfx::CEngine* m_engine;
+ CEventQueue* m_event;
+ CRobotMain* m_main;
+ Gfx::CCamera* m_camera;
+ CInterface* m_interface;
+ Gfx::CParticle* m_particle;
+ Gfx::CLightManager* m_light;
+ CPauseManager* m_pause;
bool m_bInfoMaximized;
bool m_bInfoMinimized;
@@ -88,7 +91,7 @@ protected:
Math::Point m_infoFinalDim;
int m_lightSuppl;
bool m_bEditLock;
- bool m_bInitPause;
+ PauseType m_bInitPause;
bool m_bSoluce;
CObject* m_toto;
};
diff --git a/src/ui/maindialog.cpp b/src/ui/maindialog.cpp
index f3eca3a..b954c71 100644
--- a/src/ui/maindialog.cpp
+++ b/src/ui/maindialog.cpp
@@ -120,6 +120,7 @@ CMainDialog::CMainDialog()
m_camera = m_main->GetCamera();
m_engine = Gfx::CEngine::GetInstancePointer();
m_particle = m_engine->GetParticle();
+ m_pause = CPauseManager::GetInstancePointer();
m_phase = PHASE_NAME;
m_phaseSetup = PHASE_SETUPg;
@@ -6401,8 +6402,8 @@ void CMainDialog::StartSuspend()
{
m_sound->MuteAll(true);
m_main->ClearInterface();
- m_bInitPause = m_engine->GetPause();
- m_engine->SetPause(true);
+ m_bInitPause = m_pause->GetPauseType();
+ m_pause->SetPause(PAUSE_DIALOG);
m_engine->SetOverFront(false); // over flat behind
m_main->CreateShortcuts();
m_main->StartSuspend();
@@ -6416,7 +6417,7 @@ void CMainDialog::StopSuspend()
{
m_sound->MuteAll(false);
m_main->ClearInterface();
- if ( !m_bInitPause ) m_engine->SetPause(false);
+ m_pause->SetPause(m_bInitPause);
m_engine->SetOverFront(true); // over flat front
m_main->CreateShortcuts();
m_main->StopSuspend();
diff --git a/src/ui/maindialog.h b/src/ui/maindialog.h
index 96aff2a..444a568 100644
--- a/src/ui/maindialog.h
+++ b/src/ui/maindialog.h
@@ -23,6 +23,8 @@
#include "object/robotmain.h"
+#include "app/pausemanager.h"
+
#include <boost/filesystem.hpp>
#include <boost/algorithm/string.hpp>
@@ -186,6 +188,7 @@ protected:
Gfx::CParticle* m_particle;
Gfx::CCamera* m_camera;
CSoundInterface* m_sound;
+ CPauseManager* m_pause;
Phase m_phase; // copy of CRobotMain
Phase m_phaseSetup; // tab selected
@@ -242,26 +245,26 @@ protected:
bool m_bCameraInvertY; // for CCamera
bool m_bEffect; // for CCamera
- Math::Point m_glintMouse;
- float m_glintTime;
+ Math::Point m_glintMouse;
+ float m_glintTime;
- int m_loadingCounter;
+ int m_loadingCounter;
- bool m_bDialog; // this dialogue?
- bool m_bDialogFire; // setting on fire?
- bool m_bDialogDelete;
- Math::Point m_dialogPos;
- Math::Point m_dialogDim;
- float m_dialogParti;
- float m_dialogTime;
- bool m_bInitPause;
+ bool m_bDialog; // this dialogue?
+ bool m_bDialogFire; // setting on fire?
+ bool m_bDialogDelete;
+ Math::Point m_dialogPos;
+ Math::Point m_dialogDim;
+ float m_dialogParti;
+ float m_dialogTime;
+ PauseType m_bInitPause;
Gfx::CameraType m_initCamera;
- int m_partiPhase[10];
- float m_partiTime[10];
- Math::Point m_partiPos[10];
+ int m_partiPhase[10];
+ float m_partiTime[10];
+ Math::Point m_partiPos[10];
- SceneInfo m_sceneInfo[MAXSCENE];
+ SceneInfo m_sceneInfo[MAXSCENE];
std::vector<fs::path> m_saveList;
};
diff --git a/src/ui/studio.cpp b/src/ui/studio.cpp
index fb4dd3d..5a3b403 100644
--- a/src/ui/studio.cpp
+++ b/src/ui/studio.cpp
@@ -71,6 +71,7 @@ CStudio::CStudio()
m_main = CRobotMain::GetInstancePointer();
m_interface = m_main->GetInterface();
m_camera = m_main->GetCamera();
+ m_pause = CPauseManager::GetInstancePointer();
m_bEditMaximized = false;
m_bEditMinimized = false;
@@ -563,7 +564,7 @@ void CStudio::StartEditScript(CScript *script, std::string name, int rank)
m_main->SetEditLock(true, true);
m_main->SetEditFull(false);
- m_bInitPause = m_engine->GetPause();
+ m_bInitPause = m_pause->GetPauseType();
m_main->SetSpeed(1.0f);
m_editCamera = m_camera->GetType();
m_camera->SetType(Gfx::CAM_TYPE_EDIT);
@@ -882,7 +883,7 @@ bool CStudio::StopEditScript(bool bCancel)
button->SetState(STATE_VISIBLE);
}
- if ( !m_bInitPause ) m_engine->SetPause(false);
+ m_pause->SetPause(m_bInitPause);
m_sound->MuteAll(false);
m_main->SetEditLock(false, true);
m_camera->SetType(m_editCamera);
@@ -954,22 +955,22 @@ void CStudio::UpdateFlux()
#if 1
if ( m_bRealTime ) // run?
{
- m_engine->SetPause(false);
+ m_pause->ClearPause();
m_sound->MuteAll(false);
}
else // step by step?
{
- m_engine->SetPause(true);
+ m_pause->SetPause(PAUSE_EDITOR);
m_sound->MuteAll(true);
}
#else
- m_engine->SetPause(false);
+ m_pause->ClearPause();
m_sound->MuteAll(false);
#endif
}
else // stop?
{
- m_engine->SetPause(true);
+ m_pause->SetPause(PAUSE_EDITOR);
m_sound->MuteAll(true);
}
}
diff --git a/src/ui/studio.h b/src/ui/studio.h
index 1c14124..d1c6a51 100644
--- a/src/ui/studio.h
+++ b/src/ui/studio.h
@@ -22,6 +22,8 @@
#include "graphics/engine/camera.h"
+#include "app/pausemanager.h"
+
#include <boost/filesystem.hpp>
namespace fs = boost::filesystem;
@@ -96,6 +98,7 @@ protected:
CSoundInterface* m_sound;
CInterface* m_interface;
CApplication* m_app;
+ CPauseManager* m_pause;
int m_rank;
CScript* m_script;
@@ -109,11 +112,11 @@ protected:
Math::Point m_editFinalPos;
Math::Point m_editFinalDim;
- float m_time;
- float m_fixInfoTextTime;
- bool m_bRunning;
- bool m_bRealTime;
- bool m_bInitPause;
+ float m_time;
+ float m_fixInfoTextTime;
+ bool m_bRunning;
+ bool m_bRealTime;
+ PauseType m_bInitPause;
std::string m_helpFilename;
StudioDialog m_dialog;