Struct screeps_api::data::users::Badge [] [src]

pub struct Badge {
    pub badge_type: BadgeType,
    pub color1: BadgeColor,
    pub color2: BadgeColor,
    pub color3: BadgeColor,
    pub param: i32,
    pub flip: bool,
}

Description of a user badge, contains information on how that badge should be drawn/colored.

Badges can be rendered as SVG by first filling the entire image with color1, filling the first path (defined by badge type) with color2, filling the second path with color3, and then cutting off corners to make the badge a round circle.

Fields

Badge type, used for different badge formats

First color, use depends on badge type.

Second color, use depends on badge type.

Third color, use depends on badge type.

Integer parameter to badge display, changes the shape of the badge in a different way depending on badge type.

Flips the badge either horizontally or vertically, depending on badge type.

Trait Implementations

impl Clone for Badge
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Badge
[src]

impl PartialEq for Badge
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Hash for Badge
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Badge
[src]

[src]

Formats the value using the given formatter.