#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLua.LuaDLL.lua_CSFunction;
#endif
using XLua;
using System.Collections.Generic;
namespace CSObjectWrap
{
public class UIButtonWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
Utils.BeginObjectRegister(typeof(UIButton), L, translator, 0, 2, 12, 12);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetState", SetState);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "setOnPressScaleEnable", setOnPressScaleEnable);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "isEnabled", get_isEnabled);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalSprite", get_normalSprite);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "normalSprite2D", get_normalSprite2D);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "dragHighlight", get_dragHighlight);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "hoverSprite", get_hoverSprite);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "pressedSprite", get_pressedSprite);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "disabledSprite", get_disabledSprite);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "hoverSprite2D", get_hoverSprite2D);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "pressedSprite2D", get_pressedSprite2D);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "disabledSprite2D", get_disabledSprite2D);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "pixelSnap", get_pixelSnap);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "onClick", get_onClick);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "isEnabled", set_isEnabled);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalSprite", set_normalSprite);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "normalSprite2D", set_normalSprite2D);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "dragHighlight", set_dragHighlight);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "hoverSprite", set_hoverSprite);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "pressedSprite", set_pressedSprite);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "disabledSprite", set_disabledSprite);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "hoverSprite2D", set_hoverSprite2D);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "pressedSprite2D", set_pressedSprite2D);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "disabledSprite2D", set_disabledSprite2D);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "pixelSnap", set_pixelSnap);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "onClick", set_onClick);
Utils.EndObjectRegister(typeof(UIButton), L, translator, null, null,
null, null, null);
Utils.BeginClassRegister(typeof(UIButton), L, __CreateInstance, 1, 1, 1);
Utils.RegisterObject(L, translator, Utils.CLS_IDX, "UnderlyingSystemType", typeof(UIButton));
Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "current", get_current);
Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "current", set_current);
Utils.EndClassRegister(typeof(UIButton), L, translator);
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __CreateInstance(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
if(LuaAPI.lua_gettop(L) == 1)
{
UIButton __cl_gen_ret = new UIButton();
translator.Push(L, __cl_gen_ret);
return 1;
}
}
catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to UIButton constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int SetState(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
try {
{
UIButtonColor.State state;translator.Get(L, 2, out state);
bool immediate = LuaAPI.lua_toboolean(L, 3);
__cl_gen_to_be_invoked.SetState( state, immediate );
return 0;
}
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int setOnPressScaleEnable(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
try {
{
bool enable = LuaAPI.lua_toboolean(L, 2);
__cl_gen_to_be_invoked.setOnPressScaleEnable( enable );
return 0;
}
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_isEnabled(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.isEnabled);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_normalSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.normalSprite);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_normalSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
translator.Push(L, __cl_gen_to_be_invoked.normalSprite2D);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_current(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
translator.Push(L, UIButton.current);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_dragHighlight(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.dragHighlight);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_hoverSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.hoverSprite);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_pressedSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.pressedSprite);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_disabledSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushstring(L, __cl_gen_to_be_invoked.disabledSprite);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_hoverSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
translator.Push(L, __cl_gen_to_be_invoked.hoverSprite2D);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_pressedSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
translator.Push(L, __cl_gen_to_be_invoked.pressedSprite2D);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_disabledSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
translator.Push(L, __cl_gen_to_be_invoked.disabledSprite2D);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_pixelSnap(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, __cl_gen_to_be_invoked.pixelSnap);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int get_onClick(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
translator.Push(L, __cl_gen_to_be_invoked.onClick);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_isEnabled(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.isEnabled = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_normalSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.normalSprite = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_normalSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.normalSprite2D = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_current(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton.current = (UIButton)translator.GetObject(L, 1, typeof(UIButton));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_dragHighlight(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.dragHighlight = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_hoverSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.hoverSprite = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_pressedSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.pressedSprite = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_disabledSprite(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.disabledSprite = LuaAPI.lua_tostring(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_hoverSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.hoverSprite2D = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_pressedSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.pressedSprite2D = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_disabledSprite2D(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.disabledSprite2D = (UnityEngine.Sprite)translator.GetObject(L, 2, typeof(UnityEngine.Sprite));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_pixelSnap(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.pixelSnap = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int set_onClick(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
try {
UIButton __cl_gen_to_be_invoked = (UIButton)translator.FastGetCSObj(L, 1);
__cl_gen_to_be_invoked.onClick = (System.Collections.Generic.List<EventDelegate>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<EventDelegate>));
} catch(System.Exception __gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + __gen_e);
}
return 0;
}
}
}
Assets/XLua/Gen/UIButtonWrap.cs(142,44): error CS1061: Type `UIButton' does not contain a definition for `setOnPressScaleEnable' and no extension method `setOnPressScaleEnable' of type `UIButton' could be found (are you missing a using directive or an assembly reference?)