示例#1
0
    public void DrawFill(PicturePoint point)
    {
        this.buffer.PriorityEnabled = this.PriorityEnabled;
        this.buffer.PriorityColor   = this.PriorityColor;
        this.buffer.VisualEnabled   = this.VisualEnabled;
        this.buffer.VisualColor     = this.VisualColor;

        this.buffer.DrawFill(point.X, point.Y);
    }
示例#2
0
    public void DrawBrush(PicturePoint point, byte size, PictureBrushShape shape, PictureBrushPattern pattern, int patternNumber)
    {
        this.buffer.PriorityEnabled = this.PriorityEnabled;
        this.buffer.PriorityColor   = this.PriorityColor;
        this.buffer.VisualEnabled   = this.VisualEnabled;
        this.buffer.VisualColor     = this.VisualColor;

        this.buffer.DrawPattern(point.X, point.Y, size, shape, pattern, patternNumber);
    }
示例#3
0
        private void HandleMouseEvent(int button, ScreenPoint scaledScreen)
        {
            PicturePoint pt = this.GraphicsDriver.ScreenToPicturePoint(scaledScreen);

            switch (this.MouseMode)
            {
            case MouseMode.Brian:
                this.PushMouseStack(button, pt.X, pt.Y);
                break;

            case MouseMode.SierraV2:
            {
                int x = pt.X;
                int y = pt.Y;

                MouseArea area = this.CheckArea(ref x, ref y);

                switch (area)
                {
                case MouseArea.Status:
                    // Note we don't check for Flags.Menu, so the mouse
                    // can trigger the menu even if it can't be done with keyboard
                    // Because we don't check Flags.Menu, we have to check for empty menu
                    if (this.State.MenuEnabled && this.Interpreter.Menu.Items.Count > 0)
                    {
                        this.ShowMenu();
                    }

                    break;

                case MouseArea.Game:
                    this.ObjectManager.MoveEgo(x, y);
                    break;

                case MouseArea.CommandEntry:
                    this.ObjectManager.MoveEgo(x, 169);
                    break;
                }
            }

            break;

            case MouseMode.SierraV3:
                break;
            }
        }
示例#4
0
        public MouseDown PollMouse()
        {
            MouseDown m = this.PopMouseStack();

            if (m == null)
            {
                int button;
                int screenScaledX;
                int screenScaledY;

                this.InputDriver.PollMouse(out button, out screenScaledX, out screenScaledY);

                PicturePoint pt = this.GraphicsDriver.ScreenToPicturePoint(new ScreenPoint(screenScaledX, screenScaledY));

                m = new MouseDown(button, pt.X, pt.Y);
            }

            return(m);
        }
示例#5
0
        /// <summary>
        /// Returns a value indicating whether this instance and a specified Object represent the same type and value.
        /// </summary>
        /// <param name="obj">An object to compare to this instance.</param>
        /// <returns>true if obj is the same type and value; otherwise, false. </returns>
        public override bool Equals(object obj)
        {
            if (obj != null)
            {
                PicturePoint o = (PicturePoint)obj;

                if (this.X != o.X)
                {
                    return(false);
                }

                if (this.Y != o.Y)
                {
                    return(false);
                }

                return(true);
            }

            return(false);
        }