c1_unity/Assets/XLua/Gen/TMPro_HighlightStateWrap.cs
2023-04-03 11:04:31 +08:00

268 lines
8.5 KiB
C#

#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 TMProHighlightStateWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(TMPro.HighlightState);
Utils.BeginObjectRegister(type, L, translator, 1, 2, 2, 2);
Utils.RegisterFunc(L, Utils.OBJ_META_IDX, "__eq", __EqMeta);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetHashCode", _m_GetHashCode);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "Equals", _m_Equals);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "color", _g_get_color);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "padding", _g_get_padding);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "color", _s_set_color);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "padding", _s_set_padding);
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) == 3 && translator.Assignable<UnityEngine.Color32>(L, 2) && translator.Assignable<TMPro.TMP_Offset>(L, 3))
{
UnityEngine.Color32 _color;translator.Get(L, 2, out _color);
TMPro.TMP_Offset _padding;translator.Get(L, 3, out _padding);
var gen_ret = new TMPro.HighlightState(_color, _padding);
translator.Push(L, gen_ret);
return 1;
}
if (LuaAPI.lua_gettop(L) == 1)
{
translator.Push(L, default(TMPro.HighlightState));
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.HighlightState constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int __EqMeta(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
if (translator.Assignable<TMPro.HighlightState>(L, 1) && translator.Assignable<TMPro.HighlightState>(L, 2))
{
TMPro.HighlightState leftside;translator.Get(L, 1, out leftside);
TMPro.HighlightState rightside;translator.Get(L, 2, out rightside);
LuaAPI.lua_pushboolean(L, leftside == rightside);
return 1;
}
}
catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return LuaAPI.luaL_error(L, "invalid arguments to right hand of == operator, need TMPro.HighlightState!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_GetHashCode(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
{
var gen_ret = gen_to_be_invoked.GetHashCode( );
LuaAPI.xlua_pushinteger(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_Equals(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
int gen_param_count = LuaAPI.lua_gettop(L);
if(gen_param_count == 2&& translator.Assignable<object>(L, 2))
{
object _obj = translator.GetObject(L, 2, typeof(object));
var gen_ret = gen_to_be_invoked.Equals( _obj );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
return 1;
}
if(gen_param_count == 2&& translator.Assignable<TMPro.HighlightState>(L, 2))
{
TMPro.HighlightState _other;translator.Get(L, 2, out _other);
var gen_ret = gen_to_be_invoked.Equals( _other );
LuaAPI.lua_pushboolean(L, gen_ret);
translator.Update(L, 1, gen_to_be_invoked);
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.HighlightState.Equals!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_color(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
translator.Push(L, gen_to_be_invoked.color);
} 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);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
translator.Push(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 _s_set_color(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
UnityEngine.Color32 gen_value;translator.Get(L, 2, out gen_value);
gen_to_be_invoked.color = gen_value;
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_padding(RealStatePtr L)
{
try {
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
TMPro.HighlightState gen_to_be_invoked;translator.Get(L, 1, out gen_to_be_invoked);
TMPro.TMP_Offset gen_value;translator.Get(L, 2, out gen_value);
gen_to_be_invoked.padding = gen_value;
translator.Update(L, 1, gen_to_be_invoked);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}