Struct amethyst_ui::Anchored [−][src]
pub struct Anchored { /* fields omitted */ }Component indicating that the position of this entity should be relative to the parent's position.
Methods
impl Anchored[src]
impl Anchoredpub fn new(anchor: Anchor) -> Self[src]
pub fn new(anchor: Anchor) -> SelfCreates a new Anchored component using the Anchor setting.
pub fn norm_offset(&self) -> (f32, f32)[src]
pub fn norm_offset(&self) -> (f32, f32)Returns the normalized offset using the Anchor setting.
The normalized offset is a [-0.5,0.5] value
indicating the relative offset from the parent's position (centered).
Trait Implementations
impl Debug for Anchored[src]
impl Debug for Anchoredfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Anchored[src]
impl Clone for Anchoredfn clone(&self) -> Anchored[src]
fn clone(&self) -> AnchoredReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Component for Anchored[src]
impl Component for Anchoredtype Storage = VecStorage<Self>
Associated storage type for this component.