Input fields and refactors required to support them

This commit is contained in:
2026-05-31 22:14:25 +02:00
parent b506b78c32
commit c7acc70dcd
12 changed files with 431 additions and 61 deletions

View File

@@ -73,7 +73,7 @@ public class TestGame : Game
_uiSystem.SetStyleSheet(_styleSheet);
var addButton = new Button("Default button", _defaultFontSet);
var addButton = new Button("", _defaultFontSet);
var removeButton = new Button("Danger button", _defaultFontSet);
@@ -93,10 +93,16 @@ public class TestGame : Game
Anchor = Anchor.TopCenter
};
var inputField = new InputField(string.Empty, _defaultFontSet)
{
PlaceholderText = "Hello, World!"
};
c.AddChild(addButton);
c.AddChild(removeButton);
c.AddChild(outlineButton);
c.AddChild(linkButton);
c.AddChild(inputField);
var vc = new VerticalContainer(0.0f);
vc.AddChild(c);