void CreditButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.NextScreen = parent.GetCredits(); } }
void ExitButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { game.Exit(); } }
public InteractorWithMouseButtonDownFilter( IInteractor wrappee, MouseButtonFlags mouseDownButtonFlags) : base(wrappee) { this.mouseButtonFlags_0 = mouseDownButtonFlags; }
void NextButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { Hide(); } }
void Button_DownSound(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { mouseDown.Fire(); } }
protected virtual void OnMouseClick(MouseButtonFlags e) { if (MouseClick != null) { MouseClick(this, e); } }
void Exit_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { state = NIGDialogState.MovingOut; } }
protected override void OnMouseMove(MouseButtonFlags btn) { base.OnMouseMove(btn); if (IsPressed) { } }
void HelpButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.GetTutorial().Reset(); parent.NextScreen = parent.GetTutorial(); } }
void ReplayButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { game.RestartGame(); Hide(); } }
void BackButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.Over(); Hide(); } }
/// <summary> /// Raises the <see cref="E:MouseLeave"/> event. /// </summary> protected virtual void OnMouseLeave(MouseButtonFlags flag) { // mouse is not over IsMouseOver = false; if (MouseLeave != null) { MouseLeave(this, flag); } }
/// <summary> /// Raises the <see cref="E:MouseEnter"/> event. /// </summary> protected virtual void OnMouseEnter(MouseButtonFlags flag) { // mouse is over IsMouseOver = true; if (MouseEnter != null) { MouseEnter(this, flag); } }
//GameGoal CreateGoal() //{ // GameGoal goal = new GameGoal(RulesTable.CityMaxDevelopment * 8); // return goal; //} void StartButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.GetOverlay().In(); isStarting = true; countDown = 1.2f; } }
void Prev_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { if (!Back()) { } } }
void Continue_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { if (!Advance()) { } } }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.RawInput.MouseInputEventArgs"/> class. /// /// </summary> /// <param name="rawInput">The raw input.</param> internal MyMouseInputArgs(ref RawInput rawInput) { Device = rawInput.Header.Device; Mode = (MouseMode)rawInput.Data.Mouse.Flags; ButtonFlags = (MouseButtonFlags)rawInput.Data.Mouse.ButtonsData.ButtonFlags; WheelDelta = (int)rawInput.Data.Mouse.ButtonsData.ButtonData; Buttons = rawInput.Data.Mouse.RawButtons; X = rawInput.Data.Mouse.LastX; Y = rawInput.Data.Mouse.LastY; ExtraInformation = rawInput.Data.Mouse.ExtraInformation; }
private void MouseInput(Object sender, MouseInputEventArgs e) { MouseButtonFlags flags = e.ButtonFlags; if ((flags & MouseButtonFlags.LeftDown) == MouseButtonFlags.LeftDown) { _left = ButtonState.Pressed; } else if ((flags & MouseButtonFlags.LeftUp) == MouseButtonFlags.LeftUp) { _left = ButtonState.Released; } if ((flags & MouseButtonFlags.RightDown) == MouseButtonFlags.RightDown) { _right = ButtonState.Pressed; } else if ((flags & MouseButtonFlags.RightUp) == MouseButtonFlags.RightUp) { _right = ButtonState.Released; } if ((flags & MouseButtonFlags.MiddleDown) == MouseButtonFlags.MiddleDown) { _middle = ButtonState.Pressed; } else if ((flags & MouseButtonFlags.MiddleUp) == MouseButtonFlags.MiddleUp) { _middle = ButtonState.Released; } if ((flags & MouseButtonFlags.Button4Down) == MouseButtonFlags.Button4Down) { _x1 = ButtonState.Pressed; } else if ((flags & MouseButtonFlags.Button4Up) == MouseButtonFlags.Button4Up) { _x1 = ButtonState.Released; } if ((flags & MouseButtonFlags.Button5Down) == MouseButtonFlags.Button5Down) { _x2 = ButtonState.Pressed; } else if ((flags & MouseButtonFlags.Button5Up) == MouseButtonFlags.Button5Up) { _x2 = ButtonState.Released; } _wheelDelta += e.WheelDelta; _pos.X += e.X; _pos.Y += e.Y; }
public void Device_MouseInput(object sender, MouseInputEventArgs e) { MousePoint = form.PointToClient(Cursor.Position); _mouseDelta.X = e.X; _mouseDelta.Y = e.Y; MouseWheelDelta = e.WheelDelta; if (e.ButtonFlags == MouseButtonFlags.None) { return; } MouseButtonFlags mouseFlags = e.ButtonFlags; // Don't consider mouse clicks outside of the client area if (form.Focused == false || form.ClientRectangle.Contains(MousePoint) == false) { mouseFlags &= ~(MouseButtonFlags.LeftDown | MouseButtonFlags.RightDown); } // Find the pressed/unpressed keys if (mouseFlags == MouseButtonFlags.LeftDown) { if ((MouseDown & MouseButtonFlags.LeftDown) != MouseButtonFlags.LeftDown) { MouseDown |= MouseButtonFlags.LeftDown; MousePressed |= MouseButtonFlags.LeftDown; } } else if (mouseFlags == MouseButtonFlags.LeftUp) { MouseDown &= ~MouseButtonFlags.LeftDown; MousePressed |= MouseButtonFlags.LeftUp; } if (mouseFlags == MouseButtonFlags.RightDown) { if ((MouseDown & MouseButtonFlags.RightDown) != MouseButtonFlags.RightDown) { MouseDown |= MouseButtonFlags.RightDown; MousePressed |= MouseButtonFlags.RightDown; } } else if (mouseFlags == MouseButtonFlags.RightUp) { MouseDown &= ~MouseButtonFlags.RightDown; MousePressed |= MouseButtonFlags.RightUp; } }
protected virtual void OnMouseMove(MouseButtonFlags flag) { if (MouseMove != null) { MouseMove(this, flag); } //if (!IsMouseOver) //{ // OnMouseEnter(); //} //else if (IsMouseOver) //{ // OnMouseLeave(); //} }
/// <summary> /// Raises the <see cref="E:MouseDown"/> event. /// </summary> /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event sounds.</param> protected virtual void OnMouseDown(MouseButtonFlags btn) { if (IsMouseOver) { // the mouse is now down if ((btn & MouseButtonFlags.Left) == MouseButtonFlags.Left) { IsPressed = true; if (MouseDown != null) { MouseDown(this, btn); } } } }
/// <summary> /// Raises the <see cref="E:MouseUp"/> event. /// </summary> /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event sounds.</param> protected virtual void OnMouseUp(MouseButtonFlags btn) { // if the mouse was down, we just got a click if (IsPressed && (btn & MouseButtonFlags.Left) == MouseButtonFlags.Left) { IsPressed = false; if (Enabled) { // raise the event if (MouseUp != null) { MouseUp(this, btn); } OnMouseClick(btn); } //IsMouseOver = false; } }
void Continue_Click(object sender,MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { if (!Advance()) { } } }
void Exit_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { state = NIGDialogState.MovingOut; } }
void Button_DownSound(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { mouseDown.Fire(); } }
void Prev_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { if (!Back()) { } } }
void BackButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.Over(); Hide(); } }
void Button_MouseIn(object sender, MouseButtonFlags btn) { //mouseHover.Fire(); }
protected virtual void OnMouseMove(MouseButtonFlags flag) { if (MouseMove != null) MouseMove(this, flag); //if (!IsMouseOver) //{ // OnMouseEnter(); //} //else if (IsMouseOver) //{ // OnMouseLeave(); //} }
/// <summary> /// Raises the <see cref="E:MouseLeave"/> event. /// </summary> protected virtual void OnMouseLeave(MouseButtonFlags flag) { // mouse is not over IsMouseOver = false; if (MouseLeave != null) MouseLeave(this, flag); }
/// <summary> /// Initializes a new instance of the <see cref="T:SharpDX.RawInput.MouseInputEventArgs"/> class. /// /// </summary> /// <param name="rawInput">The raw input.</param> internal MyMouseInputArgs(ref RawInput rawInput) { Device = rawInput.Header.Device; Mode = (MouseMode)rawInput.Data.Mouse.Flags; ButtonFlags = (MouseButtonFlags)rawInput.Data.Mouse.ButtonsData.ButtonFlags; WheelDelta = (int)rawInput.Data.Mouse.ButtonsData.ButtonData; Buttons = rawInput.Data.Mouse.RawButtons; X = rawInput.Data.Mouse.LastX; Y = rawInput.Data.Mouse.LastY; ExtraInformation = rawInput.Data.Mouse.ExtraInformation; }
void ExitButton_Pressed(object sender, MouseButtonFlags btn) { nigMenu.Show(); }
protected virtual void OnUpdate(GameTime time) { MouseButtonFlags flag = MouseButtonFlags.None; if (MouseInput.IsLeftPressed) { flag |= MouseButtonFlags.Left; } if (MouseInput.IsRightPressed) { flag |= MouseButtonFlags.Right; } //if (MouseInput.DX != 0 && MouseInput.DY != 0) //{ bool inBounds = IsInBounds(MouseInput.X, MouseInput.Y); if (!IsMouseOver && inBounds) { OnMouseEnter(flag); //IsMouseOver = inBounds; } if (IsMouseOver && !inBounds) { OnMouseLeave(flag); //IsMouseOver = inBounds; } if (inBounds) { OnMouseMove(flag); flag = MouseButtonFlags.None; if (MouseInput.IsMouseDownLeft) { flag |= MouseButtonFlags.Left; } if (MouseInput.IsMouseDownRight) { flag |= MouseButtonFlags.Right; } if (flag != MouseButtonFlags.None) { OnMouseDown(flag); } flag = MouseButtonFlags.None; if (MouseInput.IsMouseUpLeft) { flag |= MouseButtonFlags.Left; } if (MouseInput.IsMouseUpRight) { flag |= MouseButtonFlags.Right; } if (flag != MouseButtonFlags.None) { OnMouseUp(flag); } if (MouseInput.DScrollWheelValue != 0) { OnMouseWheel(); } } //} }
void ExitButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { game.Exit(); } }
void Back_Click(object sender, MouseButtonFlags btn) { Reset(); parent.Back(); }
/// <summary> /// Raises the <see cref="E:MouseDown"/> event. /// </summary> /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event sounds.</param> protected virtual void OnMouseDown(MouseButtonFlags btn) { if (IsMouseOver) { // the mouse is now down if ((btn & MouseButtonFlags.Left) == MouseButtonFlags.Left) { IsPressed = true; if (MouseDown != null) MouseDown(this, btn); } } }
public MouseEventArgs(string deviceName, MouseButtonFlags mouseButtons) : base(deviceName) { Buttons = mouseButtons; }
void Button_MouseIn(object sender, MouseButtonFlags btn) { //mouseHover.Fire(); }
/// <summary> /// Raises the <see cref="E:MouseUp"/> event. /// </summary> /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event sounds.</param> protected virtual void OnMouseUp(MouseButtonFlags btn) { // if the mouse was down, we just got a click if (IsPressed && (btn & MouseButtonFlags.Left) == MouseButtonFlags.Left) { IsPressed = false; if (Enabled) { // raise the event if (MouseUp != null) MouseUp(this, btn); OnMouseClick(btn); } //IsMouseOver = false; } }
/// <summary> /// Raises the <see cref="E:MouseEnter"/> event. /// </summary> protected virtual void OnMouseEnter(MouseButtonFlags flag) { // mouse is over IsMouseOver = true; if (MouseEnter != null) MouseEnter(this, flag); }
void ResumeButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { Hide(); } }
void HelpButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.GetTutorial().Reset(); parent.NextScreen = parent.GetTutorial(); } }
protected virtual void OnMouseClick(MouseButtonFlags e) { if (MouseClick != null) MouseClick(this, e); }
void ExitButton_Pressed(object sender, MouseButtonFlags btn) { nigMenu.Show(); }
//GameGoal CreateGoal() //{ // GameGoal goal = new GameGoal(RulesTable.CityMaxDevelopment * 8); // return goal; //} void StartButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.GetOverlay().In(); isStarting = true; countDown = 1.2f; } }
void ReplayButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { game.RestartGame(); Hide(); } }
void CreditButton_Click(object sender, MouseButtonFlags btn) { if (btn == MouseButtonFlags.Left) { parent.NextScreen = parent.GetCredits(); } }
void Back_Click(object sender, MouseButtonFlags btn) { Reset(); parent.Back(); }
protected override void OnMouseMove(MouseButtonFlags btn) { base.OnMouseMove(btn); if (IsPressed) { } }