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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.