aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid Walter Seikel2014-05-18 09:52:30 +1000
committerDavid Walter Seikel2014-05-18 09:52:30 +1000
commit22c309e3a8ba451e568db05e31a7e6284cca8f80 (patch)
treef40be6114b17683f21eb60378072b00ab7a3c134 /src
parentImplement text entry and text box widgets. (diff)
downloadSledjHamr-22c309e3a8ba451e568db05e31a7e6284cca8f80.zip
SledjHamr-22c309e3a8ba451e568db05e31a7e6284cca8f80.tar.gz
SledjHamr-22c309e3a8ba451e568db05e31a7e6284cca8f80.tar.bz2
SledjHamr-22c309e3a8ba451e568db05e31a7e6284cca8f80.tar.xz
Implement hiding and showing window Lua functions.
Diffstat (limited to 'src')
-rw-r--r--src/GuiLua/GuiLua.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/GuiLua/GuiLua.c b/src/GuiLua/GuiLua.c
index 5a30ff9..2fa9bcb 100644
--- a/src/GuiLua/GuiLua.c
+++ b/src/GuiLua/GuiLua.c
@@ -234,6 +234,24 @@ static int widShow(lua_State *L)
234 return 0; 234 return 0;
235} 235}
236 236
237static int winHide(lua_State *L)
238{
239 winFang *win = lua_touserdata(L, 1);
240
241 if (win)
242 winFangHide(win);
243 return 0;
244}
245
246static int winShow(lua_State *L)
247{
248 winFang *win = lua_touserdata(L, 1);
249
250 if (win)
251 winFangShow(win);
252 return 0;
253}
254
237static int text(lua_State *L) 255static int text(lua_State *L)
238{ 256{
239 Widget *wid = lua_touserdata(L, 1); 257 Widget *wid = lua_touserdata(L, 1);
@@ -395,6 +413,9 @@ PD("GuiLua 3");
395 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "show", "Show a widget.", widShow, 0); 413 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "show", "Show a widget.", widShow, 0);
396 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "text", "Set the text for a widget.", text, "string", 0); 414 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "text", "Set the text for a widget.", text, "string", 0);
397 415
416 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "vanish", "Hide a window.", winHide, 0);
417 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "appear", "Show a window.", winShow, 0);
418
398 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0); 419 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "loopWindow", "Run our windows main loop.", loopWindow, 0);
399 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0); 420 push_lua(L, "@ ( = $ $ & )", skang, THINGASM, skang, "quit", "Quit, exit, remove thyself.", quit, 0);
400 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0); // TODO - closeWindow, "userdata"); 421 push_lua(L, "@ ( = $ $ & $ )", skang, THINGASM, skang, "closeWindow", "Closes a window.", closeWindow, "userdata", 0); // TODO - closeWindow, "userdata");