Commit a9a07742 authored by a1ex's avatar a1ex
Browse files

Lua: added console.clear()

--HG--
branch : lua_fix
parent 97beaa220d8a
...@@ -32,6 +32,16 @@ static int luaCB_console_hide(lua_State * L) ...@@ -32,6 +32,16 @@ static int luaCB_console_hide(lua_State * L)
return 0; return 0;
} }
/***
Clear the console contents
@function clear
*/
static int luaCB_console_clear(lua_State * L)
{
console_clear();
return 0;
}
/*** /***
Write some text to the console Write some text to the console
@tparam string text the text to write @tparam string text the text to write
...@@ -50,8 +60,9 @@ static const luaL_Reg consolelib[] = ...@@ -50,8 +60,9 @@ static const luaL_Reg consolelib[] =
{ {
{ "show", luaCB_console_show }, { "show", luaCB_console_show },
{ "hide", luaCB_console_hide }, { "hide", luaCB_console_hide },
{ "clear", luaCB_console_clear },
{ "write", luaCB_console_write }, { "write", luaCB_console_write },
{ NULL, NULL } { NULL, NULL }
}; };
LUA_LIB(console) LUA_LIB(console)
\ No newline at end of file
...@@ -8,6 +8,7 @@ int console_printf( const char* fmt, ... ); ...@@ -8,6 +8,7 @@ int console_printf( const char* fmt, ... );
void console_show(); void console_show();
void console_hide(); void console_hide();
void console_clear();
void console_draw_from_menu(); void console_draw_from_menu();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment