Trait pixel_game_lib::gui::Widget
source · pub trait Widget {
// Required methods
fn update_layout(&mut self, location: Vec2<f64>, size: Extent2<f64>);
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
}
Expand description
Allow calling function on widgets in a simple way.
Required Methods§
sourcefn update_layout(&mut self, location: Vec2<f64>, size: Extent2<f64>)
fn update_layout(&mut self, location: Vec2<f64>, size: Extent2<f64>)
Update the widget layout position, defines how it must be drawn.
sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Convert to mutable Any
so we can convert it back to the original type.