コード例 #1
0
 public void ShowEditBox(EditBoxMessage ebm, Action <string> onEditBoxResult, Action <string> OnEditCancel, Action <double> onEditBoxHeightChange, Action <string, int> onEditBoxTextChange)
 {
     this.onEditBoxResult       = onEditBoxResult;
     this.onEditBoxCancel       = OnEditCancel;
     this.onEditBoxHeightChange = onEditBoxHeightChange;
     this.onEditBoxTextChange   = onEditBoxTextChange;
     EditBox.ShowEditBox(ebm);
     isKeyboardOpened = true;
 }
コード例 #2
0
    static int ShowEditBox(IntPtr L)
    {
        try
        {
            ToLua.CheckArgsCount(L, 6);
            NativeManager          obj  = (NativeManager)ToLua.CheckObject(L, 1, typeof(NativeManager));
            EditBoxMessage         arg0 = (EditBoxMessage)ToLua.CheckObject(L, 2, typeof(EditBoxMessage));
            System.Action <string> arg1 = null;
            LuaTypes funcType3          = LuaDLL.lua_type(L, 3);

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

            System.Action <string> arg2 = null;
            LuaTypes funcType4          = LuaDLL.lua_type(L, 4);

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

            System.Action <double> arg3 = null;
            LuaTypes funcType5          = LuaDLL.lua_type(L, 5);

            if (funcType5 != LuaTypes.LUA_TFUNCTION)
            {
                arg3 = (System.Action <double>)ToLua.CheckObject(L, 5, typeof(System.Action <double>));
            }
            else
            {
                LuaFunction func = ToLua.ToLuaFunction(L, 5);
                arg3 = DelegateFactory.CreateDelegate(typeof(System.Action <double>), func) as System.Action <double>;
            }

            System.Action <string, int> arg4 = null;
            LuaTypes funcType6 = LuaDLL.lua_type(L, 6);

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

            obj.ShowEditBox(arg0, arg1, arg2, arg3, arg4);
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }