Add a display server and graphical user interface #38

Merged
apio merged 103 commits from display-server into main 2023-09-20 18:49:21 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 7631b81681 - Show all commits

View File

@ -62,7 +62,7 @@ namespace ui
int m_id;
Canvas m_canvas;
Widget* m_main_widget { nullptr };
Color m_background { ui::BLACK };
Option<Color> m_background {};
Option<int> m_old_mouse_buttons;
};
}

View File

@ -74,7 +74,7 @@ namespace ui
Result<void> Window::draw()
{
m_canvas.fill(m_background);
if (m_background.has_value()) m_canvas.fill(*m_background);
if (m_main_widget) TRY(m_main_widget->draw(m_canvas));
update();
return {};