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)
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
@tparam string text the text to write
......@@ -50,6 +60,7 @@ static const luaL_Reg consolelib[] =
{
{ "show", luaCB_console_show },
{ "hide", luaCB_console_hide },
{ "clear", luaCB_console_clear },
{ "write", luaCB_console_write },
{ NULL, NULL }
};
......
......@@ -8,6 +8,7 @@ int console_printf( const char* fmt, ... );
void console_show();
void console_hide();
void console_clear();
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