Esempio n. 1
0
        /// <summary>
        /// Triggered by runtime when a button is pressed.
        /// </summary>
        /// <param name="code">Code of the pressed button.</param>
        /// <param name="deviceIdx">Device the event originated from.</param>
        /// <param name="isUsed">Set to true if the event was handled previously by some internal system (like GUI).</param>
        private static void Internal_TriggerButtonDown(ButtonCode code, int deviceIdx, bool isUsed)
        {
            ButtonEvent ev = new ButtonEvent(code, deviceIdx, isUsed);

            if (OnButtonDown != null)
                OnButtonDown(ev);
        }
Esempio n. 2
0
        /// <summary>
        /// Triggered by runtime when a button is released.
        /// </summary>
        /// <param name="code">Code of the released button.</param>
        /// <param name="deviceIdx">Device the event originated from.</param>
        private static void Internal_TriggerButtonUp(ButtonCode code, int deviceIdx)
        {
            ButtonEvent ev = new ButtonEvent(code, deviceIdx);

            if (OnButtonUp != null)
                OnButtonUp(ev);
        }
 /// <summary>
 /// Triggered when the user releases a keyboard button.
 /// </summary>
 /// <param name="ev">Information about the keyboard release event.</param>
 private void OnButtonUp(ButtonEvent ev)
 {
     guiCurveEditor.OnButtonUp(ev);
 }
Esempio n. 4
0
 /// <summary>
 /// Handles input. Should be called by the owning window whenever a button is released.
 /// </summary>
 /// <param name="ev">Object containing button release event information.</param>
 internal void OnButtonUp(ButtonEvent ev)
 {
     if(ev.Button == ButtonCode.Delete)
         DeleteSelectedKeyframes();
 }