#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 BFBFScrollRectMultCellWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(BF.BFScrollRectMultCell); Utils.BeginObjectRegister(type, L, translator, 0, 7, 7, 7); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetGetCellIndexFunc", _m_SetGetCellIndexFunc); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefillCells", _m_RefillCells); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTotalCount", _m_SetTotalCount); Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSelected", _m_SetSelected); Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshAll", _m_RefreshAll); Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearCells", _m_ClearCells); Utils.RegisterFunc(L, Utils.METHOD_IDX, "AnchoredPositionChange", _m_AnchoredPositionChange); Utils.RegisterFunc(L, Utils.GETTER_IDX, "bfCells", _g_get_bfCells); Utils.RegisterFunc(L, Utils.GETTER_IDX, "spacing", _g_get_spacing); Utils.RegisterFunc(L, Utils.GETTER_IDX, "padding", _g_get_padding); Utils.RegisterFunc(L, Utils.GETTER_IDX, "topRecoveryOffset", _g_get_topRecoveryOffset); Utils.RegisterFunc(L, Utils.GETTER_IDX, "downRecoveryOffset", _g_get_downRecoveryOffset); Utils.RegisterFunc(L, Utils.GETTER_IDX, "preLineCount", _g_get_preLineCount); Utils.RegisterFunc(L, Utils.GETTER_IDX, "direction", _g_get_direction); Utils.RegisterFunc(L, Utils.SETTER_IDX, "bfCells", _s_set_bfCells); Utils.RegisterFunc(L, Utils.SETTER_IDX, "spacing", _s_set_spacing); Utils.RegisterFunc(L, Utils.SETTER_IDX, "padding", _s_set_padding); Utils.RegisterFunc(L, Utils.SETTER_IDX, "topRecoveryOffset", _s_set_topRecoveryOffset); Utils.RegisterFunc(L, Utils.SETTER_IDX, "downRecoveryOffset", _s_set_downRecoveryOffset); Utils.RegisterFunc(L, Utils.SETTER_IDX, "preLineCount", _s_set_preLineCount); Utils.RegisterFunc(L, Utils.SETTER_IDX, "direction", _s_set_direction); 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.BFScrollRectMultCell(); 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.BFScrollRectMultCell constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetGetCellIndexFunc(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { System.Func _getCellIndex = translator.GetDelegate>(L, 2); gen_to_be_invoked.SetGetCellIndexFunc( _getCellIndex ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RefillCells(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { int _totalCount = LuaAPI.xlua_tointeger(L, 2); int _targetIndex = LuaAPI.xlua_tointeger(L, 3); gen_to_be_invoked.RefillCells( _totalCount, _targetIndex ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetTotalCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { int _totalCount = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SetTotalCount( _totalCount ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_SetSelected(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { int _index = LuaAPI.xlua_tointeger(L, 2); gen_to_be_invoked.SetSelected( _index ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_RefreshAll(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.RefreshAll( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_ClearCells(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.ClearCells( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_AnchoredPositionChange(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); { gen_to_be_invoked.AnchoredPositionChange( ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_bfCells(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.bfCells); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_spacing(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.spacing); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_padding(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.padding); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_topRecoveryOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.topRecoveryOffset); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_downRecoveryOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.downRecoveryOffset); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_preLineCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.preLineCount); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_direction(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); translator.Push(L, gen_to_be_invoked.direction); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_bfCells(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.bfCells = (BF.BFCell[])translator.GetObject(L, 2, typeof(BF.BFCell[])); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_spacing(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.spacing = (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_padding(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.padding = (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_topRecoveryOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.topRecoveryOffset = (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_downRecoveryOffset(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.downRecoveryOffset = (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_preLineCount(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); gen_to_be_invoked.preLineCount = LuaAPI.xlua_tointeger(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_direction(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); BF.BFScrollRectMultCell gen_to_be_invoked = (BF.BFScrollRectMultCell)translator.FastGetCSObj(L, 1); BF.BFUIDirection gen_value;translator.Get(L, 2, out gen_value); gen_to_be_invoked.direction = gen_value; } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }