Esempio n. 1
0
        public override void Update(Draw d)
        {
            if (curimgfn == Files.brick_invisible && World.PlayMode == PlayMode.Editor)
                d.DrawRectangle(dPen.Black, Left, Top, Width, Height);

            d.DrawImage(curimg, Left, Top, Width, Height);
        }
Esempio n. 2
0
        private void Update(Draw d)
        {
            world.Update(d, properties.SelectedObjects);

            if (curRectangle != Rectangle.Empty)
            {
                d.MoveCoords(world.Viewport.X, world.Viewport.Y);

                d.DrawRectangle(dPen.FromGDI(Pens.DodgerBlue), curRectangle.X, curRectangle.Y, curRectangle.Width, curRectangle.Height);
                dColor color = new dColor(Color.DodgerBlue);
                color.A = 25;
                d.FillRectangle(new dPen(color), curRectangle.X, curRectangle.Y, curRectangle.Width, curRectangle.Height);

                d.MoveCoords(-world.Viewport.X, -world.Viewport.Y);
            }
        }
Esempio n. 3
0
        public override void Update(Draw d)
        {
            int width = image.Width;
            for (int i = 0; i < blocks; i++)
                d.DrawImage(image, Left + i * (imgWidth + 1), Top, width, Height);

            if (color == BrickColor.Invisible && World.PlayMode == PlayMode.Editor)
                d.DrawRectangle(dPen.Black, Left, Top, Width, Height);
        }
Esempio n. 4
0
        public void Update(Draw d, object[] selected)
        {
            Update(d);

            d.MoveCoords(viewport.X, viewport.Y);
            dPen pen = new dPen(new dColor(Color.Black.R, Color.Black.G, Color.Black.B), dPenStyle.Dashed);

            foreach (GameObject go in AllElements)
            {
                if (Array.IndexOf<object>(selected, go) != -1)
                    d.DrawRectangle(pen, go.Left-2, go.Top-2, go.Width+3, go.Height+3);
            }
            d.MoveCoords(-viewport.X, -viewport.Y);
        }