pub enum Anchor {
Center,
TopLeft,
Top,
TopRight,
Left,
Right,
BottomLeft,
Bottom,
BottomRight,
Fill,
}Expand description
Where a screen’s content sits in the GUI.
Variants§
Center
TopLeft
Top
TopRight
Left
Right
BottomLeft
Bottom
BottomRight
Fill
Stretched over the whole GUI.
Implementations§
Source§impl Anchor
impl Anchor
Sourcepub fn place(self, sw: f32, sh: f32, w: f32, h: f32) -> (f32, f32)
pub fn place(self, sw: f32, sh: f32, w: f32, h: f32) -> (f32, f32)
Top-left corner of a w × h box anchored in a sw × sh GUI —
as the game places its screens: a box bigger than the GUI keeps its
size and is cut at the edges (evenly when centred), and a
container’s picture stays over its real slots (the game’s
whole-pixel (width - backgroundWidth) / 2).
Trait Implementations§
impl Copy for Anchor
impl Eq for Anchor
impl StructuralPartialEq for Anchor
Auto Trait Implementations§
impl Freeze for Anchor
impl RefUnwindSafe for Anchor
impl Send for Anchor
impl Sync for Anchor
impl Unpin for Anchor
impl UnsafeUnpin for Anchor
impl UnwindSafe for Anchor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more