Struct ogmo3::project::Project[][src]

pub struct Project {
Show 18 fields pub name: String, pub ogmo_version: String, pub level_paths: Vec<PathBuf>, pub background_color: String, pub grid_color: String, pub angles_radians: bool, pub directory_depth: i32, pub layer_grid_default_size: Vec2<i32>, pub level_default_size: Vec2<i32>, pub level_min_size: Vec2<i32>, pub level_max_size: Vec2<i32>, pub level_values: Vec<ValueTemplate>, pub default_export_mode: String, pub compact_export: bool, pub entity_tags: Vec<String>, pub layers: Vec<LayerTemplate>, pub entities: Vec<EntityTemplate>, pub tilesets: Vec<Tileset>,
}
Expand description

An Ogmo project.

Fields

name: String

The name of the Ogmo project.

ogmo_version: String

The version of Ogmo used to export this project.

level_paths: Vec<PathBuf>

An array of paths that hold the project’s levels.

background_color: String

The project’s background color.

grid_color: String

The color of the grid displayed in the editor.

angles_radians: bool

Whether the project describes angles in radians or degrees.

directory_depth: i32

The maximum depth that the editor will search for levels in its file tree.

layer_grid_default_size: Vec2<i32>

The default grid size for newly created layers.

level_default_size: Vec2<i32>

The default size of newly created levels in the editor.

level_min_size: Vec2<i32>

The minimum size of a level.

level_max_size: Vec2<i32>

The maximum size of a level.

level_values: Vec<ValueTemplate>

The value templates for the project’s levels.

default_export_mode: String

The default exported file type of a level.

compact_export: bool

Whether the project’s files will be exported from the editor in a compact format.

entity_tags: Vec<String>

The tags that can be attached to entities.

layers: Vec<LayerTemplate>

The project’s layer templates.

entities: Vec<EntityTemplate>

The project’s entity templates.

tilesets: Vec<Tileset>

The project’s tilesets.

Implementations

Parses an Ogmo project from a JSON string.

Errors

  • Error::Json will be returned if deserialization fails.

Parses an Ogmo project from a file.

Errors

  • Error::Io will be returned if the file cannot be read.
  • Error::Json will be returned if deserialization fails.

Writes the Ogmo project to a JSON string.

Errors

  • Error::Json will be returned if serialization fails.

Writes the Ogmo project to a pretty-printed JSON string.

Errors

  • Error::Json will be returned if serialization fails.

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

Deserialize this value from the given Serde deserializer. Read more

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)

recently added

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.