Improve the utility print_key_press

This commit is contained in:
ArthurSonzogni 2020-05-20 20:50:40 +02:00
parent e1a71d5b9f
commit 985cb35ffb

View File

@ -30,7 +30,7 @@ class DrawKey : public Component {
code += L"(special)";
children.push_back(text(code));
}
return vbox(std::move(children));
return window(text(L"keys"), vbox(std::move(children)));
}
bool OnEvent(Event event) override {
@ -43,7 +43,7 @@ class DrawKey : public Component {
};
int main(int argc, const char* argv[]) {
auto screen = ScreenInteractive::FixedSize(80, 10);
auto screen = ScreenInteractive::TerminalOutput();
DrawKey draw_key;
screen.Loop(&draw_key);
}