Macro oxygengine_user_interface::raui::core::make_widget [−][src]
macro_rules! make_widget {
($type_id : path) => { ... };
}
Expand description
Helper to manually create a WidgetComponent
struct from a function.
Users will not usually need this macro, but it can be useful in some advanced cases or where you
don’t want to use the widget
macro.
Example
let component: WidgetComponent = make_widget!(my_component);
fn my_component(context: WidgetContext) -> WidgetNode {
todo!("Make an awesome widget")
}