307 lines
10 KiB
C#
307 lines
10 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 UnityEngineUIRectMask2DWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(UnityEngine.UI.RectMask2D);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 5, 4, 2);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "IsRaycastLocationValid", _m_IsRaycastLocationValid);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "PerformClipping", _m_PerformClipping);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateClipSoftness", _m_UpdateClipSoftness);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AddClippable", _m_AddClippable);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RemoveClippable", _m_RemoveClippable);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "padding", _g_get_padding);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "softness", _g_get_softness);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "canvasRect", _g_get_canvasRect);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "rectTransform", _g_get_rectTransform);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "padding", _s_set_padding);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "softness", _s_set_softness);
|
|
|
|
|
|
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)
|
|
{
|
|
return LuaAPI.luaL_error(L, "UnityEngine.UI.RectMask2D does not have a constructor!");
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_IsRaycastLocationValid(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.Vector2 _sp;translator.Get(L, 2, out _sp);
|
|
UnityEngine.Camera _eventCamera = (UnityEngine.Camera)translator.GetObject(L, 3, typeof(UnityEngine.Camera));
|
|
|
|
var gen_ret = gen_to_be_invoked.IsRaycastLocationValid( _sp, _eventCamera );
|
|
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_PerformClipping(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.PerformClipping( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_UpdateClipSoftness(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.UpdateClipSoftness( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AddClippable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UI.IClippable _clippable = (UnityEngine.UI.IClippable)translator.GetObject(L, 2, typeof(UnityEngine.UI.IClippable));
|
|
|
|
gen_to_be_invoked.AddClippable( _clippable );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RemoveClippable(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
UnityEngine.UI.IClippable _clippable = (UnityEngine.UI.IClippable)translator.GetObject(L, 2, typeof(UnityEngine.UI.IClippable));
|
|
|
|
gen_to_be_invoked.RemoveClippable( _clippable );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_padding(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
translator.PushUnityEngineVector4(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_softness(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.softness);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_canvasRect(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.canvasRect);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_rectTransform(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.rectTransform);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_padding(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
UnityEngine.Vector4 gen_value;translator.Get(L, 2, out gen_value);
|
|
gen_to_be_invoked.padding = gen_value;
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_softness(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
UnityEngine.UI.RectMask2D gen_to_be_invoked = (UnityEngine.UI.RectMask2D)translator.FastGetCSObj(L, 1);
|
|
UnityEngine.Vector2Int gen_value;translator.Get(L, 2, out gen_value);
|
|
gen_to_be_invoked.softness = gen_value;
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|