diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index 1fd813c32..1928a0bd6 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 6f30b5eb7..97c7aad57 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 61d0c93b6..3a18935fe 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 GetMenuList(); vector GetUnlistedTools(); diff --git a/src/game/QuickOptions.h b/src/game/QuickOptions.h index 61a6de8d4..431f5e92c 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()); } };