Add parsing for Size.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
[Button]
|
||||
BackgroundColor = "#0f62fe"
|
||||
TextColor = "#ffffff"
|
||||
# Padding = [0.0, 12.0, 8.0, 0.0]
|
||||
Padding = 16.0
|
||||
|
||||
# Creates an empty rule for Button.Normal.
|
||||
@@ -40,6 +41,24 @@ BackgroundColor = "#0353e9"
|
||||
BackgroundColor = "#002d9c"
|
||||
BorderColor = [0, 0, 0, 0]
|
||||
|
||||
[Button.Link]
|
||||
BackgroundColor = [0, 0, 0, 0]
|
||||
TextColor = "#0f62fe"
|
||||
Padding = 0.0
|
||||
|
||||
[Button.Link.Normal]
|
||||
|
||||
[Button.Link.Hovered]
|
||||
BorderColor = "#0043ce"
|
||||
TextColor = "#0043ce"
|
||||
BorderSize = [0, 0, 0, 1]
|
||||
|
||||
[Button.Link.Pressed]
|
||||
TextColor = "#161616"
|
||||
BorderSize = [0, 0, 0, 1]
|
||||
BorderColor = "#161616"
|
||||
|
||||
|
||||
# Default background color for all Container derived classes.
|
||||
[Container]
|
||||
BackgroundColor = "#e0e0e0"
|
||||
|
||||
@@ -22,6 +22,8 @@ public class TestGame : Game
|
||||
_uiSystem = new UISystem(Input);
|
||||
// _uiSystem.RenderDebugRects = true;
|
||||
|
||||
ResourceManager.EnableFileWatching();
|
||||
|
||||
_particleSystem = new ParticleSystem();
|
||||
|
||||
AddSystemToUpdate(_uiSystem);
|
||||
@@ -80,8 +82,9 @@ public class TestGame : Game
|
||||
var outlineButton = new Button("Outline button", _defaultFontSet);
|
||||
outlineButton.StyleVariant = "Outline";
|
||||
|
||||
_buttonContainer.AddChild(addButton);
|
||||
_buttonContainer.AddChild(removeButton);
|
||||
var linkButton = new Button("Link button", _defaultFontSet);
|
||||
linkButton.StyleVariant = "Link";
|
||||
|
||||
|
||||
var c = new HorizontalContainer()
|
||||
{
|
||||
@@ -93,6 +96,7 @@ public class TestGame : Game
|
||||
c.AddChild(addButton);
|
||||
c.AddChild(removeButton);
|
||||
c.AddChild(outlineButton);
|
||||
c.AddChild(linkButton);
|
||||
|
||||
var vc = new VerticalContainer(0.0f);
|
||||
vc.AddChild(c);
|
||||
|
||||
Reference in New Issue
Block a user