Ejemplo n.º 1
0
        public void Draw(RenderTarget2D target)
        {
            Game1.GraphicsGlobal.GraphicsDevice.SetRenderTarget(_contentTarget);
            Game1.GraphicsGlobal.GraphicsDevice.Clear(Color.Transparent);
            if (_type == ItemHolderTypes.basic)
            {
                Game1.SpriteBatchGlobal.Draw(Game1.Textures["PanelBackgroundLight"], position: Vector2.Zero, sourceRectangle: new Rectangle(new Point(0, 0), Boundary.Size.ToPoint()));
            }

            for (int i = 0; i < Items.Count; i++)
            {
                if (CompareF.RectangleFVsRectangleF(Boundary, Items[i].Boundary) == true)
                {
                    Items[i].Draw();
                }
            }

            Game1.GraphicsGlobal.GraphicsDevice.SetRenderTarget(target);
            Game1.SpriteBatchGlobal.Draw(_contentTarget, Boundary.Position, new Rectangle(0, 0, (int)Boundary.Size.X, (int)Boundary.Size.Y), Color.White);
            _scrollBar.Draw();

            if (_type == ItemHolderTypes.basic || _type == ItemHolderTypes.blue)
            {
                DrawRectangleBoundary.DrawBlue(Boundary.ToRectangle());
            }
            else if (_type == ItemHolderTypes.purple)
            {
                DrawRectangleBoundary.DrawPurple(Boundary.ToRectangle());
            }
        }
Ejemplo n.º 2
0
 public void Draw()
 {
     Game1.SpriteBatchGlobal.Draw(Game1.Textures["PanelBackground"], position: _position, sourceRectangle: new Rectangle(new Point(0, 0), new Point(512 + 128, 256)));
     _grabRed.Draw();
     _grabGreen.Draw();
     _grabBlue.Draw();
     _texRed.Draw();
     _texGreen.Draw();
     _texBlue.Draw();
     Game1.SpriteBatchGlobal.Draw(Game1.Textures["ColorPreviewPanel"], _position + new Vector2(256 + 128, 34) + new Vector2(64, 32));
     Game1.SpriteBatchGlobal.Draw(Game1.Textures["ColorPanelBlank"], _position + new Vector2(256 + 128, 34) + Vector2.One + new Vector2(64, 32), new Color((byte)_grabRed.GetValue(), (byte)_grabGreen.GetValue(), (byte)_grabBlue.GetValue()));
     DrawRectangleBoundary.DrawBlue(new Rectangle(_position.ToPoint(), new Point(512 + 128, 256)));
 }
Ejemplo n.º 3
0
        public void Draw()
        {
            Game1.SpriteBatchGlobal.Draw(Game1.Textures["TextBoxBack"], destinationRectangle: new Rectangle((int)_boundary.Position.X + 1, (int)_boundary.Position.Y + 1, (int)_boundary.Size.X - 2, (int)_boundary.Size.Y - 2));
            btnDrop.Draw();

            DrawRectangleBoundary.DrawBlue(_boundary.ToRectangle());

            DrawString.DrawText(names[SelectedIndex], _boundary.Position + new Vector2(8, 7), Align.left, Globals.LightBlueText, FontType.small);

            if (Droped)
            {
                foreach (Button btn in Selections)
                {
                    btn.Draw();
                }
            }
        }
Ejemplo n.º 4
0
        public void Draw()
        {
            Game1.SpriteBatchGlobal.Draw(Game1.Textures["TextBoxBack"], destinationRectangle: new Rectangle((int)_boundary.Position.X + 1, (int)_boundary.Position.Y + 1, (int)_boundary.Size.X - 2, (int)_boundary.Size.Y - 2));

            DrawRectangleBoundary.DrawBlue(_boundary.ToRectangle());
            if (Valid)
            {
                DrawString.DrawText(Text.Substring(_offset, Math.Min(Text.Length - _offset, (int)((_boundary.Size.X - 16) / 16))), _boundary.Position + new Vector2(8, 7), Align.left, Globals.LightBlueText, FontType.small);
            }
            else
            {
                Game1.SpriteBatchGlobal.Draw(Game1.Textures["NotParsed"], destinationRectangle: new Rectangle((int)_boundary.Position.X + 1, (int)_boundary.Position.Y + 1, (int)_boundary.Size.X - 2, 30));
                DrawString.DrawText(Text.Substring(_offset, Math.Min(Text.Length - _offset, (int)((_boundary.Size.X - 16) / 16))), _boundary.Position + new Vector2(8, 7), Align.left, Globals.LightRedish, FontType.small);
            }
            if (_cursorVisible == true && IsActive)
            {
                Game1.SpriteBatchGlobal.Draw(Game1.Textures["EditSymbol"], _boundary.Position + new Vector2(8 + 16 * _cursor - 3, 7), Color.Black);
            }
        }