Enum amethyst_ui::Anchor [−][src]
pub enum Anchor { TopLeft, TopMiddle, TopRight, MiddleLeft, Middle, MiddleRight, BottomLeft, BottomMiddle, BottomRight, }
Indicated where the anchor is, relative to the parent (or to the screen, if there is no parent). Follow a normal english Y,X naming.
Variants
TopLeft
Anchors the entity at the top left of the parent.
TopMiddle
Anchors the entity at the top middle of the parent.
TopRight
Anchors the entity at the top right of the parent.
MiddleLeft
Anchors the entity at the middle left of the parent.
Middle
Anchors the entity at the center of the parent.
MiddleRight
Anchors the entity at the middle right of the parent.
BottomLeft
Anchors the entity at the bottom left of the parent.
BottomMiddle
Anchors the entity at the bottom middle of the parent.
BottomRight
Anchors the entity at the bottom right of the parent.
Methods
impl Anchor
[src]
impl Anchor
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 Anchor
[src]
impl Debug for Anchor
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Anchor
[src]
impl Clone for Anchor
fn clone(&self) -> Anchor
[src]
fn clone(&self) -> Anchor
Returns 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)
Performs copy-assignment from source
. Read more
impl Eq for Anchor
[src]
impl Eq for Anchor
impl PartialEq for Anchor
[src]
impl PartialEq for Anchor