info tip on deco/ngrav/aheat changed

This commit is contained in:
jacob1 2012-10-03 23:01:28 -04:00 committed by Simon Robertshaw
parent e600c20ba9
commit 72b00ca5e1
4 changed files with 28 additions and 6 deletions

View File

@ -753,8 +753,7 @@ void GameController::SwitchAir()
void GameController::ToggleAHeat() void GameController::ToggleAHeat()
{ {
gameModel->GetSimulation()->aheat_enable = !gameModel->GetSimulation()->aheat_enable; gameModel->SetAHeatEnable(!gameModel->GetAHeatEnable());
gameModel->UpdateQuickOptions();
} }

View File

@ -754,6 +754,10 @@ void GameModel::SetDecoration(bool decorationState)
ren->decorations_enable = decorationState?1:0; ren->decorations_enable = decorationState?1:0;
notifyDecorationChanged(); notifyDecorationChanged();
UpdateQuickOptions(); UpdateQuickOptions();
if (decorationState)
SetInfoTip("Decorations Layer: On");
else
SetInfoTip("Decorations Layer: Off");
} }
bool GameModel::GetDecoration() bool GameModel::GetDecoration()
@ -761,6 +765,21 @@ bool GameModel::GetDecoration()
return ren->decorations_enable?true:false; 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) void GameModel::FrameStep(int frames)
{ {
sim->framerender += frames; sim->framerender += frames;

View File

@ -156,6 +156,8 @@ public:
void SetPaused(bool pauseState); void SetPaused(bool pauseState);
bool GetDecoration(); bool GetDecoration();
void SetDecoration(bool decorationState); void SetDecoration(bool decorationState);
bool GetAHeatEnable();
void SetAHeatEnable(bool aHeat);
void ClearSimulation(); void ClearSimulation();
vector<Menu*> GetMenuList(); vector<Menu*> GetMenuList();
vector<Tool*> GetUnlistedTools(); vector<Tool*> GetUnlistedTools();

View File

@ -47,11 +47,11 @@ public:
} }
virtual bool GetToggle() virtual bool GetToggle()
{ {
return m->GetRenderer()->decorations_enable; return m->GetDecoration();
} }
virtual void perform() 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) if(m->GetSimulation()->grav->ngrav_enable)
{ {
m->GetSimulation()->grav->stop_grav_async(); m->GetSimulation()->grav->stop_grav_async();
m->SetInfoTip("Newtonian Gravity: Off");
} }
else else
{ {
m->GetSimulation()->grav->start_grav_async(); m->GetSimulation()->grav->start_grav_async();
m->SetInfoTip("Newtonian Gravity: On");
} }
} }
}; };
@ -90,10 +92,10 @@ public:
} }
virtual bool GetToggle() virtual bool GetToggle()
{ {
return m->GetSimulation()->aheat_enable; return m->GetAHeatEnable();
} }
virtual void perform() virtual void perform()
{ {
m->GetSimulation()->aheat_enable = !m->GetSimulation()->aheat_enable; m->SetAHeatEnable(!m->GetAHeatEnable());
} }
}; };