Struct amethyst_ui::UiResize [−][src]
Whenever the window is resized the function in this component will be called on this entity's UiTransform, along with the new width and height of the window.
The function in this component is also guaranteed to be called at least once by the
ResizeSystem
when either the component is attached, or the function is changed.
Fields
function: Box<FnMut(&mut UiTransform, (f32, f32)) + Send + Sync>
The core function of this component
Methods
impl UiResize
[src]
impl UiResize
pub fn new<F>(function: F) -> Self where
F: FnMut(&mut UiTransform, (f32, f32)) + Send + Sync + 'static,
[src]
pub fn new<F>(function: F) -> Self where
F: FnMut(&mut UiTransform, (f32, f32)) + Send + Sync + 'static,
Creates a new component with the given function.
Trait Implementations
impl Component for UiResize
[src]
impl Component for UiResize
type Storage = FlaggedStorage<Self>
Associated storage type for this component.