diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-22 14:14:17 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2013-03-22 14:14:17 (GMT) |
| commit | 9abe51526cac2634af0541c3de69834dd30e9f78 (patch) | |
| tree | 6ae4deadfe00a83094b9d288d8c11d8ce823577a /src/options/OptionsController.cpp | |
| parent | 2c311b9a36a88fadd96f3d39acb1ab2590835d81 (diff) | |
| download | powder-9abe51526cac2634af0541c3de69834dd30e9f78.zip powder-9abe51526cac2634af0541c3de69834dd30e9f78.tar.gz | |
Move all GUI source files into gui/
Diffstat (limited to 'src/options/OptionsController.cpp')
| -rw-r--r-- | src/options/OptionsController.cpp | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/src/options/OptionsController.cpp b/src/options/OptionsController.cpp deleted file mode 100644 index 17c42f4..0000000 --- a/src/options/OptionsController.cpp +++ /dev/null @@ -1,111 +0,0 @@ -#include "OptionsController.h" -#include "dialogues/ErrorMessage.h" - -OptionsController::OptionsController(GameModel * gModel_, ControllerCallback * callback_): - callback(callback_), - gModel(gModel_), - HasExited(false) -{ - view = new OptionsView(); - model = new OptionsModel(gModel); - model->AddObserver(view); - - view->AttachController(this); - -} - -void OptionsController::SetHeatSimulation(bool state) -{ - model->SetHeatSimulation(state); -} - -void OptionsController::SetAmbientHeatSimulation(bool state) -{ - model->SetAmbientHeatSimulation(state); -} - -void OptionsController::SetNewtonianGravity(bool state) -{ - model->SetNewtonianGravity(state); -} - -void OptionsController::SetWaterEqualisation(bool state) -{ - model->SetWaterEqualisation(state); -} - -void OptionsController::SetGravityMode(int gravityMode) -{ - model->SetGravityMode(gravityMode); -} - -void OptionsController::SetAirMode(int airMode) -{ - model->SetAirMode(airMode); -} - -void OptionsController::SetEdgeMode(int airMode) -{ - model->SetEdgeMode(airMode); -} - -void OptionsController::SetFullscreen(bool fullscreen) -{ - model->SetFullscreen(fullscreen); -} - -void OptionsController::SetShowAvatars(bool showAvatars) -{ - model->SetShowAvatars(showAvatars); -} - -void OptionsController::SetScale(bool scale) -{ - if(scale) - { - if(ui::Engine::Ref().GetMaxWidth() >= ui::Engine::Ref().GetWidth() * 2 && ui::Engine::Ref().GetMaxHeight() >= ui::Engine::Ref().GetHeight() * 2) - model->SetScale(scale); - else - { - new ErrorMessage("Screen resolution error", "Your screen size is too small to use this scale mode."); - model->SetScale(false); - } - } - else - model->SetScale(scale); - -} - -void OptionsController::SetFastQuit(bool fastquit) -{ - model->SetFastQuit(fastquit); -} - -OptionsView * OptionsController::GetView() -{ - return view; -} - -void OptionsController::Exit() -{ - if(ui::Engine::Ref().GetWindow() == view) - { - ui::Engine::Ref().CloseWindow(); - } - if(callback) - callback->ControllerExit(); - HasExited = true; -} - - -OptionsController::~OptionsController() { - if(ui::Engine::Ref().GetWindow() == view) - { - ui::Engine::Ref().CloseWindow(); - } - delete model; - delete view; - if(callback) - delete callback; -} - |
