expose clearing all buttons to lua
This commit is contained in:
parent
e920f1df09
commit
9d4f2fad9a
1 changed files with 13 additions and 0 deletions
|
@ -861,6 +861,18 @@ void CallHandler(unsigned int handle, int value)
|
|||
lua_pop(Lua, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
** Clear all buttons
|
||||
**
|
||||
** @param l Lua state.
|
||||
*/
|
||||
static int CclClearButtons(lua_State *l)
|
||||
{
|
||||
LuaCheckArgs(l, 0);
|
||||
CleanButtons();
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
** Define a button.
|
||||
**
|
||||
|
@ -1192,6 +1204,7 @@ void UserInterfaceCclRegister()
|
|||
lua_register(Lua, "SetFancyBuildings", CclSetFancyBuildings);
|
||||
|
||||
lua_register(Lua, "DefineButton", CclDefineButton);
|
||||
lua_register(Lua, "ClearButtons", CclClearButtons);
|
||||
|
||||
lua_register(Lua, "DefineButtonStyle", CclDefineButtonStyle);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue