pub struct MinimapIcon {
pub icon_type: i32,
pub x: i32,
pub y: i32,
pub color: [u8; 4],
}Expand description
Single minimap icon entry.
Fields§
§icon_type: i320 = gold mine, 1 = house/neutral building, 2 = player start.
x: i32Pixel X on the 256×256 minimap texture (origin top-left).
y: i32Pixel Y on the 256×256 minimap texture (origin top-left).
color: [u8; 4]Color as RGBA (converted from the file’s BGRA order).
Implementations§
Source§impl MinimapIcon
impl MinimapIcon
Sourcepub fn kind(&self) -> MinimapIconType
pub fn kind(&self) -> MinimapIconType
Typed view of icon_type.
Trait Implementations§
Source§impl Clone for MinimapIcon
impl Clone for MinimapIcon
Source§fn clone(&self) -> MinimapIcon
fn clone(&self) -> MinimapIcon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MinimapIcon
impl Debug for MinimapIcon
Source§impl<'de> Deserialize<'de> for MinimapIcon
impl<'de> Deserialize<'de> for MinimapIcon
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for MinimapIcon
impl RefUnwindSafe for MinimapIcon
impl Send for MinimapIcon
impl Sync for MinimapIcon
impl Unpin for MinimapIcon
impl UnsafeUnpin for MinimapIcon
impl UnwindSafe for MinimapIcon
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more