Обновлен пример: вложенность окна при нажатии на ОК.

This commit is contained in:
Alexander Zhirov 2026-01-09 03:02:55 +03:00
parent bb7d9c5889
commit 0c46949c38
Signed by: alexander
GPG key ID: C8D8BE544A27C511

View file

@ -22,8 +22,8 @@ final class Simple : ScreenBase
override void build(ScreenContext context, Window window, WidgetContainer ui) override void build(ScreenContext context, Window window, WidgetContainer ui)
{ {
auto okBtn = new Button(3, 2, "OK"); auto okBtn = new Button(3, 2, "OK", () => ScreenAction.push(new Simple()));
auto cancelBtn = new Button(3, 9, "Cancel", () => ScreenAction.quit(ScreenResult.none())); auto cancelBtn = new Button(3, 9, "Cancel", () => ScreenAction.pop(ScreenResult.none()));
_ui.add(okBtn); _ui.add(okBtn);
_ui.add(cancelBtn); _ui.add(cancelBtn);