#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 TMProTMP_PageInfoWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(TMPro.TMP_PageInfo); Utils.BeginObjectRegister(type, L, translator, 0, 0, 5, 5); Utils.RegisterFunc(L, Utils.GETTER_IDX, "firstCharacterIndex", _g_get_firstCharacterIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "lastCharacterIndex", _g_get_lastCharacterIndex); Utils.RegisterFunc(L, Utils.GETTER_IDX, "ascender", _g_get_ascender); Utils.RegisterFunc(L, Utils.GETTER_IDX, "baseLine", _g_get_baseLine); Utils.RegisterFunc(L, Utils.GETTER_IDX, "descender", _g_get_descender); Utils.RegisterFunc(L, Utils.SETTER_IDX, "firstCharacterIndex", _s_set_firstCharacterIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "lastCharacterIndex", _s_set_lastCharacterIndex); Utils.RegisterFunc(L, Utils.SETTER_IDX, "ascender", _s_set_ascender); Utils.RegisterFunc(L, Utils.SETTER_IDX, "baseLine", _s_set_baseLine); Utils.RegisterFunc(L, Utils.SETTER_IDX, "descender", _s_set_descender); 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) { translator.Push(L, default(TMPro.TMP_PageInfo)); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return LuaAPI.luaL_error(L, "invalid arguments to TMPro.TMP_PageInfo constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_firstCharacterIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.firstCharacterIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_lastCharacterIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.lastCharacterIndex); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_ascender(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.ascender); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_baseLine(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.baseLine); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _g_get_descender(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); LuaAPI.lua_pushnumber(L, gen_to_be_invoked.descender); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 1; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_firstCharacterIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.firstCharacterIndex = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_lastCharacterIndex(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.lastCharacterIndex = LuaAPI.xlua_tointeger(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_ascender(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.ascender = (float)LuaAPI.lua_tonumber(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_baseLine(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.baseLine = (float)LuaAPI.lua_tonumber(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _s_set_descender(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); TMPro.TMP_PageInfo gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked); gen_to_be_invoked.descender = (float)LuaAPI.lua_tonumber(L, 2); translator.Update(L, 1, gen_to_be_invoked); } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } return 0; } } }