#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 BFBFLayoutBaseWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BFLayoutBase); Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Left", _g_get_Left); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Right", _g_get_Right); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Top", _g_get_Top); Utils.RegisterFunc(L, Utils.GETTER_IDX, "Bottom", _g_get_Bottom); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ChildAlignment", _g_get_ChildAlignment); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Left", _s_set_Left); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Right", _s_set_Right); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Top", _s_set_Top); Utils.RegisterFunc(L, Utils.SETTER_IDX, "Bottom", _s_set_Bottom); Utils.RegisterFunc(L, Utils.SETTER_IDX, "ChildAlignment", _s_set_ChildAlignment); 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) { return LuaAPI.luaL_error(L, "BF.BFLayoutBase does not have a constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Left(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Left); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Right(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Right); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Top(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Top); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_Bottom(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.Bottom); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ChildAlignment(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); translator.PushUnityEngineTextAnchor(L, gen_to_be_invoked.ChildAlignment); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Left(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Left = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Right(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Right = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Top(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Top = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_Bottom(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); gen_to_be_invoked.Bottom = (float)LuaAPI.lua_tonumber(L, 2); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_ChildAlignment(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFLayoutBase gen_to_be_invoked = (BF.BFLayoutBase)translator.FastGetCSObj(L, 1); UnityEngine.TextAnchor gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.ChildAlignment = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }