Struct yy_typings::sprite_yy::NineSlice [−][src]
pub struct NineSlice {
pub left: u64,
pub top: u64,
pub right: u64,
pub bottom: u64,
pub guide_colour: [GmEncodedColor; 4],
pub highlight_colour: GmEncodedColor,
pub highlight_style: HighlightStyle,
pub enabled: bool,
pub tile_mode: [TileMode; 5],
pub resource_version: ResourceVersion,
pub loaded_version: Value,
pub resource_type: ConstGmNineSliceData,
}
Fields
left: u64
The left bound.
top: u64
The top bound.
right: u64
The right bound.
bottom: u64
The bottom bound.
guide_colour: [GmEncodedColor; 4]
The guide color for each bound, listed in this order: 0: Left 1: Top 2: Right 3: Bottom
highlight_colour: GmEncodedColor
The highlight color to use for the highlighted segment. Why in the world is this user configurable? But it is!
highlight_style: HighlightStyle
The style of the highlight.
enabled: bool
Whether nine-slicing is enabled. This data structure as a whole
may be set to null
, or be defined but disabled. This allows the user
to toggle nine-slicing on and off.
tile_mode: [TileMode; 5]
This is an array of 5 tile mode sprites. I am leaving this typed as a raw array right now, rather than writing a custom serde impl, due to time constraints. In the future, I will make this into a nice struct. The following are each index: 0: Left 1: Top, 2: Right 3: Bottom 4: Center
resource_version: ResourceVersion
Version string. Right now, this is loosely typed and ignored, but will be used in the future to aid in parsing.
loaded_version: Value
This appears to always be null
? Unknown what it refers to.
resource_type: ConstGmNineSliceData
A constant, always “GMNineSliceData”
Trait Implementations
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 RefUnwindSafe for NineSlice
impl UnwindSafe for NineSlice
Blanket Implementations
Mutably borrows from an owned value. Read more