#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 UIUtilityWrap { public static void __Register(RealStatePtr L) { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Type type = typeof(UIUtility); Utils.BeginObjectRegister(type, L, translator, 0, 0, 0, 0); Utils.EndObjectRegister(type, L, translator, null, null, null, null, null); Utils.BeginClassRegister(type, L, __CreateInstance, 13, 0, 0); Utils.RegisterFunc(L, Utils.CLS_IDX, "CreateWidget", _m_CreateWidget_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "RayCrossingCount", _m_RayCrossingCount_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "PackageUIVertex", _m_PackageUIVertex_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "PackageUIVertexUV1", _m_PackageUIVertexUV1_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "ClampWorldPosition", _m_ClampWorldPosition_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "RectTransformContain", _m_RectTransformContain_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "IsPointerOverGameObject", _m_IsPointerOverGameObject_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetEdge", _m_GetEdge_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "AddQuad", _m_AddQuad_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "AddTriangle", _m_AddTriangle_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetUIElementRelativePath", _m_GetUIElementRelativePath_xlua_st_); Utils.RegisterFunc(L, Utils.CLS_IDX, "GetParents", _m_GetParents_xlua_st_); Utils.EndClassRegister(type, L, translator); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int __CreateInstance(RealStatePtr L) { return LuaAPI.luaL_error(L, "UIUtility does not have a constructor!"); } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_CreateWidget_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { string __sourceName = LuaAPI.lua_tostring(L, 1); string __name = LuaAPI.lua_tostring(L, 2); UnityEngine.GameObject gen_ret = UIUtility.CreateWidget( __sourceName, __name ); 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_RayCrossingCount_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.Vector2 _p;translator.Get(L, 1, out _p); System.Collections.Generic.List _vertices = (System.Collections.Generic.List)translator.GetObject(L, 2, typeof(System.Collections.Generic.List)); int gen_ret = UIUtility.RayCrossingCount( _p, _vertices ); 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_PackageUIVertex_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.Vector3 __position;translator.Get(L, 1, out __position); UnityEngine.Vector2 __uv0;translator.Get(L, 2, out __uv0); UnityEngine.Color __color;translator.Get(L, 3, out __color); UnityEngine.UIVertex gen_ret = UIUtility.PackageUIVertex( __position, __uv0, __color ); 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_PackageUIVertexUV1_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.Vector3 __position;translator.Get(L, 1, out __position); UnityEngine.Vector2 __uv1;translator.Get(L, 2, out __uv1); UnityEngine.Color __color;translator.Get(L, 3, out __color); UnityEngine.UIVertex gen_ret = UIUtility.PackageUIVertexUV1( __position, __uv1, __color ); 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_ClampWorldPosition_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.RectTransform __area = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.EventSystems.PointerEventData __data = (UnityEngine.EventSystems.PointerEventData)translator.GetObject(L, 2, typeof(UnityEngine.EventSystems.PointerEventData)); UnityEngine.Vector3 gen_ret = UIUtility.ClampWorldPosition( __area, __data ); translator.PushUnityEngineVector3(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_RectTransformContain_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.RectTransform __area = (UnityEngine.RectTransform)translator.GetObject(L, 1, typeof(UnityEngine.RectTransform)); UnityEngine.RectTransform __test = (UnityEngine.RectTransform)translator.GetObject(L, 2, typeof(UnityEngine.RectTransform)); bool gen_ret = UIUtility.RectTransformContain( __area, __test ); 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_IsPointerOverGameObject_xlua_st_(RealStatePtr L) { try { { bool gen_ret = UIUtility.IsPointerOverGameObject( ); 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_GetEdge_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { System.Collections.Generic.List __vertexs = (System.Collections.Generic.List)translator.GetObject(L, 1, typeof(System.Collections.Generic.List)); int __axis = LuaAPI.xlua_tointeger(L, 2); UnityEngine.Vector2 gen_ret = UIUtility.GetEdge( __vertexs, __axis ); translator.PushUnityEngineVector2(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_AddQuad_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.UI.VertexHelper _vertexHelper = (UnityEngine.UI.VertexHelper)translator.GetObject(L, 1, typeof(UnityEngine.UI.VertexHelper)); UnityEngine.Vector3[] _quadPositions = (UnityEngine.Vector3[])translator.GetObject(L, 2, typeof(UnityEngine.Vector3[])); UnityEngine.Color32 _color;translator.Get(L, 3, out _color); UnityEngine.Vector2[] _quadUVs = (UnityEngine.Vector2[])translator.GetObject(L, 4, typeof(UnityEngine.Vector2[])); UIUtility.AddQuad( _vertexHelper, _quadPositions, _color, _quadUVs ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_AddTriangle_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.UI.VertexHelper _vertexHelper = (UnityEngine.UI.VertexHelper)translator.GetObject(L, 1, typeof(UnityEngine.UI.VertexHelper)); UnityEngine.Vector3[] _positions = (UnityEngine.Vector3[])translator.GetObject(L, 2, typeof(UnityEngine.Vector3[])); UnityEngine.Color32 _color;translator.Get(L, 3, out _color); UnityEngine.Vector2[] _uvs = (UnityEngine.Vector2[])translator.GetObject(L, 4, typeof(UnityEngine.Vector2[])); UIUtility.AddTriangle( _vertexHelper, _positions, _color, _uvs ); return 0; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] static int _m_GetUIElementRelativePath_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { Snxxz.UI.UIRoot __root = (Snxxz.UI.UIRoot)translator.GetObject(L, 1, typeof(Snxxz.UI.UIRoot)); UnityEngine.Transform __transform = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform)); string gen_ret = UIUtility.GetUIElementRelativePath( __root, __transform ); LuaAPI.lua_pushstring(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_GetParents_xlua_st_(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); { UnityEngine.Transform __transform = (UnityEngine.Transform)translator.GetObject(L, 1, typeof(UnityEngine.Transform)); System.Collections.Generic.List __parents = (System.Collections.Generic.List)translator.GetObject(L, 2, typeof(System.Collections.Generic.List)); UIUtility.GetParents( __transform, ref __parents ); translator.Push(L, __parents); return 1; } } catch(System.Exception gen_e) { return LuaAPI.luaL_error(L, "c# exception:" + gen_e); } } } }