Beispiel #1
0
 public PushButton(int x, int y, int w, int h, string _text)
     : base(x, y, w, h)
 {
     labelOffset = new Point(0, 0);
     label = new TextLabel(0, 0, rect.Width, rect.Height, _text, Color.Beige);
     createDisabledImage();
 }
Beispiel #2
0
 public PushButton(int x, int y, Texture2D _upImage, Texture2D _downImage, Texture2D _image)
     : base(x, y, _upImage.Width, _upImage.Height)
 {
     upImage = new ImageLabel(0, 0, _upImage);
     downImage = new ImageLabel(0, 0, _downImage);
     labelOffset = new Point((rect.Width - _image.Width) / 2, (rect.Height - _image.Height) / 2);
     label = new ImageLabel(0, 0, _image);
     createDisabledImage();
 }
Beispiel #3
0
        private ImageLabel upImage, downImage; //button texture or background

        #endregion Fields

        #region Constructors

        public PushButton(int x, int y, Texture2D _upImage, Texture2D _downImage, string _text)
            : base(x, y, _upImage.Width,_upImage.Height)
        {
            upImage = new ImageLabel(0, 0, _upImage);
            downImage = new ImageLabel(0, 0, _downImage);
            labelOffset = new Point(0, 0);
            label = new TextLabel(0, 0, rect.Width, rect.Height, _text, Color.Beige);
            createDisabledImage();
        }
Beispiel #4
0
 public void removeComponent(Component child)
 {
     children.Remove(child);
 }
Beispiel #5
0
 public void addComponent(Component child)
 {
     children.Add(child);
 }