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); }
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); }
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; }
public Label(VisualStyle defaultStyle) : base(defaultStyle) { NormalStyle = defaultStyle; }
public Button(VisualStyle normalStyle) : base(normalStyle) { NormalStyle = normalStyle; }
public ListBox(VisualStyle itemStyle) : base(null) { ItemStyle = itemStyle; Items = new List <ListBoxItem>(); }
public Label(VisualStyle defaultStyle) : base(defaultStyle) { NormalStyle = defaultStyle; }
public ListBox(VisualStyle itemStyle) : base(null) { ItemStyle = itemStyle; Items = new List<ListBoxItem>(); }
public ToggleButton(VisualStyle normalStyle) : base(normalStyle) { Clicked += OnClicked; }
public Image(VisualStyle defaultStyle) : base(defaultStyle) { NormalStyle = defaultStyle; }
public TextBox(VisualStyle defaultStyle) : base(defaultStyle) { }
public TextBox(VisualStyle defaultStyle) : base(defaultStyle) { }
public StatusBar (VisualStyle defaultStyle) : base(defaultStyle) { }
public Button(VisualStyle normalStyle) : base(normalStyle) { NormalStyle = normalStyle; }
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(); }