Ejemplo n.º 1
0
        //---------------------------------------------------------------
        #endregion
        //---------------------------------------------------------------

        //---------------------------------------------------------------
        #region Methods
        //---------------------------------------------------------------
        /// <summary>
        /// Method that handles mouse events.
        /// </summary>
        /// <param name="position">The current position of the mouse.</param>
        /// <param name="button">The button that is pressed or released.</param>
        /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
        /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
        public override bool OnMouse(Purple.Math.Vector3 position, Purple.Input.MouseButton button, bool pressed)
        {
            ButtonState newState = buttonLogic.Update(this, position, button, pressed);

            UpdateState(newState);
            return(false);
        }
Ejemplo n.º 2
0
        //---------------------------------------------------------------
        #endregion
        //---------------------------------------------------------------

        //---------------------------------------------------------------
        #region Methods
        //---------------------------------------------------------------
        /// <summary>
        /// Method that handles mouse events.
        /// </summary>
        /// <param name="position">The current position of the mouse.</param>
        /// <param name="button">The button that is pressed or released.</param>
        /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
        /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
        public override bool OnMouse(Vector3 position, Purple.Input.MouseButton button, bool pressed)
        {
            base.OnMouse(position, button, pressed);
            ButtonState newState = logic.Update(this, position, button, pressed);

            UpdateState(newState, position.Vector2);
            return(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Method that handles mouse events.
        /// </summary>
        /// <param name="position">The current position of the mouse.</param>
        /// <param name="button">The button that is pressed or released.</param>
        /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
        /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
        public bool OnMouse(Vector3 position, Purple.Input.MouseButton button, bool pressed)
        {
            ArrayList cloned = (ArrayList)list.Clone();

            for (int i = cloned.Count - 1; i >= 0; i--)
            {
                IGuiElement element = (cloned[i] as IGuiElement);
                if (element.Enabled && element.OnMouse(position, button, pressed))
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Method that handles mouse events.
 /// </summary>
 /// <param name="position">The current position of the mouse.</param>
 /// <param name="button">The button that is pressed or released.</param>
 /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
 /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
 public override bool OnMouse(Vector3 position, Purple.Input.MouseButton button, bool pressed)
 {
     return(pages[currentPage].OnMouse(position, button, pressed));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Method that handles mouse events.
 /// </summary>
 /// <param name="position">The current position of the mouse.</param>
 /// <param name="button">The button that is pressed or released.</param>
 /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
 /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
 public override bool OnMouse(Vector3 position, Purple.Input.MouseButton button, bool pressed)
 {
     return(children.OnMouse(position, button, pressed));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Method that handles mouse events.
 /// </summary>
 /// <param name="position">The current position of the mouse.</param>
 /// <param name="button">The button that is pressed or released.</param>
 /// <param name="pressed">Flag that indicates if button is pressed or released.</param>
 /// <returns>True if the key was handled and shouldn't be passed on to the underlaying elements.</returns>
 public override bool OnMouse(Purple.Math.Vector3 position, Purple.Input.MouseButton button, bool pressed)
 {
     return(base.OnMouse(position, button, pressed));
 }