Доблен эксперементальный новый модуль - виджет TextInput.
This commit is contained in:
parent
2a8362d098
commit
79032d696e
7 changed files with 280 additions and 11 deletions
|
|
@ -22,7 +22,12 @@ final class Simple : ScreenBase
|
|||
|
||||
override void build(ScreenContext context, Window window, WidgetContainer ui)
|
||||
{
|
||||
auto okBtn = new Button(3, 2, "OK", () => ScreenAction.push(new Simple()));
|
||||
auto textIntput = new TextInput(5, 2, 10, "Hello");
|
||||
// auto okBtn = new Button(3, 2, "OK", () => ScreenAction.push(new Simple()));
|
||||
auto okBtn = new Button(3, 2, "OK", () {
|
||||
textIntput.close();
|
||||
return ScreenAction.quit(ScreenResult.none());
|
||||
});
|
||||
auto cancelBtn = new Button(3, 9, "Cancel", () => ScreenAction.pop(ScreenResult.none()));
|
||||
|
||||
auto disableOk = new Checkbox(4, 2,"Disable OK", false, (checked) {
|
||||
|
|
@ -32,6 +37,7 @@ final class Simple : ScreenBase
|
|||
_ui.add(okBtn);
|
||||
_ui.add(cancelBtn);
|
||||
_ui.add(disableOk);
|
||||
_ui.add(textIntput);
|
||||
}
|
||||
|
||||
override ScreenAction handleGlobal(ScreenContext context, KeyEvent event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue