Files
Main/Assets/GameAssets/Resources/GameUI/XLua/Gen/UITextureWrap.cs

362 lines
13 KiB
C#
Raw Normal View History

2025-01-25 04:38:09 +08:00
#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 UITextureWrap
{
public static void __Register(RealStatePtr L)
{
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
System.Type type = typeof(UITexture);
Utils.BeginObjectRegister(type, L, translator, 0, 2, 8, 6);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "MakePixelPerfect", _m_MakePixelPerfect);
Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnFill", _m_OnFill);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "mainTexture", _g_get_mainTexture);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "material", _g_get_material);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "shader", _g_get_shader);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "premultipliedAlpha", _g_get_premultipliedAlpha);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "border", _g_get_border);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "uvRect", _g_get_uvRect);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "drawingDimensions", _g_get_drawingDimensions);
Utils.RegisterFunc(L, Utils.GETTER_IDX, "fixedAspect", _g_get_fixedAspect);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "mainTexture", _s_set_mainTexture);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "material", _s_set_material);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "shader", _s_set_shader);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "border", _s_set_border);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "uvRect", _s_set_uvRect);
Utils.RegisterFunc(L, Utils.SETTER_IDX, "fixedAspect", _s_set_fixedAspect);
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 {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
if(LuaAPI.lua_gettop(L) == 1)
{
UITexture gen_ret = new UITexture();
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 UITexture constructor!");
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_MakePixelPerfect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
{
gen_to_be_invoked.MakePixelPerfect( );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _m_OnFill(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
{
BetterList<UnityEngine.Vector3> _verts = (BetterList<UnityEngine.Vector3>)translator.GetObject(L, 2, typeof(BetterList<UnityEngine.Vector3>));
BetterList<UnityEngine.Vector2> _uvs = (BetterList<UnityEngine.Vector2>)translator.GetObject(L, 3, typeof(BetterList<UnityEngine.Vector2>));
BetterList<UnityEngine.Color32> _cols = (BetterList<UnityEngine.Color32>)translator.GetObject(L, 4, typeof(BetterList<UnityEngine.Color32>));
gen_to_be_invoked.OnFill( _verts, _uvs, _cols );
return 0;
}
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_mainTexture(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.mainTexture);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_material(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.material);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_shader(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.shader);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_premultipliedAlpha(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.premultipliedAlpha);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_border(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.PushUnityEngineVector4(L, gen_to_be_invoked.border);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_uvRect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.Push(L, gen_to_be_invoked.uvRect);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_drawingDimensions(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
translator.PushUnityEngineVector4(L, gen_to_be_invoked.drawingDimensions);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _g_get_fixedAspect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.fixedAspect);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 1;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_mainTexture(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.mainTexture = (UnityEngine.Texture)translator.GetObject(L, 2, typeof(UnityEngine.Texture));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_material(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.material = (UnityEngine.Material)translator.GetObject(L, 2, typeof(UnityEngine.Material));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_shader(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.shader = (UnityEngine.Shader)translator.GetObject(L, 2, typeof(UnityEngine.Shader));
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
static int _s_set_border(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
UnityEngine.Vector4 gen_value;translator.Get(L, 2, out gen_value);
gen_to_be_invoked.border = 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_uvRect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
UnityEngine.Rect gen_value;translator.Get(L, 2, out gen_value);
gen_to_be_invoked.uvRect = 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_fixedAspect(RealStatePtr L)
{
try {
ObjectTranslatorChild translator = (ObjectTranslatorChild)ObjectTranslatorPool.Instance.Find(L);
UITexture gen_to_be_invoked = (UITexture)translator.FastGetCSObj(L, 1);
gen_to_be_invoked.fixedAspect = LuaAPI.lua_toboolean(L, 2);
} catch(System.Exception gen_e) {
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
}
return 0;
}
}
}