Luna/apps/gclient.cpp

22 lines
533 B
C++

#include <ui/App.h>
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();
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();
}