summaryrefslogtreecommitdiff
path: root/src/game/GameController.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-01-09 03:00:45 (GMT)
committer jacob1 <jfu614@gmail.com>2013-01-09 03:00:45 (GMT)
commit162a8ecba57a3cea84149aa89d6eee742c1e2cea (patch)
tree9ea3a82a3b0ba704769830eebd362e25b02ad5d8 /src/game/GameController.cpp
parent6dad17c2e170abe561da0ba055c99b0c613e74bc (diff)
downloadpowder-162a8ecba57a3cea84149aa89d6eee742c1e2cea.zip
powder-162a8ecba57a3cea84149aa89d6eee742c1e2cea.tar.gz
readd tpt.hud and tpt.set_console commands
Diffstat (limited to 'src/game/GameController.cpp')
-rw-r--r--src/game/GameController.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp
index 2ec2cfc..3b9a64e 100644
--- a/src/game/GameController.cpp
+++ b/src/game/GameController.cpp
@@ -892,6 +892,11 @@ void GameController::ShowGravityGrid()
gameModel->UpdateQuickOptions();
}
+void GameController::SetHudEnable(bool hudState)
+{
+ gameView->SetHudEnable(hudState);
+}
+
void GameController::SetActiveColourPreset(int preset)
{
gameModel->SetActiveColourPreset(preset);
@@ -1107,7 +1112,16 @@ void GameController::ShowConsole()
{
if(!console)
console = new ConsoleController(NULL, commandInterface);
- ui::Engine::Ref().ShowWindow(console->GetView());
+ if (console->GetView() != ui::Engine::Ref().GetWindow())
+ ui::Engine::Ref().ShowWindow(console->GetView());
+}
+
+void GameController::HideConsole()
+{
+ if(!console)
+ return;
+ if (console->GetView() == ui::Engine::Ref().GetWindow())
+ ui::Engine::Ref().CloseWindow();
}
void GameController::OpenRenderOptions()