//this source code was auto-generated by tolua#, do not modify it
using System;
using LuaInterface;

public class UGUIToolWrap
{
	public static void Register(LuaState L)
	{
		L.BeginClass(typeof(UGUITool), typeof(System.Object));
		L.RegFunction("SetText", SetText);
		L.RegFunction("SetButton", SetButton);
		L.RegFunction("SetInputField", SetInputField);
		L.RegFunction("SetDropDown", SetDropDown);
		L.RegFunction("SetToggle", SetToggle);
		L.RegFunction("SetSlider", SetSlider);
		L.RegFunction("New", _CreateUGUITool);
		L.RegFunction("__tostring", ToLua.op_ToString);
		L.EndClass();
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int _CreateUGUITool(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 0)
			{
				UGUITool obj = new UGUITool();
				ToLua.PushObject(L, obj);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: UGUITool.New");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetText(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			string arg2 = ToLua.CheckString(L, 3);
			UnityEngine.UI.Text o = UGUITool.SetText(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetButton(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			System.Action<UnityEngine.GameObject> arg2 = null;
			LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

			if (funcType3 != LuaTypes.LUA_TFUNCTION)
			{
				 arg2 = (System.Action<UnityEngine.GameObject>)ToLua.CheckObject(L, 3, typeof(System.Action<UnityEngine.GameObject>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 3);
				arg2 = DelegateFactory.CreateDelegate(typeof(System.Action<UnityEngine.GameObject>), func) as System.Action<UnityEngine.GameObject>;
			}

			UnityEngine.UI.Button o = UGUITool.SetButton(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetInputField(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			System.Action<string> arg2 = null;
			LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

			if (funcType3 != LuaTypes.LUA_TFUNCTION)
			{
				 arg2 = (System.Action<string>)ToLua.CheckObject(L, 3, typeof(System.Action<string>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 3);
				arg2 = DelegateFactory.CreateDelegate(typeof(System.Action<string>), func) as System.Action<string>;
			}

			UnityEngine.UI.InputField o = UGUITool.SetInputField(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetDropDown(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			System.Action<int> arg2 = null;
			LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

			if (funcType3 != LuaTypes.LUA_TFUNCTION)
			{
				 arg2 = (System.Action<int>)ToLua.CheckObject(L, 3, typeof(System.Action<int>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 3);
				arg2 = DelegateFactory.CreateDelegate(typeof(System.Action<int>), func) as System.Action<int>;
			}

			UnityEngine.UI.Dropdown o = UGUITool.SetDropDown(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetToggle(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			System.Action<bool> arg2 = null;
			LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

			if (funcType3 != LuaTypes.LUA_TFUNCTION)
			{
				 arg2 = (System.Action<bool>)ToLua.CheckObject(L, 3, typeof(System.Action<bool>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 3);
				arg2 = DelegateFactory.CreateDelegate(typeof(System.Action<bool>), func) as System.Action<bool>;
			}

			UnityEngine.UI.Toggle o = UGUITool.SetToggle(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}

	[MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
	static int SetSlider(IntPtr L)
	{
		try
		{
			ToLua.CheckArgsCount(L, 3);
			PrefabBinder arg0 = (PrefabBinder)ToLua.CheckUnityObject(L, 1, typeof(PrefabBinder));
			string arg1 = ToLua.CheckString(L, 2);
			System.Action<float> arg2 = null;
			LuaTypes funcType3 = LuaDLL.lua_type(L, 3);

			if (funcType3 != LuaTypes.LUA_TFUNCTION)
			{
				 arg2 = (System.Action<float>)ToLua.CheckObject(L, 3, typeof(System.Action<float>));
			}
			else
			{
				LuaFunction func = ToLua.ToLuaFunction(L, 3);
				arg2 = DelegateFactory.CreateDelegate(typeof(System.Action<float>), func) as System.Action<float>;
			}

			UnityEngine.UI.Slider o = UGUITool.SetSlider(arg0, arg1, arg2);
			ToLua.Push(L, o);
			return 1;
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
}

