#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 XLua.CSObjectWrap { using Utils = XLua.Utils; public class BFBFGridLayoutWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BFGridLayout); Utils.BeginObjectRegister(type, L, translator, 0, 3, 5, 5); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshLayout", _m_RefreshLayout); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetVerticalSize", _m_GetVerticalSize); Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHorizontalSize", _m_GetHorizontalSize); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Spaceing", _g_get_Spaceing); Utils.RegisterFunc(L, Utils.GETTER_IDX, "CellSize", _g_get_CellSize); Utils.RegisterFunc(L, Utils.GETTER_IDX, "StartCorner", _g_get_StartCorner); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ConstraintType", _g_get_ConstraintType); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ConstraintCount", _g_get_ConstraintCount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Spaceing", _s_set_Spaceing); Utils.RegisterFunc(L, Utils.SETTER_IDX, "CellSize", _s_set_CellSize); Utils.RegisterFunc(L, Utils.SETTER_IDX, "StartCorner", _s_set_StartCorner); Utils.RegisterFunc(L, Utils.SETTER_IDX, "ConstraintType", _s_set_ConstraintType); Utils.RegisterFunc(L, Utils.SETTER_IDX, "ConstraintCount", _s_set_ConstraintCount); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); if(LuaAPI.lua_gettop(L) == 1) { var gen_ret = new BF.BFGridLayout(); translator.Push(L, 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 BF.BFGridLayout constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RefreshLayout(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.RefreshLayout( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetVerticalSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetVerticalSize( ); LuaAPI.lua_pushnumber(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetHorizontalSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); { var gen_ret = gen_to_be_invoked.GetHorizontalSize( ); LuaAPI.lua_pushnumber(L, gen_ret); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Spaceing(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.Spaceing); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_CellSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); translator.PushUnityEngineVector2(L, gen_to_be_invoked.CellSize); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_StartCorner(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.StartCorner); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ConstraintType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.ConstraintType); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ConstraintCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.ConstraintCount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Spaceing(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.Spaceing = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_CellSize(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); UnityEngine.Vector2 gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.CellSize = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_StartCorner(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); BF.BFGridLayout.Corner gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.StartCorner = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_ConstraintType(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); BF.BFGridLayout.Constraint gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.ConstraintType = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_ConstraintCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFGridLayout gen_to_be_invoked = (BF.BFGridLayout)translator.FastGetCSObj(L, 1); gen_to_be_invoked.ConstraintCount = LuaAPI.xlua_tointeger(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }