This commit is contained in:
Mirek Fidler 2025-02-24 11:10:42 +01:00
parent 61a952f4d4
commit 0358fdb4c5
2 changed files with 14 additions and 3 deletions

View file

@ -5,5 +5,5 @@ file
main.cpp;
mainconfig
"" = "GUI";
"" = "GUI WAYLAND";

View file

@ -8,7 +8,7 @@ INITBLOCK {
struct MyApp : TopWindow {
TimeCallback tm;
virtual void Paint(Draw& w) {
void Paint(Draw& w) override {
Size sz = GetSize();
w.DrawRect(GetSize(), SWhite());
int y = 0;
@ -24,13 +24,24 @@ struct MyApp : TopWindow {
DrawSmartText(w, 0, 0, sz.cx, txt);
}
void LeftDown(Point p, dword keyflags) override
{
new MyApp;
}
void Close() override {
delete this;
}
MyApp() {
Sizeable().Zoomable();
tm.Set(-200, [=] { Refresh(); });
OpenMain();
}
};
GUI_APP_MAIN
{
MyApp().Run();
new MyApp;
Ctrl::EventLoop();
}