コード例 #1
0
        public FInputTouchBindingHandle BindTouch(EInputEvent keyEvent, FInputTouchHandler handler)
        {
            IntPtr  functionAddress;
            UObject obj;

            if (NativeReflection.LookupTable.GetFunctionAddress(handler, out functionAddress, out obj))
            {
                return((FInputTouchBindingHandle)Native_UInputComponent.BindTouch(
                           Address, (byte)keyEvent, obj.Address, functionAddress));
            }
            else
            {
                LogFunctionNotFound("BindTouch", keyEvent.ToString(), handler);
            }
            return(default(FInputTouchBindingHandle));
        }
コード例 #2
0
        public override string ToString()
        {
            string str = "";

            switch (EventType)
            {
            case EInputEvent.KeyEvent:
                str = KeyEvent.ToString();
                break;

            case EInputEvent.MouseEvent:
                str = MouseEvent.ToString();
                break;
            }
            return(string.Format("[{0}] {1}", EventType.ToString(), str));
        }
コード例 #3
0
        /// <summary>
        /// Binds a chord event to a delegate function.
        /// Returned reference is only guaranteed to be valid until another input key is bound.
        /// </summary>
        public FInputKeyBindingHandle BindKey(FInputChord inputChord, EInputEvent keyEvent, FInputActionHandler handler)
        {
            IntPtr  functionAddress;
            UObject obj;

            if (NativeReflection.LookupTable.GetFunctionAddress(handler, out functionAddress, out obj))
            {
                return((FInputKeyBindingHandle)Native_UInputComponent.BindKeyChord(
                           Address,
                           ref inputChord.Key, inputChord.Shift, inputChord.Ctrl, inputChord.Alt, inputChord.Cmd,
                           (byte)keyEvent, obj.Address, functionAddress));
            }
            else
            {
                LogFunctionNotFound("BindKey", keyEvent.ToString(), handler);
            }
            return(default(FInputKeyBindingHandle));
        }