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.
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.
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 Project
impl UnwindSafe for Project
Blanket Implementations
Mutably borrows from an owned value. Read more