summaryrefslogtreecommitdiff
path: root/src/cat/LegacyLuaAPI.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/cat/LegacyLuaAPI.cpp
parent6dad17c2e170abe561da0ba055c99b0c613e74bc (diff)
downloadpowder-162a8ecba57a3cea84149aa89d6eee742c1e2cea.zip
powder-162a8ecba57a3cea84149aa89d6eee742c1e2cea.tar.gz
readd tpt.hud and tpt.set_console commands
Diffstat (limited to 'src/cat/LegacyLuaAPI.cpp')
-rw-r--r--src/cat/LegacyLuaAPI.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/cat/LegacyLuaAPI.cpp b/src/cat/LegacyLuaAPI.cpp
index 8c52bfe..c6a41e1 100644
--- a/src/cat/LegacyLuaAPI.cpp
+++ b/src/cat/LegacyLuaAPI.cpp
@@ -12,7 +12,7 @@
#include "dialogues/ErrorMessage.h"
#include "dialogues/InformationMessage.h"
#include "dialogues/TextPrompt.h"
-#include "dialogues/ConfirmPrompt.h"
+#include "dialogues/ConfirmPrompt.h"
#include "simulation/Simulation.h"
#include "game/GameModel.h"
@@ -803,11 +803,12 @@ int luatpt_togglewater(lua_State* l)
int luatpt_setconsole(lua_State* l)
{
- /*int consolestate;
+ int consolestate;
consolestate = luaL_optint(l, 1, 0);
- console_mode = (consolestate==0?0:1);
- return 0;*/
- //TODO IMPLEMENT
+ if (consolestate)
+ luacon_controller->ShowConsole();
+ else
+ luacon_controller->HideConsole();
return 0;
}
@@ -1640,12 +1641,12 @@ int luatpt_getPartIndex(lua_State* l)
}
int luatpt_hud(lua_State* l)
{
- /*int hudstate;
- hudstate = luaL_optint(l, 1, 0);
- hud_enable = (hudstate==0?0:1);
- return 0;*/
- //TODO IMPLEMENT
- return 0;
+ int hudstate = luaL_optint(l, 1, 0);
+ if (hudstate)
+ luacon_controller->SetHudEnable(1);
+ else
+ luacon_controller->SetHudEnable(0);
+ return 0;
}
int luatpt_gravity(lua_State* l)
{