Exemplo n.º 1
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     if (Clicked != null)
     {
         // remove ourselves
         args.GuiManager.MouseUpListeners.Remove(this);
         Clicked(this, new EventArgs());
     }
 }
Exemplo n.º 2
0
        public void MouseMotion(GuiMouseEventArgs args)
        {
            // Figure out translate point
            float x = args.Point.X
                      - this.screenPoint.X - this.ViewportOffset.X;
            float y = args.Point.Y
                      - this.screenPoint.Y - this.ViewportOffset.Y;

            // Save the point
            mousePoint = new PointF(x, y);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Triggered when the mouse is released.
        /// </summary>
        /// <param name="args"></param>
        public void MouseUp(GuiMouseEventArgs args)
        {
            // Pass it to the minor mode if we have it
            if (minorMode != null)
            {
                minorMode.MouseUp(args);
                return;
            }

            // Figure out the mouse button
            if (args.Button == MfGames.Sprite3.Gui.MouseButtons.Left)
            {
                // Grab it
                Grab();
            }
            else if (args.Button == MfGames.Sprite3.Gui.MouseButtons.Right)
            {
                // Drop the block
                Drop();
            }
        }
Exemplo n.º 4
0
        public override void MouseButtonUp(MouseEventArgs args)
        {
            // Call our parent
            base.MouseButtonUp(args);

            // Process our events
            GuiMouseEventArgs gargs = new GuiMouseEventArgs();

            // Translate the mouse buttons
            if (args.Button == BooGame.Input.MouseButtons.Left ||
                args.Button == BooGame.Input.MouseButtons.None)
            {
                gargs.Button = MfGames.Sprite3.Gui.MouseButtons.Left;
            }
            if (args.Button == BooGame.Input.MouseButtons.Right)
            {
                gargs.Button = MfGames.Sprite3.Gui.MouseButtons.Right;
            }

            // Fire the event
            Game.GuiManager.MouseUp(gargs);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Triggered when the mouse is released over this sprite.
        /// </summary>
        public void MouseUp(GuiMouseEventArgs args)
        {
            // We only do stuff if we haven't been accepted
            if (Game.PlayMode == null || prayer.IsAccepted)
            {
                return;
            }

            // Create the center point
            PointF p = new PointF(
                Point.X + 31,
                Point.Y + 90);

            // We want to accept this one
            prayer.IsAccepted = true;
            secondsLeft       = Constants.PrayerSpeechFade;
            Game.PlayMode
            .SwarmHearts(Constants.HeartsPerPrayerAcceptance, p);

            // End the turn
            Game.State.EndTurn();
            args.StopProcessing = true;
        }
Exemplo n.º 6
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     Close();
 }
Exemplo n.º 7
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     Timeout();
 }
Exemplo n.º 8
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse motion event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseMotion(GuiMouseEventArgs args)
 {
 }
Exemplo n.º 9
0
        /// <summary>
        /// Triggered when the mouse is released over this sprite.
        /// </summary>
        public void MouseUp(GuiMouseEventArgs args)
        {
            // We only do stuff if we haven't been accepted
            if (Game.PlayMode == null || prayer.IsAccepted)
                return;

            // Create the center point
            PointF p = new PointF(
                Point.X + 31,
                Point.Y + 90);

            // We want to accept this one
            prayer.IsAccepted = true;
            secondsLeft = Constants.PrayerSpeechFade;
            Game.PlayMode
                .SwarmHearts(Constants.HeartsPerPrayerAcceptance, p);

            // End the turn
            Game.State.EndTurn();
            args.StopProcessing = true;
        }
Exemplo n.º 10
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse down event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseDown(GuiMouseEventArgs args)
 {
 }
Exemplo n.º 11
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse motion event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseMotion(GuiMouseEventArgs args)
 {
 }
Exemplo n.º 12
0
 public void MouseMotion(GuiMouseEventArgs args)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 13
0
 /// <summary>
 /// Triggered with mouse movement.
 /// </summary>
 /// <param name="args"></param>
 public void MouseMotion(GuiMouseEventArgs args)
 {
     // We don't do anything about this one
 }
Exemplo n.º 14
0
        /// <summary>
        /// Triggered when an object extending this class is placed
        /// in GuiManager.MouseDownListeners and the mouse up event
        /// is fired.
        /// </summary>
        /// <param name="args"></param>
        public void MouseUp(GuiMouseEventArgs args)
		{
			Close();
		}
Exemplo n.º 15
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     // Switch modes
     Debug("Mouse up!");
     Game.GameMode = nextMode;
 }
Exemplo n.º 16
0
 /// <summary>
 /// Triggered with mouse movement.
 /// </summary>
 /// <param name="args"></param>
 public void MouseMotion(GuiMouseEventArgs args)
 {
     // We don't do anything about this one
 }
Exemplo n.º 17
0
        /// <summary>
        /// Triggered when the mouse is released.
        /// </summary>
        /// <param name="args"></param>
        public void MouseUp(GuiMouseEventArgs args)
        {
            // Pass it to the minor mode if we have it
            if (minorMode != null)
            {
                minorMode.MouseUp(args);
                return;
            }

            // Figure out the mouse button
            if (args.Button == MfGames.Sprite3.Gui.MouseButtons.Left)
            {
                // Grab it
                Grab();
            }
            else if (args.Button == MfGames.Sprite3.Gui.MouseButtons.Right)
            {
                // Drop the block
                Drop();
            }
        }
Exemplo n.º 18
0
        public void MouseMotion(GuiMouseEventArgs args)
        {
            // Figure out translate point
            float x = args.Point.X
                - this.screenPoint.X - this.ViewportOffset.X;
            float y = args.Point.Y
                - this.screenPoint.Y - this.ViewportOffset.Y;

            // Save the point
            mousePoint = new PointF(x, y);
        }
Exemplo n.º 19
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     if (Clicked != null)
     {
         // remove ourselves
         args.GuiManager.MouseUpListeners.Remove(this);
         Clicked(this, new EventArgs());
     }
 }
Exemplo n.º 20
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     Timeout();
 }
Exemplo n.º 21
0
 public void MouseMotion(GuiMouseEventArgs args)
 {
     throw new Exception("The method or operation is not implemented.");
 }
Exemplo n.º 22
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse down event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseDown(GuiMouseEventArgs args)
 {
 }
Exemplo n.º 23
0
        public override void MouseButtonUp(MouseEventArgs args)
        {
            // Call our parent
            base.MouseButtonUp(args);

            // Process our events
            GuiMouseEventArgs gargs = new GuiMouseEventArgs();

            // Translate the mouse buttons
            if (args.Button == BooGame.Input.MouseButtons.Left ||
                args.Button == BooGame.Input.MouseButtons.None)
                gargs.Button = MfGames.Sprite3.Gui.MouseButtons.Left;
            if (args.Button == BooGame.Input.MouseButtons.Right)
                gargs.Button = MfGames.Sprite3.Gui.MouseButtons.Right;

            // Fire the event
            Game.GuiManager.MouseUp(gargs);
        }
Exemplo n.º 24
0
 /// <summary>
 /// Triggered when an object extending this class is placed
 /// in GuiManager.MouseDownListeners and the mouse up event
 /// is fired.
 /// </summary>
 /// <param name="args"></param>
 public void MouseUp(GuiMouseEventArgs args)
 {
     // Switch modes
     Debug("Mouse up!");
     Game.GameMode = nextMode;
 }