use galaxyui::elements::Rect; use galaxyui::{AppContext, Element, Entity, TypedActionView, View}; use pathfinder_color::ColorU; pub struct RootView {} // Implement the entity trait. impl Entity for RootView { type Event = (); } // Implement the view trait so RootView could be considered as a view. impl View for RootView { fn ui_name() -> &'static str { "RootView" } // Let's render a simple black rect background. fn render(&self, _: &AppContext) -> Box { Rect::new().with_background_color(ColorU::black()).finish() } } impl TypedActionView for RootView { type Action = (); }