Exemple #1
0
        public override void Start()
        {
            if (_borderZone == Rectangle.Empty)
            {
                _borderZone = new Rectangle(Screen.VirtualWidthPerTwo, 10, Screen.VirtualWidthPerTwo, Screen.VirtualHeight - Screen.VirtualHeight / 3);
            }

            if (_borderTexture == null)
            {
                _borderTexture = TextureFactory.CreateBorder(new Color(0.3f, 0.3f, 0.3f, 0.6f), Color.Transparent, _borderZone.Width, _borderZone.Height, 2);
            }
        }
Exemple #2
0
        public void LoadContent(ContentManager content)
        {
            Box = TextureFactory.CreateBorder(Color.White, new Color(0.08f, 0.12f, 0.16f, 0.7f), 128, 128, 1);

            Border = TextureFactory.CreateBorder(Color.White, new Color(0.08f, 0.12f, 0.16f, 0.7f), 128, 128, 1);

            Buttons[0] = TextureFactory.CreateBorder(Color.White, new Color(0.08f, 0.12f, 0.16f, 0.7f), 128, 48, 1);
            Buttons[1] = TextureFactory.CreateBorder(Color.WhiteSmoke, new Color(0.16f, 0.19f, 0.23f, 0.7f), 128, 48, 1);
            Buttons[2] = TextureFactory.CreateBorder(Color.LightGray, new Color(0.19f, 0.23f, 0.27f, 0.7f), 128, 48, 1);

            Checkbox[0] = TextureFactory.CreateBorder(Color.White, new Color(0.08f, 0.12f, 0.16f, 0.7f), 48, 48, 2);
            Checkbox[1] = TextureFactory.CreateColor(Color.DarkGray, 1, 1);
            Checkbox[2] = TextureFactory.CreateColor(Color.White, 1, 1);

            Sliders[0] = TextureFactory.CreateColor(new Color(0.08f, 0.12f, 0.16f, 0.7f), 1, 1);
            Sliders[1] = TextureFactory.CreateGradiant(Color.LightBlue, Color.CadetBlue, 16, 16);

            if (!string.IsNullOrEmpty(_fontName))
            {
                Font = content.Load <SpriteFont>(_fontName);
            }
        }