diff options
| author | jacob1 <jfu614@gmail.com> | 2012-10-04 03:01:28 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-10-05 15:32:39 (GMT) |
| commit | 72b00ca5e142569d6911c1c009e3cce4d89c2627 (patch) | |
| tree | 4d4a193694958f0706e14a86b82d6f1c5596dc07 /src | |
| parent | e600c20ba95c072631a4320f8be3810e7a6f631d (diff) | |
| download | powder-72b00ca5e142569d6911c1c009e3cce4d89c2627.zip powder-72b00ca5e142569d6911c1c009e3cce4d89c2627.tar.gz | |
info tip on deco/ngrav/aheat changed
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/GameController.cpp | 3 | ||||
| -rw-r--r-- | src/game/GameModel.cpp | 19 | ||||
| -rw-r--r-- | src/game/GameModel.h | 2 | ||||
| -rw-r--r-- | src/game/QuickOptions.h | 10 |
4 files changed, 28 insertions, 6 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 1fd813c..1928a0b 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -753,8 +753,7 @@ void GameController::SwitchAir() void GameController::ToggleAHeat() { - gameModel->GetSimulation()->aheat_enable = !gameModel->GetSimulation()->aheat_enable; - gameModel->UpdateQuickOptions(); + gameModel->SetAHeatEnable(!gameModel->GetAHeatEnable()); } diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 6f30b5e..97c7aad 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -754,6 +754,10 @@ void GameModel::SetDecoration(bool decorationState) ren->decorations_enable = decorationState?1:0; notifyDecorationChanged(); UpdateQuickOptions(); + if (decorationState) + SetInfoTip("Decorations Layer: On"); + else + SetInfoTip("Decorations Layer: Off"); } bool GameModel::GetDecoration() @@ -761,6 +765,21 @@ bool GameModel::GetDecoration() return ren->decorations_enable?true:false; } +void GameModel::SetAHeatEnable(bool aHeat) +{ + sim->aheat_enable = aHeat; + UpdateQuickOptions(); + if (aHeat) + SetInfoTip("Ambient Heat: On"); + else + SetInfoTip("Ambient Heat: Off"); +} + +bool GameModel::GetAHeatEnable() +{ + return sim->aheat_enable; +} + void GameModel::FrameStep(int frames) { sim->framerender += frames; diff --git a/src/game/GameModel.h b/src/game/GameModel.h index 61d0c93..3a18935 100644 --- a/src/game/GameModel.h +++ b/src/game/GameModel.h @@ -156,6 +156,8 @@ public: void SetPaused(bool pauseState); bool GetDecoration(); void SetDecoration(bool decorationState); + bool GetAHeatEnable(); + void SetAHeatEnable(bool aHeat); void ClearSimulation(); vector<Menu*> GetMenuList(); vector<Tool*> GetUnlistedTools(); diff --git a/src/game/QuickOptions.h b/src/game/QuickOptions.h index 61a6de8..431f5e9 100644 --- a/src/game/QuickOptions.h +++ b/src/game/QuickOptions.h @@ -47,11 +47,11 @@ public: } virtual bool GetToggle() { - return m->GetRenderer()->decorations_enable; + return m->GetDecoration(); } virtual void perform() { - m->GetRenderer()->decorations_enable = !m->GetRenderer()->decorations_enable; + m->SetDecoration(!m->GetDecoration()); } }; @@ -72,10 +72,12 @@ public: if(m->GetSimulation()->grav->ngrav_enable) { m->GetSimulation()->grav->stop_grav_async(); + m->SetInfoTip("Newtonian Gravity: Off"); } else { m->GetSimulation()->grav->start_grav_async(); + m->SetInfoTip("Newtonian Gravity: On"); } } }; @@ -90,10 +92,10 @@ public: } virtual bool GetToggle() { - return m->GetSimulation()->aheat_enable; + return m->GetAHeatEnable(); } virtual void perform() { - m->GetSimulation()->aheat_enable = !m->GetSimulation()->aheat_enable; + m->SetAHeatEnable(!m->GetAHeatEnable()); } }; |
