Struct amethyst_ui::UiTransform
[−]
[src]
pub struct UiTransform { pub id: String, pub x: f32, pub y: f32, pub z: f32, pub width: f32, pub height: f32, pub tab_order: i32, // some fields omitted }
The raw pixels on screen that are populated.
TODO: Eventually this should be either replaced by a citrine type, or citrine may just populate it.
Fields
id: String
An identifier. Serves no purpose other than to help you distinguish between UI elements.
x: f32
X coordinate, 0 is the left edge, while the width of the screen is the right edge.
y: f32
Y coordinate, 0 is the top edge, while the height of the screen is the bottom edge.
z: f32
Z order, entities with a lower Z order will be rendered on top of entities with a higher Z order.
width: f32
The width of this UI element
height: f32
The height of this UI element
tab_order: i32
The UI element tab order. When the player presses tab the UI focus will shift to the UI element with the next highest tab order, or if another element with the same tab_order as this one exists they are ordered according to Entity creation order. Shift-tab walks this ordering backwards.
Methods
impl UiTransform
[src]
fn new(
id: String,
x: f32,
y: f32,
z: f32,
width: f32,
height: f32,
tab_order: i32
) -> UiTransform
[src]
id: String,
x: f32,
y: f32,
z: f32,
width: f32,
height: f32,
tab_order: i32
) -> UiTransform
Creates a new UiTransform
Trait Implementations
impl Clone for UiTransform
[src]
fn clone(&self) -> UiTransform
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for UiTransform
[src]
impl Component for UiTransform
[src]
type Storage = FlaggedStorage<Self, DenseVecStorage<Self>>
Associated storage type for this component.