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: BadgeType
Badge type, used for different badge formats
color1: BadgeColor
First color, use depends on badge type.
color2: BadgeColor
Second color, use depends on badge type.
color3: BadgeColor
Third color, use depends on badge type.
param: i32
Integer parameter to badge display, changes the shape of the badge in a different way depending on badge type.
flip: bool
Flips the badge either horizontally or vertically, depending on badge type.
Trait Implementations
impl Clone for Badge
[src]
fn clone(&self) -> Badge
[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 Eq for Badge
[src]
impl PartialEq for Badge
[src]
fn eq(&self, __arg_0: &Badge) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Badge) -> bool
[src]
This method tests for !=
.
impl Hash for Badge
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more