Skip to main content
← PSoXide SDK guides and examples · SDK 80d1c329e977 · All Cargo features enabled; check feature gates before use.

Tail

Enum Tail 

Source
pub enum Tail {
    None,
    Dots(u8),
    Spinner {
        lit: Rgb,
        unlit: Rgb,
    },
    Art {
        width: i16,
        height: i16,
        frames: u8,
        draw: fn(&mut dyn Sink, i16, i16, u8),
    },
}
Expand description

What follows the label and moves.

Variants§

§

None

Nothing: the label alone, breathing if the ink does.

§

Dots(u8)

Up to this many dots after the label (Loading, Loading., Loading.., …). The box has room for all of them, so the label does not slide as they step.

§

Spinner

A ring of twelve lights chasing each other round a square: the head burns at lit, a tail fades behind it, and every other light shows unlit. The ring is square on the display, whatever the pixel aspect of the mode (see Style::with_display), and its lights are drawn with the style’s Blend.

Fields

§lit: Rgb

The head light at full strength.

§unlit: Rgb

A light with no head near it, dim enough that the ring still reads as a ring.

§

Art

Animation the game draws itself, in a box of width x height pixels (the widget is as big as that plus its padding). draw(sink, x, y, frame) paints frame frame (0..frames) with its top-left at (x, y), using rect or any GP0 packet; the box is already filled with the style’s ground.

Fields

§width: i16

Width of the art in pixels.

§height: i16

Height of the art in pixels.

§frames: u8

Frames before it repeats.

§draw: fn(&mut dyn Sink, i16, i16, u8)

Draws one frame.

Trait Implementations§

Source§

impl Clone for Tail

Source§

fn clone(&self) -> Tail

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Tail

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for Tail

Auto Trait Implementations§

§

impl Freeze for Tail

§

impl RefUnwindSafe for Tail

§

impl Send for Tail

§

impl Sync for Tail

§

impl Unpin for Tail

§

impl UnsafeUnpin for Tail

§

impl UnwindSafe for Tail

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.