|
|
@@ -80,6 +80,7 @@ void luaRegister_RadioButton()
|
|
|
{"isEnabled", lua_RadioButton_isEnabled},
|
|
|
{"isSelected", lua_RadioButton_isSelected},
|
|
|
{"release", lua_RadioButton_release},
|
|
|
+ {"removeListener", lua_RadioButton_removeListener},
|
|
|
{"removeScriptCallback", lua_RadioButton_removeScriptCallback},
|
|
|
{"setAlignment", lua_RadioButton_setAlignment},
|
|
|
{"setAnimationPropertyValue", lua_RadioButton_setAnimationPropertyValue},
|
|
|
@@ -2807,6 +2808,48 @@ int lua_RadioButton_release(lua_State* state)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+int lua_RadioButton_removeListener(lua_State* state)
|
|
|
+{
|
|
|
+ // Get the number of parameters.
|
|
|
+ int paramCount = lua_gettop(state);
|
|
|
+
|
|
|
+ // Attempt to match the parameters to a valid binding.
|
|
|
+ switch (paramCount)
|
|
|
+ {
|
|
|
+ case 2:
|
|
|
+ {
|
|
|
+ if ((lua_type(state, 1) == LUA_TUSERDATA) &&
|
|
|
+ (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL))
|
|
|
+ {
|
|
|
+ // Get parameter 1 off the stack.
|
|
|
+ bool param1Valid;
|
|
|
+ ScriptUtil::LuaArray<Control::Listener> param1 = ScriptUtil::getObjectPointer<Control::Listener>(2, "ControlListener", false, ¶m1Valid);
|
|
|
+ if (!param1Valid)
|
|
|
+ {
|
|
|
+ lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'.");
|
|
|
+ lua_error(state);
|
|
|
+ }
|
|
|
+
|
|
|
+ RadioButton* instance = getInstance(state);
|
|
|
+ instance->removeListener(param1);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ lua_pushstring(state, "lua_RadioButton_removeListener - Failed to match the given parameters to a valid function signature.");
|
|
|
+ lua_error(state);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ default:
|
|
|
+ {
|
|
|
+ lua_pushstring(state, "Invalid number of parameters (expected 2).");
|
|
|
+ lua_error(state);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
int lua_RadioButton_removeScriptCallback(lua_State* state)
|
|
|
{
|
|
|
// Get the number of parameters.
|