444 lines
15 KiB
C#
444 lines
15 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 BFBFScrollRectMultSizeWrap
|
|
{
|
|
public static void __Register(RealStatePtr L)
|
|
{
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
System.Type type = typeof(BF.BFScrollRectMultSize);
|
|
Utils.BeginObjectRegister(type, L, translator, 0, 6, 6, 6);
|
|
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefillCells", _m_RefillCells);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetTotalCount", _m_SetTotalCount);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "RefreshAll", _m_RefreshAll);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "SetSelected", _m_SetSelected);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "ClearCells", _m_ClearCells);
|
|
Utils.RegisterFunc(L, Utils.METHOD_IDX, "AnchoredPositionChange", _m_AnchoredPositionChange);
|
|
|
|
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "bfCell", _g_get_bfCell);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "spacing", _g_get_spacing);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "topRecoveryOffset", _g_get_topRecoveryOffset);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "downRecoveryOffset", _g_get_downRecoveryOffset);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "direction", _g_get_direction);
|
|
Utils.RegisterFunc(L, Utils.GETTER_IDX, "reverse", _g_get_reverse);
|
|
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "bfCell", _s_set_bfCell);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "spacing", _s_set_spacing);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "topRecoveryOffset", _s_set_topRecoveryOffset);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "downRecoveryOffset", _s_set_downRecoveryOffset);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "direction", _s_set_direction);
|
|
Utils.RegisterFunc(L, Utils.SETTER_IDX, "reverse", _s_set_reverse);
|
|
|
|
|
|
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 {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
if(LuaAPI.lua_gettop(L) == 1)
|
|
{
|
|
|
|
var gen_ret = new BF.BFScrollRectMultSize();
|
|
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 BF.BFScrollRectMultSize constructor!");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefillCells(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _totalCount = LuaAPI.xlua_tointeger(L, 2);
|
|
int _targetIndex = LuaAPI.xlua_tointeger(L, 3);
|
|
|
|
gen_to_be_invoked.RefillCells( _totalCount, _targetIndex );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetTotalCount(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _totalCount = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.SetTotalCount( _totalCount );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_RefreshAll(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.RefreshAll( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_SetSelected(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
int _index = LuaAPI.xlua_tointeger(L, 2);
|
|
|
|
gen_to_be_invoked.SetSelected( _index );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_ClearCells(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.ClearCells( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _m_AnchoredPositionChange(RealStatePtr L)
|
|
{
|
|
try {
|
|
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
|
|
|
|
|
|
{
|
|
|
|
gen_to_be_invoked.AnchoredPositionChange( );
|
|
|
|
|
|
|
|
return 0;
|
|
}
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_bfCell(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.bfCell);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_spacing(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.spacing);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_topRecoveryOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.topRecoveryOffset);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_downRecoveryOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushnumber(L, gen_to_be_invoked.downRecoveryOffset);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_direction(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
translator.Push(L, gen_to_be_invoked.direction);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _g_get_reverse(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
LuaAPI.lua_pushboolean(L, gen_to_be_invoked.reverse);
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 1;
|
|
}
|
|
|
|
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_bfCell(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.bfCell = (BF.BFCell)translator.GetObject(L, 2, typeof(BF.BFCell));
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_spacing(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.spacing = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_topRecoveryOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.topRecoveryOffset = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_downRecoveryOffset(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.downRecoveryOffset = (float)LuaAPI.lua_tonumber(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
|
|
static int _s_set_direction(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
BF.BFUIDirection gen_value;translator.Get(L, 2, out gen_value);
|
|
gen_to_be_invoked.direction = 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_reverse(RealStatePtr L)
|
|
{
|
|
try {
|
|
ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
|
|
|
|
BF.BFScrollRectMultSize gen_to_be_invoked = (BF.BFScrollRectMultSize)translator.FastGetCSObj(L, 1);
|
|
gen_to_be_invoked.reverse = LuaAPI.lua_toboolean(L, 2);
|
|
|
|
} catch(System.Exception gen_e) {
|
|
return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|