public Checkbox()
 {
     Size           = new Vector2(16, 16);
     checkedGraphic = new StretchingImageGraphic
     {
         Size    = Size,
         Texture = new TextureFromFile("Graphics.Resources.Checked.png")
     };
 }
Example #2
0
 public Checkbox(InterfaceManager manager)
     : base(manager)
 {
     Size = new Vector2(16, 16);
     Caption = new StretchingImageGraphic(manager.GlyphCache)
     {
         Size = Size,
         Texture = manager.DefaultCheckboxTexture
     };
     Caption.Model.Visible = false;
 }
        public ProgressBar()
        {
            Background = (BorderGraphic)InterfaceScene.DefaultSlimBorder.Clone();

            ProgressGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer { TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(100, System.Drawing.Color.Yellow)) }
            };
            Overflow = TextOverflow.Ignore;
            TextAnchor = Orientation.Center;
        }
Example #4
0
        public ProgressBar()
        {
            Background = (BorderGraphic)InterfaceScene.DefaultSlimBorder.Clone();

            ProgressGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer {
                    TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(100, System.Drawing.Color.Yellow))
                }
            };
            Overflow   = TextOverflow.Ignore;
            TextAnchor = Orientation.Center;
        }
 public Fader()
 {
     Background = new StretchingImageGraphic
     {
         Texture = new TextureConcretizer {
             TextureDescription =
                 new Graphics.Software.Textures.SingleColorTexture(System.Drawing.Color.Black)
         }
     };
     FadeLength = 1 / 2f;
     AlphaMin   = 0;
     AlphaMax   = 1;
     Updateable = true;
     Dock       = System.Windows.Forms.DockStyle.Fill;
 }
        public StoneDropDownBar()
        {
            Size       = new Vector2(243, 28);
            Padding    = new System.Windows.Forms.Padding(1, 1, 25, 1);
            Background = new ImageGraphic
            {
                SizeMode = SizeMode.AutoAdjust
            };

            if (Disabled)
            {
                NormalTexture = new TextureFromFile("Interface/Common/DropdownInactive1.png")
                {
                    DontScale = true
                }
            }
            ;
            else
            {
                NormalTexture = new TextureFromFile("Interface/Common/Dropdown1.png")
                {
                    DontScale = true
                }
            };

            HoverTexture = new TextureFromFile("Interface/Common/DropdownMouseOver1.png")
            {
                DontScale = true
            };
            ClickTexture = new TextureFromFile("Interface/Common/DropdownMouseOver1.png")
            {
                DontScale = true
            };
            Font = new Font
            {
                SystemFont = Fonts.MediumSystemFont,
                Color      = System.Drawing.Color.White
            };
            DropDownBackground = //InterfaceScene.DefaultSlimBorder;
                                 new StretchingImageGraphic
            {
                Texture = new TextureConcretizer
                {
                    TextureDescription = new global::Graphics.Software.Textures.SingleColorTexture(
                        System.Drawing.Color.FromArgb(220, 0, 0, 0))
                }
            };
        }
        public DeltaProgressBar()
            : base()
        {
            lossGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer { TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(200, System.Drawing.Color.Red)) }
            };
            gainGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer { TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(255, 0, 225, 0)) }
            };
            lossInterpolator = new Interpolator();
            gainInterpolator = new Interpolator();

            GainInterpolateTime = 1f;
            LossInterpolateTime = 0.5f;
            Updateable = true;
        }
        public DeltaProgressBar() : base()
        {
            lossGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer {
                    TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(200, System.Drawing.Color.Red))
                }
            };
            gainGraphic = new StretchingImageGraphic
            {
                Texture = new TextureConcretizer {
                    TextureDescription = new Software.Textures.SingleColorTexture(System.Drawing.Color.FromArgb(255, 0, 225, 0))
                }
            };
            lossInterpolator = new Interpolator();
            gainInterpolator = new Interpolator();

            GainInterpolateTime = 1f;
            LossInterpolateTime = 0.5f;
            Updateable          = true;
        }
 public Fader()
 {
     Background = new StretchingImageGraphic
     {
         Texture = new TextureConcretizer { TextureDescription =
             new Graphics.Software.Textures.SingleColorTexture(System.Drawing.Color.Black) }
     };
     FadeLength = 1 / 2f;
     AlphaMin = 0;
     AlphaMax = 1;
     Updateable = true;
     Dock = System.Windows.Forms.DockStyle.Fill;
 }
        public StoneDropDownBar()
        {
            Size = new Vector2(243, 28);
            Padding = new System.Windows.Forms.Padding(1, 1, 25, 1);
            Background = new ImageGraphic
            {
                SizeMode = SizeMode.AutoAdjust
            };

            if (Disabled)
                NormalTexture = new TextureFromFile("Interface/Common/DropdownInactive1.png") { DontScale = true };
            else
                NormalTexture = new TextureFromFile("Interface/Common/Dropdown1.png") { DontScale = true };

            HoverTexture = new TextureFromFile("Interface/Common/DropdownMouseOver1.png") { DontScale = true };
            ClickTexture = new TextureFromFile("Interface/Common/DropdownMouseOver1.png") { DontScale = true };
            Font = new Font
            {
                SystemFont = Fonts.MediumSystemFont,
                Color = System.Drawing.Color.White
            };
            DropDownBackground = //InterfaceScene.DefaultSlimBorder;
                new StretchingImageGraphic
                {
                    Texture = new TextureConcretizer
                    {
                        TextureDescription = new global::Graphics.Software.Textures.SingleColorTexture(
                            System.Drawing.Color.FromArgb(220, 0, 0, 0))
                    }
                };
        }
Example #11
0
 public void SetIcon(Texture texture)
 {
     if (icon != null)
         RemoveGraphic(icon);
     if (texture != null)
     {
         icon = new StretchingImageGraphic(InterfaceManager.GlyphCache) { Size = new Vector2(Size.X-2*Border, Size.Y-2*Border) };
         icon.Texture = texture;
         icon.Model.World = Matrix.Translation(new Vector3(Border, Border, -1));
         icon.Construct(InterfaceManager.Device);
         AddGraphic(icon);
     }
     else
         icon = null;
 }