Exemple #1
0
        public Control(VisualStyle defaultStyle)
        {
            HorizontalAlignment = HorizontalAlignment.Centre;
            VerticalAlignment   = VerticalAlignment.Centre;

            if (defaultStyle != null && defaultStyle.TextureRegion != null)
            {
                Width  = defaultStyle.TextureRegion.Width;
                Height = defaultStyle.TextureRegion.Height;
            }

            Margin = new Margin(4);
        }
Exemple #2
0
		public Control(VisualStyle defaultStyle)
		{
            HorizontalAlignment = HorizontalAlignment.Centre;
            VerticalAlignment = VerticalAlignment.Centre;

            if(defaultStyle != null && defaultStyle.TextureRegion != null)
            {
                Width = defaultStyle.TextureRegion.Width;
                Height = defaultStyle.TextureRegion.Height;
            }

            Margin = new Margin(4);
		}
Exemple #3
0
        private static Control CreateControl(ITextureRegion textureRegion)
        {
            var normalStyle = new VisualStyle(textureRegion)
            {
                Colour = Color.LightGray
            };

            var button = new Button(normalStyle)
            {
                HoverStyle = new VisualStyle(textureRegion) { Colour = Color.White },
                Width = 64,
                Height = 64
            };
            return button;
        }
Exemple #4
0
 public Label(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     NormalStyle = defaultStyle;
 }
Exemple #5
0
 public Button(VisualStyle normalStyle)
     : base(normalStyle)
 {
     NormalStyle = normalStyle;
 }
Exemple #6
0
 public ListBox(VisualStyle itemStyle)
     : base(null)
 {
     ItemStyle = itemStyle;
     Items     = new List <ListBoxItem>();
 }
Exemple #7
0
 public Label(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     NormalStyle = defaultStyle;
 }
Exemple #8
0
 public ListBox(VisualStyle itemStyle)
     : base(null)
 {
     ItemStyle = itemStyle;
     Items = new List<ListBoxItem>();
 }
Exemple #9
0
 public ToggleButton(VisualStyle normalStyle)
     : base(normalStyle)
 {
     Clicked += OnClicked;
 }
Exemple #10
0
 public Image(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     NormalStyle = defaultStyle;
 }
Exemple #11
0
 public TextBox(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
 }
 public TextBox(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
 }
Exemple #13
0
		public StatusBar (VisualStyle defaultStyle)
            : base(defaultStyle)
		{
		}
Exemple #14
0
 public Button(VisualStyle normalStyle)
     : base(normalStyle)
 {
     NormalStyle = normalStyle;
 }
Exemple #15
0
 public Image(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     NormalStyle = defaultStyle;
 }
 public ToggleButton(VisualStyle normalStyle)
     : base(normalStyle)
 {
     Clicked += OnClicked;
 }
 public StatusBar(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
 }
 public TextControl(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     TextStyle = new TextStyle();
 }
 public TextControl(VisualStyle defaultStyle)
     : base(defaultStyle)
 {
     TextStyle = new TextStyle();
 }