Exemple #1
0
 static int OnClick(IntPtr L)
 {
     L.ChkArgsCount(2);
     ZFrame.UGUI.UIButton obj = (ZFrame.UGUI.UIButton)L.ChkUnityObjectSelf(1, "ZFrame.UGUI.UIButton");
     UnityEngine.EventSystems.BaseEventData arg0 = (UnityEngine.EventSystems.BaseEventData)L.ChkUserData(2, typeof(UnityEngine.EventSystems.BaseEventData));
     obj.OnClick(arg0);
     return(0);
 }
Exemple #2
0
    static int SetInteractable(IntPtr L)
    {
        L.ChkArgsCount(2);
        ZFrame.UGUI.UIButton obj = (ZFrame.UGUI.UIButton)L.ChkUnityObjectSelf(1, "ZFrame.UGUI.UIButton");
        var arg0 = L.ChkBoolean(2);

        obj.SetInteractable(arg0);
        return(0);
    }
Exemple #3
0
    static int set_onAction(IntPtr L)
    {
        object o = L.ToUserData(1);

        ZFrame.UGUI.UIButton obj = (ZFrame.UGUI.UIButton)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name onAction");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index onAction on a nil value");
            }
        }

        LuaTypes funcType = L.Type(3);

        if (funcType != LuaTypes.LUA_TFUNCTION)
        {
            obj.onAction = (UnityEngine.Events.UnityAction <ZFrame.UGUI.UIButton>)L.ChkUserData(3, typeof(UnityEngine.Events.UnityAction <ZFrame.UGUI.UIButton>));
        }
        else
        {
            LuaFunction func = L.ToLuaFunction(3);
            obj.onAction = (param0) =>
            {
                int top = func.BeginPCall();
                L.PushLightUserData(param0);
                func.PCall(top, 1);
                func.EndPCall(top);
            };
        }
        return(0);
    }
Exemple #4
0
    static int get_onAction(IntPtr L)
    {
        object o = L.ToUserData(1);

        ZFrame.UGUI.UIButton obj = (ZFrame.UGUI.UIButton)o;

        if (obj == null)
        {
            LuaTypes types = L.Type(1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name onAction");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index onAction on a nil value");
            }
        }

        L.PushUData(obj.onAction);
        return(1);
    }