Luna/apps/gclient.cpp

22 lines
533 B
C++
Raw Normal View History

#include <ui/App.h>
2023-08-14 18:15:38 +02:00
2023-08-07 22:45:00 +02:00
Result<int> luna_main(int argc, char** argv)
{
ui::App app;
TRY(app.init(argc, argv));
auto* window = TRY(ui::Window::create(ui::Rect { 200, 200, 400, 300 }));
app.set_main_window(window);
window->set_title("Main Window");
window->canvas().fill(ui::CYAN);
window->update();
2023-08-07 22:45:00 +02:00
auto* dialog = TRY(ui::Window::create(ui::Rect { 400, 400, 200, 150 }));
dialog->set_title("Error: Unknown Error");
dialog->canvas().fill(ui::RED);
dialog->update();
return app.run();
2023-08-07 22:45:00 +02:00
}