mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.upptst
This commit is contained in:
parent
61a952f4d4
commit
0358fdb4c5
2 changed files with 14 additions and 3 deletions
|
|
@ -5,5 +5,5 @@ file
|
||||||
main.cpp;
|
main.cpp;
|
||||||
|
|
||||||
mainconfig
|
mainconfig
|
||||||
"" = "GUI";
|
"" = "GUI WAYLAND";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ INITBLOCK {
|
||||||
|
|
||||||
struct MyApp : TopWindow {
|
struct MyApp : TopWindow {
|
||||||
TimeCallback tm;
|
TimeCallback tm;
|
||||||
virtual void Paint(Draw& w) {
|
void Paint(Draw& w) override {
|
||||||
Size sz = GetSize();
|
Size sz = GetSize();
|
||||||
w.DrawRect(GetSize(), SWhite());
|
w.DrawRect(GetSize(), SWhite());
|
||||||
int y = 0;
|
int y = 0;
|
||||||
|
|
@ -24,13 +24,24 @@ struct MyApp : TopWindow {
|
||||||
DrawSmartText(w, 0, 0, sz.cx, txt);
|
DrawSmartText(w, 0, 0, sz.cx, txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LeftDown(Point p, dword keyflags) override
|
||||||
|
{
|
||||||
|
new MyApp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Close() override {
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
MyApp() {
|
MyApp() {
|
||||||
Sizeable().Zoomable();
|
Sizeable().Zoomable();
|
||||||
tm.Set(-200, [=] { Refresh(); });
|
tm.Set(-200, [=] { Refresh(); });
|
||||||
|
OpenMain();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
GUI_APP_MAIN
|
GUI_APP_MAIN
|
||||||
{
|
{
|
||||||
MyApp().Run();
|
new MyApp;
|
||||||
|
Ctrl::EventLoop();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue