281 lines
9.1 KiB
C#
281 lines
9.1 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 UnityEngineUIMaskUtilitiesWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.UI.MaskUtilities);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Utils.EndObjectRegister(type, L, translator, null, null,
|
|
null, null, null);
|
|
|
|
Utils.BeginClassRegister(type, L, __CreateInstance, 8, 0, 0);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "Notify2DMaskStateChanged", _m_Notify2DMaskStateChanged_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "NotifyStencilStateChanged", _m_NotifyStencilStateChanged_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "FindRootSortOverrideCanvas", _m_FindRootSortOverrideCanvas_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetStencilDepth", _m_GetStencilDepth_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "IsDescendantOrSelf", _m_IsDescendantOrSelf_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRectMaskForClippable", _m_GetRectMaskForClippable_xlua_st_);
|
|
Utils.RegisterFunc(L, Utils.CLS_IDX, "GetRectMasksForClip", _m_GetRectMasksForClip_xlua_st_);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 UnityEngine.UI.MaskUtilities();
|
|
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 UnityEngine.UI.MaskUtilities constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_Notify2DMaskStateChanged_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Component _mask = (UnityEngine.Component)translator.GetObject(L, 1, typeof(UnityEngine.Component));
|
|
|
|
UnityEngine.UI.MaskUtilities.Notify2DMaskStateChanged( _mask );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_NotifyStencilStateChanged_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Component _mask = (UnityEngine.Component)translator.GetObject(L, 1, typeof(UnityEngine.Component));
|
|
|
|
UnityEngine.UI.MaskUtilities.NotifyStencilStateChanged( _mask );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_FindRootSortOverrideCanvas_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _start = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
|
|
var gen_ret = UnityEngine.UI.MaskUtilities.FindRootSortOverrideCanvas( _start );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetStencilDepth_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
UnityEngine.Transform _stopAfter = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
|
|
var gen_ret = UnityEngine.UI.MaskUtilities.GetStencilDepth( _transform, _stopAfter );
|
|
LuaAPI.xlua_pushinteger(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsDescendantOrSelf_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Transform _father = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform));
|
|
UnityEngine.Transform _child = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
|
|
|
|
var gen_ret = UnityEngine.UI.MaskUtilities.IsDescendantOrSelf( _father, _child );
|
|
LuaAPI.lua_pushboolean(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetRectMaskForClippable_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UI.IClippable _clippable = (UnityEngine.UI.IClippable)translator.GetObject(L, 1, typeof(UnityEngine.UI.IClippable));
|
|
|
|
var gen_ret = UnityEngine.UI.MaskUtilities.GetRectMaskForClippable( _clippable );
|
|
translator.Push(L, gen_ret);
|
|
|
|
|
|
|
|
return 1;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_GetRectMasksForClip_xlua_st_(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UI.RectMask2D _clipper = (UnityEngine.UI.RectMask2D)translator.GetObject(L, 1, typeof(UnityEngine.UI.RectMask2D));
|
|
System.Collections.Generic.List<UnityEngine.UI.RectMask2D> _masks = (System.Collections.Generic.List<UnityEngine.UI.RectMask2D>)translator.GetObject(L, 2, typeof(System.Collections.Generic.List<UnityEngine.UI.RectMask2D>));
|
|
|
|
UnityEngine.UI.MaskUtilities.GetRectMasksForClip( _clipper, _masks );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|