#include "Base.h" #include "ScriptController.h" #include "lua_Button.h" #include "Animation.h" #include "AnimationTarget.h" #include "Base.h" #include "Button.h" #include "Control.h" #include "Game.h" #include "Gamepad.h" #include "Label.h" #include "Node.h" #include "Ref.h" #include "ScriptController.h" #include "ScriptTarget.h" #include "lua_ControlAlignment.h" #include "lua_ControlListenerEventType.h" #include "lua_ControlState.h" #include "lua_CurveInterpolationType.h" #include "lua_FontJustify.h" namespace gameplay { void luaRegister_Button() { const luaL_Reg lua_members[] = { {"addListener", lua_Button_addListener}, {"addRef", lua_Button_addRef}, {"addScriptCallback", lua_Button_addScriptCallback}, {"createAnimation", lua_Button_createAnimation}, {"createAnimationFromBy", lua_Button_createAnimationFromBy}, {"createAnimationFromTo", lua_Button_createAnimationFromTo}, {"destroyAnimation", lua_Button_destroyAnimation}, {"getAbsoluteBounds", lua_Button_getAbsoluteBounds}, {"getAlignment", lua_Button_getAlignment}, {"getAnimation", lua_Button_getAnimation}, {"getAnimationPropertyComponentCount", lua_Button_getAnimationPropertyComponentCount}, {"getAnimationPropertyValue", lua_Button_getAnimationPropertyValue}, {"getAutoHeight", lua_Button_getAutoHeight}, {"getAutoWidth", lua_Button_getAutoWidth}, {"getBorder", lua_Button_getBorder}, {"getBounds", lua_Button_getBounds}, {"getClip", lua_Button_getClip}, {"getClipBounds", lua_Button_getClipBounds}, {"getConsumeInputEvents", lua_Button_getConsumeInputEvents}, {"getCursorColor", lua_Button_getCursorColor}, {"getCursorRegion", lua_Button_getCursorRegion}, {"getCursorUVs", lua_Button_getCursorUVs}, {"getFocusIndex", lua_Button_getFocusIndex}, {"getFont", lua_Button_getFont}, {"getFontSize", lua_Button_getFontSize}, {"getHeight", lua_Button_getHeight}, {"getId", lua_Button_getId}, {"getImageColor", lua_Button_getImageColor}, {"getImageRegion", lua_Button_getImageRegion}, {"getImageUVs", lua_Button_getImageUVs}, {"getMargin", lua_Button_getMargin}, {"getOpacity", lua_Button_getOpacity}, {"getPadding", lua_Button_getPadding}, {"getRefCount", lua_Button_getRefCount}, {"getSkinColor", lua_Button_getSkinColor}, {"getSkinRegion", lua_Button_getSkinRegion}, {"getState", lua_Button_getState}, {"getStyle", lua_Button_getStyle}, {"getText", lua_Button_getText}, {"getTextAlignment", lua_Button_getTextAlignment}, {"getTextColor", lua_Button_getTextColor}, {"getTextRightToLeft", lua_Button_getTextRightToLeft}, {"getWidth", lua_Button_getWidth}, {"getX", lua_Button_getX}, {"getY", lua_Button_getY}, {"getZIndex", lua_Button_getZIndex}, {"isContainer", lua_Button_isContainer}, {"isEnabled", lua_Button_isEnabled}, {"isVisible", lua_Button_isVisible}, {"release", lua_Button_release}, {"removeListener", lua_Button_removeListener}, {"removeScriptCallback", lua_Button_removeScriptCallback}, {"setAlignment", lua_Button_setAlignment}, {"setAnimationPropertyValue", lua_Button_setAnimationPropertyValue}, {"setAutoHeight", lua_Button_setAutoHeight}, {"setAutoWidth", lua_Button_setAutoWidth}, {"setBorder", lua_Button_setBorder}, {"setBounds", lua_Button_setBounds}, {"setConsumeInputEvents", lua_Button_setConsumeInputEvents}, {"setCursorColor", lua_Button_setCursorColor}, {"setCursorRegion", lua_Button_setCursorRegion}, {"setEnabled", lua_Button_setEnabled}, {"setFocusIndex", lua_Button_setFocusIndex}, {"setFont", lua_Button_setFont}, {"setFontSize", lua_Button_setFontSize}, {"setHeight", lua_Button_setHeight}, {"setImageColor", lua_Button_setImageColor}, {"setImageRegion", lua_Button_setImageRegion}, {"setMargin", lua_Button_setMargin}, {"setOpacity", lua_Button_setOpacity}, {"setPadding", lua_Button_setPadding}, {"setPosition", lua_Button_setPosition}, {"setSize", lua_Button_setSize}, {"setSkinColor", lua_Button_setSkinColor}, {"setSkinRegion", lua_Button_setSkinRegion}, {"setState", lua_Button_setState}, {"setStyle", lua_Button_setStyle}, {"setText", lua_Button_setText}, {"setTextAlignment", lua_Button_setTextAlignment}, {"setTextColor", lua_Button_setTextColor}, {"setTextRightToLeft", lua_Button_setTextRightToLeft}, {"setVisible", lua_Button_setVisible}, {"setWidth", lua_Button_setWidth}, {"setZIndex", lua_Button_setZIndex}, {NULL, NULL} }; const luaL_Reg lua_statics[] = { {"ANIMATE_OPACITY", lua_Button_static_ANIMATE_OPACITY}, {"ANIMATE_POSITION", lua_Button_static_ANIMATE_POSITION}, {"ANIMATE_POSITION_X", lua_Button_static_ANIMATE_POSITION_X}, {"ANIMATE_POSITION_Y", lua_Button_static_ANIMATE_POSITION_Y}, {"ANIMATE_SIZE", lua_Button_static_ANIMATE_SIZE}, {"ANIMATE_SIZE_HEIGHT", lua_Button_static_ANIMATE_SIZE_HEIGHT}, {"ANIMATE_SIZE_WIDTH", lua_Button_static_ANIMATE_SIZE_WIDTH}, {"create", lua_Button_static_create}, {NULL, NULL} }; std::vector scopePath; gameplay::ScriptUtil::registerClass("Button", lua_members, NULL, lua_Button__gc, lua_statics, scopePath); } static Button* getInstance(lua_State* state) { void* userdata = luaL_checkudata(state, 1, "Button"); luaL_argcheck(state, userdata != NULL, 1, "'Button' expected."); return (Button*)((gameplay::ScriptUtil::LuaObject*)userdata)->instance; } int lua_Button__gc(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { void* userdata = luaL_checkudata(state, 1, "Button"); luaL_argcheck(state, userdata != NULL, 1, "'Button' expected."); gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)userdata; if (object->owns) { Button* instance = (Button*)object->instance; SAFE_RELEASE(instance); } return 0; } lua_pushstring(state, "lua_Button__gc - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_addListener(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 3: { 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) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "ControlListener", false, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'."); lua_error(state); } // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); Button* instance = getInstance(state); instance->addListener(param1, param2); return 0; } lua_pushstring(state, "lua_Button_addListener - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_addRef(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); instance->addRef(); return 0; } lua_pushstring(state, "lua_Button_addRef - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_addScriptCallback(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. std::string param1 = gameplay::ScriptUtil::getString(2, true); // Get parameter 2 off the stack. std::string param2 = gameplay::ScriptUtil::getString(3, true); Button* instance = getInstance(state); instance->addScriptCallback(param1, param2); return 0; } lua_pushstring(state, "lua_Button_addScriptCallback - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_createAnimation(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 3: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. const char* param2 = gameplay::ScriptUtil::getString(3, false); Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "Properties", false, ¶m2Valid); if (!param2Valid) break; Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_Button_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 7: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) && (lua_type(state, 7) == LUA_TSTRING || lua_type(state, 7) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5); // Get parameter 5 off the stack. gameplay::ScriptUtil::LuaArray param5 = gameplay::ScriptUtil::getFloatPointer(6); // Get parameter 6 off the stack. Curve::InterpolationType param6 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 7)); Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_Button_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 9: { do { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TTABLE || lua_type(state, 6) == LUA_TLIGHTUSERDATA) && (lua_type(state, 7) == LUA_TTABLE || lua_type(state, 7) == LUA_TLIGHTUSERDATA) && (lua_type(state, 8) == LUA_TTABLE || lua_type(state, 8) == LUA_TLIGHTUSERDATA) && (lua_type(state, 9) == LUA_TSTRING || lua_type(state, 9) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. unsigned int param3 = (unsigned int)luaL_checkunsigned(state, 4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray param4 = gameplay::ScriptUtil::getUnsignedIntPointer(5); // Get parameter 5 off the stack. gameplay::ScriptUtil::LuaArray param5 = gameplay::ScriptUtil::getFloatPointer(6); // Get parameter 6 off the stack. gameplay::ScriptUtil::LuaArray param6 = gameplay::ScriptUtil::getFloatPointer(7); // Get parameter 7 off the stack. gameplay::ScriptUtil::LuaArray param7 = gameplay::ScriptUtil::getFloatPointer(8); // Get parameter 8 off the stack. Curve::InterpolationType param8 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 9)); Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimation(param1, param2, param3, param4, param5, param6, param7, param8); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } } while (0); lua_pushstring(state, "lua_Button_createAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3, 7 or 9)."); lua_error(state); break; } } return 0; } int lua_Button_createAnimationFromBy(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 7: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) && lua_type(state, 7) == LUA_TNUMBER) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. gameplay::ScriptUtil::LuaArray param3 = gameplay::ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray param4 = gameplay::ScriptUtil::getFloatPointer(5); // Get parameter 5 off the stack. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6)); // Get parameter 6 off the stack. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7); Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimationFromBy(param1, param2, param3, param4, param5, param6); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_createAnimationFromBy - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 7)."); lua_error(state); break; } } return 0; } int lua_Button_createAnimationFromTo(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 7: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER && (lua_type(state, 4) == LUA_TTABLE || lua_type(state, 4) == LUA_TLIGHTUSERDATA) && (lua_type(state, 5) == LUA_TTABLE || lua_type(state, 5) == LUA_TLIGHTUSERDATA) && (lua_type(state, 6) == LUA_TSTRING || lua_type(state, 6) == LUA_TNIL) && lua_type(state, 7) == LUA_TNUMBER) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. int param2 = (int)luaL_checkint(state, 3); // Get parameter 3 off the stack. gameplay::ScriptUtil::LuaArray param3 = gameplay::ScriptUtil::getFloatPointer(4); // Get parameter 4 off the stack. gameplay::ScriptUtil::LuaArray param4 = gameplay::ScriptUtil::getFloatPointer(5); // Get parameter 5 off the stack. Curve::InterpolationType param5 = (Curve::InterpolationType)lua_enumFromString_CurveInterpolationType(luaL_checkstring(state, 6)); // Get parameter 6 off the stack. unsigned long param6 = (unsigned long)luaL_checkunsigned(state, 7); Button* instance = getInstance(state); void* returnPtr = (void*)instance->createAnimationFromTo(param1, param2, param3, param4, param5, param6); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_createAnimationFromTo - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 7)."); lua_error(state); break; } } return 0; } int lua_Button_destroyAnimation(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); instance->destroyAnimation(); return 0; } lua_pushstring(state, "lua_Button_destroyAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); Button* instance = getInstance(state); instance->destroyAnimation(param1); return 0; } lua_pushstring(state, "lua_Button_destroyAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getAbsoluteBounds(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getAbsoluteBounds()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getAbsoluteBounds - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getAlignment(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); Control::Alignment result = instance->getAlignment(); // Push the return value onto the stack. lua_pushstring(state, lua_stringFromEnum_ControlAlignment(result)); return 1; } lua_pushstring(state, "lua_Button_getAlignment - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getAnimation(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)instance->getAnimation(); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); Button* instance = getInstance(state); void* returnPtr = (void*)instance->getAnimation(param1); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Animation"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getAnimation - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getAnimationPropertyComponentCount(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_TNUMBER) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); Button* instance = getInstance(state); unsigned int result = instance->getAnimationPropertyComponentCount(param1); // Push the return value onto the stack. lua_pushunsigned(state, result); return 1; } lua_pushstring(state, "lua_Button_getAnimationPropertyComponentCount - 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_Button_getAnimationPropertyValue(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "AnimationValue", false, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'."); lua_error(state); } Button* instance = getInstance(state); instance->getAnimationPropertyValue(param1, param2); return 0; } lua_pushstring(state, "lua_Button_getAnimationPropertyValue - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_getAutoHeight(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->getAutoHeight(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_getAutoHeight - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getAutoWidth(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->getAutoWidth(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_getAutoWidth - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getBorder(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getBorder()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeSideRegions"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getBorder - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getBorder(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeSideRegions"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getBorder - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getBounds(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getBounds()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getBounds - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getClip(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getClip()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getClip - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getClipBounds(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getClipBounds()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getClipBounds - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getConsumeInputEvents(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->getConsumeInputEvents(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_getConsumeInputEvents - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getCursorColor(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getCursorColor(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getCursorColor - 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_Button_getCursorRegion(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getCursorRegion(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getCursorRegion - 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_Button_getCursorUVs(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getCursorUVs(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeUVs"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getCursorUVs - 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_Button_getFocusIndex(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); int result = instance->getFocusIndex(); // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } lua_pushstring(state, "lua_Button_getFocusIndex - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getFont(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)instance->getFont(); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Font"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getFont - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)instance->getFont(param1); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Font"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getFont - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getFontSize(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); unsigned int result = instance->getFontSize(); // Push the return value onto the stack. lua_pushunsigned(state, result); return 1; } lua_pushstring(state, "lua_Button_getFontSize - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); unsigned int result = instance->getFontSize(param1); // Push the return value onto the stack. lua_pushunsigned(state, result); return 1; } lua_pushstring(state, "lua_Button_getFontSize - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getHeight(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); float result = instance->getHeight(); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getHeight - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getId(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); const char* result = instance->getId(); // Push the return value onto the stack. lua_pushstring(state, result); return 1; } lua_pushstring(state, "lua_Button_getId - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getImageColor(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getImageColor(param1, param2)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getImageColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_getImageRegion(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getImageRegion(param1, param2)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getImageRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_getImageUVs(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. Control::State param2 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 3)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getImageUVs(param1, param2)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeUVs"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getImageUVs - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_getMargin(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getMargin()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeSideRegions"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getMargin - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getOpacity(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); float result = instance->getOpacity(); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getOpacity - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); float result = instance->getOpacity(param1); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getOpacity - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getPadding(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getPadding()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeSideRegions"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getPadding - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getRefCount(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); unsigned int result = instance->getRefCount(); // Push the return value onto the stack. lua_pushunsigned(state, result); return 1; } lua_pushstring(state, "lua_Button_getRefCount - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getSkinColor(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getSkinColor()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getSkinColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getSkinColor(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getSkinColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getSkinRegion(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getSkinRegion()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getSkinRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getSkinRegion(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Rectangle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getSkinRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getState(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); Control::State result = instance->getState(); // Push the return value onto the stack. lua_pushstring(state, lua_stringFromEnum_ControlState(result)); return 1; } lua_pushstring(state, "lua_Button_getState - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getStyle(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)instance->getStyle(); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "ThemeStyle"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getStyle - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getText(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); const char* result = instance->getText(); // Push the return value onto the stack. lua_pushstring(state, result); return 1; } lua_pushstring(state, "lua_Button_getText - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getTextAlignment(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); Font::Justify result = instance->getTextAlignment(); // Push the return value onto the stack. lua_pushstring(state, lua_stringFromEnum_FontJustify(result)); return 1; } lua_pushstring(state, "lua_Button_getTextAlignment - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); Font::Justify result = instance->getTextAlignment(param1); // Push the return value onto the stack. lua_pushstring(state, lua_stringFromEnum_FontJustify(result)); return 1; } lua_pushstring(state, "lua_Button_getTextAlignment - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getTextColor(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getTextColor()); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getTextColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); void* returnPtr = (void*)&(instance->getTextColor(param1)); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = false; luaL_getmetatable(state, "Vector4"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_getTextColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getTextRightToLeft(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->getTextRightToLeft(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_getTextRightToLeft - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 2: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); bool result = instance->getTextRightToLeft(param1); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_getTextRightToLeft - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1 or 2)."); lua_error(state); break; } } return 0; } int lua_Button_getWidth(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); float result = instance->getWidth(); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getWidth - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getX(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); float result = instance->getX(); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getX - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getY(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); float result = instance->getY(); // Push the return value onto the stack. lua_pushnumber(state, result); return 1; } lua_pushstring(state, "lua_Button_getY - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_getZIndex(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); int result = instance->getZIndex(); // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } lua_pushstring(state, "lua_Button_getZIndex - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_isContainer(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->isContainer(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_isContainer - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_isEnabled(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->isEnabled(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_isEnabled - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_isVisible(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); bool result = instance->isVisible(); // Push the return value onto the stack. lua_pushboolean(state, result); return 1; } lua_pushstring(state, "lua_Button_isVisible - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_release(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 1: { if ((lua_type(state, 1) == LUA_TUSERDATA)) { Button* instance = getInstance(state); instance->release(); return 0; } lua_pushstring(state, "lua_Button_release - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 1)."); lua_error(state); break; } } return 0; } int lua_Button_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; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "ControlListener", false, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Control::Listener'."); lua_error(state); } Button* instance = getInstance(state); instance->removeListener(param1); return 0; } lua_pushstring(state, "lua_Button_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_Button_removeScriptCallback(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TSTRING || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. std::string param1 = gameplay::ScriptUtil::getString(2, true); // Get parameter 2 off the stack. std::string param2 = gameplay::ScriptUtil::getString(3, true); Button* instance = getInstance(state); instance->removeScriptCallback(param1, param2); return 0; } lua_pushstring(state, "lua_Button_removeScriptCallback - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_setAlignment(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::Alignment param1 = (Control::Alignment)lua_enumFromString_ControlAlignment(luaL_checkstring(state, 2)); Button* instance = getInstance(state); instance->setAlignment(param1); return 0; } lua_pushstring(state, "lua_Button_setAlignment - 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_Button_setAnimationPropertyValue(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "AnimationValue", false, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'."); lua_error(state); } Button* instance = getInstance(state); instance->setAnimationPropertyValue(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 4: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TTABLE || lua_type(state, 3) == LUA_TNIL) && lua_type(state, 4) == LUA_TNUMBER) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "AnimationValue", false, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'AnimationValue'."); lua_error(state); } // Get parameter 3 off the stack. float param3 = (float)luaL_checknumber(state, 4); Button* instance = getInstance(state); instance->setAnimationPropertyValue(param1, param2, param3); return 0; } lua_pushstring(state, "lua_Button_setAnimationPropertyValue - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3 or 4)."); lua_error(state); break; } } return 0; } int lua_Button_setAutoHeight(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setAutoHeight(param1); return 0; } lua_pushstring(state, "lua_Button_setAutoHeight - 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_Button_setAutoWidth(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setAutoWidth(param1); return 0; } lua_pushstring(state, "lua_Button_setAutoWidth - 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_Button_setBorder(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 5: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && lua_type(state, 5) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. float param3 = (float)luaL_checknumber(state, 4); // Get parameter 4 off the stack. float param4 = (float)luaL_checknumber(state, 5); Button* instance = getInstance(state); instance->setBorder(param1, param2, param3, param4); return 0; } lua_pushstring(state, "lua_Button_setBorder - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 6: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && lua_type(state, 5) == LUA_TNUMBER && lua_type(state, 6) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. float param3 = (float)luaL_checknumber(state, 4); // Get parameter 4 off the stack. float param4 = (float)luaL_checknumber(state, 5); // Get parameter 5 off the stack. unsigned char param5 = (unsigned char)luaL_checkunsigned(state, 6); Button* instance = getInstance(state); instance->setBorder(param1, param2, param3, param4, param5); return 0; } lua_pushstring(state, "lua_Button_setBorder - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 5 or 6)."); lua_error(state); break; } } return 0; } int lua_Button_setBounds(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_TNIL)) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Rectangle", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'."); lua_error(state); } Button* instance = getInstance(state); instance->setBounds(*param1); return 0; } lua_pushstring(state, "lua_Button_setBounds - 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_Button_setConsumeInputEvents(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setConsumeInputEvents(param1); return 0; } lua_pushstring(state, "lua_Button_setConsumeInputEvents - 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_Button_setCursorColor(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Vector4", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setCursorColor(*param1, param2); return 0; } lua_pushstring(state, "lua_Button_setCursorColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_setCursorRegion(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Rectangle", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setCursorRegion(*param1, param2); return 0; } lua_pushstring(state, "lua_Button_setCursorRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_setEnabled(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setEnabled(param1); return 0; } lua_pushstring(state, "lua_Button_setEnabled - 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_Button_setFocusIndex(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_TNUMBER) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); Button* instance = getInstance(state); instance->setFocusIndex(param1); return 0; } lua_pushstring(state, "lua_Button_setFocusIndex - 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_Button_setFont(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; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Font", false, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'."); lua_error(state); } Button* instance = getInstance(state); instance->setFont(param1); return 0; } lua_pushstring(state, "lua_Button_setFont - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { 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) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Font", false, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Font'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setFont(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setFont - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setFontSize(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_TNUMBER) { // Get parameter 1 off the stack. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2); Button* instance = getInstance(state); instance->setFontSize(param1); return 0; } lua_pushstring(state, "lua_Button_setFontSize - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. unsigned int param1 = (unsigned int)luaL_checkunsigned(state, 2); // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setFontSize(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setFontSize - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setHeight(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_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); Button* instance = getInstance(state); instance->setHeight(param1); return 0; } lua_pushstring(state, "lua_Button_setHeight - 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_Button_setImageColor(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "Vector4", true, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'."); lua_error(state); } Button* instance = getInstance(state); instance->setImageColor(param1, *param2); return 0; } lua_pushstring(state, "lua_Button_setImageColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 4: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) && lua_type(state, 4) == LUA_TNUMBER) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "Vector4", true, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'Vector4'."); lua_error(state); } // Get parameter 3 off the stack. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4); Button* instance = getInstance(state); instance->setImageColor(param1, *param2, param3); return 0; } lua_pushstring(state, "lua_Button_setImageColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3 or 4)."); lua_error(state); break; } } return 0; } int lua_Button_setImageRegion(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "Rectangle", true, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'."); lua_error(state); } Button* instance = getInstance(state); instance->setImageRegion(param1, *param2); return 0; } lua_pushstring(state, "lua_Button_setImageRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 4: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && (lua_type(state, 3) == LUA_TUSERDATA || lua_type(state, 3) == LUA_TNIL) && lua_type(state, 4) == LUA_TNUMBER) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(3, "Rectangle", true, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'Rectangle'."); lua_error(state); } // Get parameter 3 off the stack. unsigned char param3 = (unsigned char)luaL_checkunsigned(state, 4); Button* instance = getInstance(state); instance->setImageRegion(param1, *param2, param3); return 0; } lua_pushstring(state, "lua_Button_setImageRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3 or 4)."); lua_error(state); break; } } return 0; } int lua_Button_setMargin(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 5: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && lua_type(state, 5) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. float param3 = (float)luaL_checknumber(state, 4); // Get parameter 4 off the stack. float param4 = (float)luaL_checknumber(state, 5); Button* instance = getInstance(state); instance->setMargin(param1, param2, param3, param4); return 0; } lua_pushstring(state, "lua_Button_setMargin - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 5)."); lua_error(state); break; } } return 0; } int lua_Button_setOpacity(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_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); Button* instance = getInstance(state); instance->setOpacity(param1); return 0; } lua_pushstring(state, "lua_Button_setOpacity - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setOpacity(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setOpacity - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setPadding(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 5: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER && lua_type(state, 4) == LUA_TNUMBER && lua_type(state, 5) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); // Get parameter 3 off the stack. float param3 = (float)luaL_checknumber(state, 4); // Get parameter 4 off the stack. float param4 = (float)luaL_checknumber(state, 5); Button* instance = getInstance(state); instance->setPadding(param1, param2, param3, param4); return 0; } lua_pushstring(state, "lua_Button_setPadding - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 5)."); lua_error(state); break; } } return 0; } int lua_Button_setPosition(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); Button* instance = getInstance(state); instance->setPosition(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setPosition - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_setSize(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 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TNUMBER && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); // Get parameter 2 off the stack. float param2 = (float)luaL_checknumber(state, 3); Button* instance = getInstance(state); instance->setSize(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setSize - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } default: { lua_pushstring(state, "Invalid number of parameters (expected 3)."); lua_error(state); break; } } return 0; } int lua_Button_setSkinColor(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_TNIL)) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Vector4", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'."); lua_error(state); } Button* instance = getInstance(state); instance->setSkinColor(*param1); return 0; } lua_pushstring(state, "lua_Button_setSkinColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Vector4", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setSkinColor(*param1, param2); return 0; } lua_pushstring(state, "lua_Button_setSkinColor - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setSkinRegion(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_TNIL)) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Rectangle", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'."); lua_error(state); } Button* instance = getInstance(state); instance->setSkinRegion(*param1); return 0; } lua_pushstring(state, "lua_Button_setSkinRegion - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Rectangle", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Rectangle'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setSkinRegion(*param1, param2); return 0; } lua_pushstring(state, "lua_Button_setSkinRegion - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setState(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Control::State param1 = (Control::State)lua_enumFromString_ControlState(luaL_checkstring(state, 2)); Button* instance = getInstance(state); instance->setState(param1); return 0; } lua_pushstring(state, "lua_Button_setState - 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_Button_setStyle(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; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "ThemeStyle", false, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Theme::Style'."); lua_error(state); } Button* instance = getInstance(state); instance->setStyle(param1); return 0; } lua_pushstring(state, "lua_Button_setStyle - 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_Button_setText(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(2, false); Button* instance = getInstance(state); instance->setText(param1); return 0; } lua_pushstring(state, "lua_Button_setText - 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_Button_setTextAlignment(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_TSTRING || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2)); Button* instance = getInstance(state); instance->setTextAlignment(param1); return 0; } lua_pushstring(state, "lua_Button_setTextAlignment - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TSTRING || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. Font::Justify param1 = (Font::Justify)lua_enumFromString_FontJustify(luaL_checkstring(state, 2)); // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setTextAlignment(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setTextAlignment - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setTextColor(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_TNIL)) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Vector4", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'."); lua_error(state); } Button* instance = getInstance(state); instance->setTextColor(*param1); return 0; } lua_pushstring(state, "lua_Button_setTextColor - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TNIL) && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1Valid; gameplay::ScriptUtil::LuaArray param1 = gameplay::ScriptUtil::getObjectPointer(2, "Vector4", true, ¶m1Valid); if (!param1Valid) { lua_pushstring(state, "Failed to convert parameter 1 to type 'Vector4'."); lua_error(state); } // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setTextColor(*param1, param2); return 0; } lua_pushstring(state, "lua_Button_setTextColor - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setTextRightToLeft(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setTextRightToLeft(param1); return 0; } lua_pushstring(state, "lua_Button_setTextRightToLeft - Failed to match the given parameters to a valid function signature."); lua_error(state); break; } case 3: { if ((lua_type(state, 1) == LUA_TUSERDATA) && lua_type(state, 2) == LUA_TBOOLEAN && lua_type(state, 3) == LUA_TNUMBER) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); // Get parameter 2 off the stack. unsigned char param2 = (unsigned char)luaL_checkunsigned(state, 3); Button* instance = getInstance(state); instance->setTextRightToLeft(param1, param2); return 0; } lua_pushstring(state, "lua_Button_setTextRightToLeft - 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 or 3)."); lua_error(state); break; } } return 0; } int lua_Button_setVisible(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_TBOOLEAN) { // Get parameter 1 off the stack. bool param1 = gameplay::ScriptUtil::luaCheckBool(state, 2); Button* instance = getInstance(state); instance->setVisible(param1); return 0; } lua_pushstring(state, "lua_Button_setVisible - 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_Button_setWidth(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_TNUMBER) { // Get parameter 1 off the stack. float param1 = (float)luaL_checknumber(state, 2); Button* instance = getInstance(state); instance->setWidth(param1); return 0; } lua_pushstring(state, "lua_Button_setWidth - 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_Button_setZIndex(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_TNUMBER) { // Get parameter 1 off the stack. int param1 = (int)luaL_checkint(state, 2); Button* instance = getInstance(state); instance->setZIndex(param1); return 0; } lua_pushstring(state, "lua_Button_setZIndex - 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_Button_static_ANIMATE_OPACITY(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_OPACITY; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_POSITION(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_POSITION; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_POSITION_X(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_POSITION_X; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_POSITION_Y(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_POSITION_Y; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_SIZE(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_SIZE; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_SIZE_HEIGHT(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_SIZE_HEIGHT; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_ANIMATE_SIZE_WIDTH(lua_State* state) { // Validate the number of parameters. if (lua_gettop(state) > 0) { lua_pushstring(state, "Invalid number of parameters (expected 0)."); lua_error(state); } int result = Button::ANIMATE_SIZE_WIDTH; // Push the return value onto the stack. lua_pushinteger(state, result); return 1; } int lua_Button_static_create(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_TSTRING || lua_type(state, 1) == LUA_TNIL) && (lua_type(state, 2) == LUA_TUSERDATA || lua_type(state, 2) == LUA_TTABLE || lua_type(state, 2) == LUA_TNIL)) { // Get parameter 1 off the stack. const char* param1 = gameplay::ScriptUtil::getString(1, false); // Get parameter 2 off the stack. bool param2Valid; gameplay::ScriptUtil::LuaArray param2 = gameplay::ScriptUtil::getObjectPointer(2, "ThemeStyle", false, ¶m2Valid); if (!param2Valid) { lua_pushstring(state, "Failed to convert parameter 2 to type 'Theme::Style'."); lua_error(state); } void* returnPtr = (void*)Button::create(param1, param2); if (returnPtr) { gameplay::ScriptUtil::LuaObject* object = (gameplay::ScriptUtil::LuaObject*)lua_newuserdata(state, sizeof(gameplay::ScriptUtil::LuaObject)); object->instance = returnPtr; object->owns = true; luaL_getmetatable(state, "Button"); lua_setmetatable(state, -2); } else { lua_pushnil(state); } return 1; } lua_pushstring(state, "lua_Button_static_create - 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; } }