2025-12-17 21:08:27 +08:00
|
|
|
|
//this source code was auto-generated by tolua#, do not modify it
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using LuaInterface;
|
|
|
|
|
|
|
|
|
|
|
|
public class LuaUIHelperWrap
|
|
|
|
|
|
{
|
|
|
|
|
|
public static void Register(LuaState L)
|
|
|
|
|
|
{
|
|
|
|
|
|
L.BeginClass(typeof(LuaUIHelper), typeof(UnityEngine.MonoBehaviour));
|
|
|
|
|
|
L.RegFunction("SetMsgPrefab", SetMsgPrefab);
|
|
|
|
|
|
L.RegFunction("ShowInfo", ShowInfo);
|
|
|
|
|
|
L.RegFunction("GetAllText", GetAllText);
|
|
|
|
|
|
L.RegFunction("DelayAction", DelayAction);
|
|
|
|
|
|
L.RegFunction("AddButtonClick", AddButtonClick);
|
|
|
|
|
|
L.RegFunction("AddButtonClickWithGameObject", AddButtonClickWithGameObject);
|
|
|
|
|
|
L.RegFunction("GetAnimatorAormalizedTime", GetAnimatorAormalizedTime);
|
|
|
|
|
|
L.RegFunction("GetAnimtorTotalTime", GetAnimtorTotalTime);
|
|
|
|
|
|
L.RegFunction("GetAnimatorIsName", GetAnimatorIsName);
|
|
|
|
|
|
L.RegFunction("SetGameObjectLastSibling", SetGameObjectLastSibling);
|
|
|
|
|
|
L.RegFunction("__eq", op_Equality);
|
|
|
|
|
|
L.RegFunction("__tostring", ToLua.op_ToString);
|
|
|
|
|
|
L.EndClass();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int SetMsgPrefab(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 3);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
|
|
|
|
|
obj.SetMsgPrefab(arg0, arg1);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int ShowInfo(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 2);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
string arg0 = ToLua.CheckString(L, 2);
|
|
|
|
|
|
obj.ShowInfo(arg0);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int GetAllText(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 2);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
|
|
|
|
|
|
UnityEngine.UI.Text[] o = obj.GetAllText(arg0);
|
|
|
|
|
|
ToLua.Push(L, o);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int DelayAction(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 3);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
|
|
|
|
|
obj.DelayAction(arg0, arg1);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int AddButtonClick(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
int count = LuaDLL.lua_gettop(L);
|
|
|
|
|
|
|
|
|
|
|
|
if (count == 3)
|
|
|
|
|
|
{
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckObject<UnityEngine.UI.Button>(L, 2);
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
|
|
|
|
|
obj.AddButtonClick(arg0, arg1);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
2025-12-19 20:03:24 +08:00
|
|
|
|
else if (count == 4 && TypeChecker.CheckTypes<int>(L, 4))
|
2025-12-17 21:08:27 +08:00
|
|
|
|
{
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckObject<UnityEngine.UI.Button>(L, 2);
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
2025-12-19 20:03:24 +08:00
|
|
|
|
int arg2 = (int)LuaDLL.lua_tonumber(L, 4);
|
|
|
|
|
|
obj.AddButtonClick(arg0, arg1, arg2);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (count == 4 && TypeChecker.CheckTypes<LuaInterface.LuaTable>(L, 4))
|
|
|
|
|
|
{
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckObject<UnityEngine.UI.Button>(L, 2);
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
|
|
|
|
|
LuaTable arg2 = ToLua.ToLuaTable(L, 4);
|
2025-12-17 21:08:27 +08:00
|
|
|
|
obj.AddButtonClick(arg0, arg1, arg2);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.luaL_throw(L, "invalid arguments to method: LuaUIHelper.AddButtonClick");
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int AddButtonClickWithGameObject(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 3);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.UI.Button arg0 = (UnityEngine.UI.Button)ToLua.CheckObject<UnityEngine.UI.Button>(L, 2);
|
|
|
|
|
|
LuaFunction arg1 = ToLua.CheckLuaFunction(L, 3);
|
|
|
|
|
|
obj.AddButtonClickWithGameObject(arg0, arg1);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int GetAnimatorAormalizedTime(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 3);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.Animator arg0 = (UnityEngine.Animator)ToLua.CheckObject<UnityEngine.Animator>(L, 2);
|
|
|
|
|
|
bool arg1 = LuaDLL.luaL_checkboolean(L, 3);
|
|
|
|
|
|
float o = obj.GetAnimatorAormalizedTime(arg0, arg1);
|
|
|
|
|
|
LuaDLL.lua_pushnumber(L, o);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int GetAnimtorTotalTime(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 2);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.Animator arg0 = (UnityEngine.Animator)ToLua.CheckObject<UnityEngine.Animator>(L, 2);
|
|
|
|
|
|
float o = obj.GetAnimtorTotalTime(arg0);
|
|
|
|
|
|
LuaDLL.lua_pushnumber(L, o);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int GetAnimatorIsName(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 3);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.Animator arg0 = (UnityEngine.Animator)ToLua.CheckObject<UnityEngine.Animator>(L, 2);
|
|
|
|
|
|
string arg1 = ToLua.CheckString(L, 3);
|
|
|
|
|
|
bool o = obj.GetAnimatorIsName(arg0, arg1);
|
|
|
|
|
|
LuaDLL.lua_pushboolean(L, o);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int SetGameObjectLastSibling(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 2);
|
|
|
|
|
|
LuaUIHelper obj = (LuaUIHelper)ToLua.CheckObject<LuaUIHelper>(L, 1);
|
|
|
|
|
|
UnityEngine.GameObject arg0 = (UnityEngine.GameObject)ToLua.CheckObject(L, 2, typeof(UnityEngine.GameObject));
|
|
|
|
|
|
obj.SetGameObjectLastSibling(arg0);
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
|
|
|
|
static int op_Equality(IntPtr L)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
ToLua.CheckArgsCount(L, 2);
|
|
|
|
|
|
UnityEngine.Object arg0 = (UnityEngine.Object)ToLua.ToObject(L, 1);
|
|
|
|
|
|
UnityEngine.Object arg1 = (UnityEngine.Object)ToLua.ToObject(L, 2);
|
|
|
|
|
|
bool o = arg0 == arg1;
|
|
|
|
|
|
LuaDLL.lua_pushboolean(L, o);
|
|
|
|
|
|
return 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
|
{
|
|
|
|
|
|
return LuaDLL.toluaL_exception(L, e);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|