//--------------------------------------------------------------- #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); }
//--------------------------------------------------------------- #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); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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)); }