diff --git a/docs/quicktype/LdtkJson.cpp b/docs/quicktype/LdtkJson.cpp index 25e3e0268..181f40ef3 100644 --- a/docs/quicktype/LdtkJson.cpp +++ b/docs/quicktype/LdtkJson.cpp @@ -69,7 +69,7 @@ namespace quicktype { */ enum class EditorDisplayPos : int { ABOVE, BENEATH, CENTER }; - enum class TextLangageMode : int { LANG_C, LANG_HAXE, LANG_JS, LANG_JSON, LANG_LUA, LANG_MARKDOWN, LANG_PYTHON, LANG_RUBY, LANG_XML }; + enum class TextLanguageMode : int { LANG_C, LANG_HAXE, LANG_JS, LANG_JSON, LANG_LUA, LANG_MARKDOWN, LANG_PYTHON, LANG_RUBY, LANG_XML }; /** * This section is mostly only intended for the LDtk editor app itself. You can safely @@ -96,7 +96,7 @@ namespace quicktype { std::shared_ptr max; std::shared_ptr min; std::shared_ptr regex; - std::shared_ptr text_langage_mode; + std::shared_ptr text_language_mode; nlohmann::json field_definition_type; int64_t uid; @@ -203,8 +203,8 @@ namespace quicktype { * Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`, * `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` */ - std::shared_ptr get_text_langage_mode() const { return text_langage_mode; } - void set_text_langage_mode(std::shared_ptr value) { this->text_langage_mode = value; } + std::shared_ptr get_text_language_mode() const { return text_language_mode; } + void set_text_language_mode(std::shared_ptr value) { this->text_language_mode = value; } /** * Internal type enum @@ -1074,12 +1074,15 @@ namespace quicktype { public: /** - * All entities, including their custom fields + * All entities definitions, including their custom fields */ const std::vector & get_entities() const { return entities; } std::vector & get_mutable_entities() { return entities; } void set_entities(const std::vector & value) { this->entities = value; } + /** + * All internal enums + */ const std::vector & get_enums() const { return enums; } std::vector & get_mutable_enums() { return enums; } void set_enums(const std::vector & value) { this->enums = value; } @@ -1092,17 +1095,23 @@ namespace quicktype { std::vector & get_mutable_external_enums() { return external_enums; } void set_external_enums(const std::vector & value) { this->external_enums = value; } + /** + * All layer definitions + */ const std::vector & get_layers() const { return layers; } std::vector & get_mutable_layers() { return layers; } void set_layers(const std::vector & value) { this->layers = value; } /** - * An array containing all custom fields available to all levels. + * All custom fields available to all levels. */ const std::vector & get_level_fields() const { return level_fields; } std::vector & get_mutable_level_fields() { return level_fields; } void set_level_fields(const std::vector & value) { this->level_fields = value; } + /** + * All tilesets + */ const std::vector & get_tilesets() const { return tilesets; } std::vector & get_mutable_tilesets() { return tilesets; } void set_tilesets(const std::vector & value) { this->tilesets = value; } @@ -1110,6 +1119,12 @@ namespace quicktype { enum class Flag : int { DISCARD_PRE_CSV_INT_GRID, IGNORE_BACKUP_SUGGEST }; + /** + * "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + * `OneImagePerLevel` + */ + enum class ImageExportMode : int { NONE, ONE_IMAGE_PER_LAYER, ONE_IMAGE_PER_LEVEL }; + /** * Level background image position info */ @@ -1795,7 +1810,7 @@ namespace quicktype { * This file is a JSON schema of files created by LDtk level editor (https://ldtk.io). * * This is the root of any Project JSON file. It contains: - the project settings, - an - * array of levels, - and a definition object (that can probably be safely ignored for most + * array of levels, - a group of definitions (that can probably be safely ignored for most * users). */ class LdtkJson { @@ -1814,10 +1829,11 @@ namespace quicktype { double default_pivot_x; double default_pivot_y; Definitions defs; - bool export_png; + std::shared_ptr export_png; bool export_tiled; bool external_levels; std::vector flags; + ImageExportMode image_export_mode; std::string json_version; std::string level_name_pattern; std::vector levels; @@ -1900,12 +1916,11 @@ namespace quicktype { void set_defs(const Definitions & value) { this->defs = value; } /** - * If TRUE, all layers in all levels will also be exported as PNG along with the project - * file (default is FALSE) + * **WARNING**: this deprecated value is no longer exported since version 0.9.3 Replaced + * by: `imageExportMode` */ - const bool & get_export_png() const { return export_png; } - bool & get_mutable_export_png() { return export_png; } - void set_export_png(const bool & value) { this->export_png = value; } + std::shared_ptr get_export_png() const { return export_png; } + void set_export_png(std::shared_ptr value) { this->export_png = value; } /** * If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file @@ -1931,6 +1946,14 @@ namespace quicktype { std::vector & get_mutable_flags() { return flags; } void set_flags(const std::vector & value) { this->flags = value; } + /** + * "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + * `OneImagePerLevel` + */ + const ImageExportMode & get_image_export_mode() const { return image_export_mode; } + ImageExportMode & get_mutable_image_export_mode() { return image_export_mode; } + void set_image_export_mode(const ImageExportMode & value) { this->image_export_mode = value; } + /** * File format version */ @@ -2066,8 +2089,8 @@ namespace nlohmann { void from_json(const json & j, quicktype::EditorDisplayPos & x); void to_json(json & j, const quicktype::EditorDisplayPos & x); - void from_json(const json & j, quicktype::TextLangageMode & x); - void to_json(json & j, const quicktype::TextLangageMode & x); + void from_json(const json & j, quicktype::TextLanguageMode & x); + void to_json(json & j, const quicktype::TextLanguageMode & x); void from_json(const json & j, quicktype::LimitBehavior & x); void to_json(json & j, const quicktype::LimitBehavior & x); @@ -2093,6 +2116,9 @@ namespace nlohmann { void from_json(const json & j, quicktype::Flag & x); void to_json(json & j, const quicktype::Flag & x); + void from_json(const json & j, quicktype::ImageExportMode & x); + void to_json(json & j, const quicktype::ImageExportMode & x); + void from_json(const json & j, quicktype::BgPos & x); void to_json(json & j, const quicktype::BgPos & x); @@ -2115,7 +2141,7 @@ namespace nlohmann { x.set_max(quicktype::get_optional(j, "max")); x.set_min(quicktype::get_optional(j, "min")); x.set_regex(quicktype::get_optional(j, "regex")); - x.set_text_langage_mode(quicktype::get_optional(j, "textLangageMode")); + x.set_text_language_mode(quicktype::get_optional(j, "textLanguageMode")); x.set_field_definition_type(quicktype::get_untyped(j, "type")); x.set_uid(j.at("uid").get()); } @@ -2137,7 +2163,7 @@ namespace nlohmann { j["max"] = x.get_max(); j["min"] = x.get_min(); j["regex"] = x.get_regex(); - j["textLangageMode"] = x.get_text_langage_mode(); + j["textLanguageMode"] = x.get_text_language_mode(); j["type"] = x.get_field_definition_type(); j["uid"] = x.get_uid(); } @@ -2617,10 +2643,11 @@ namespace nlohmann { x.set_default_pivot_x(j.at("defaultPivotX").get()); x.set_default_pivot_y(j.at("defaultPivotY").get()); x.set_defs(j.at("defs").get()); - x.set_export_png(j.at("exportPng").get()); + x.set_export_png(quicktype::get_optional(j, "exportPng")); x.set_export_tiled(j.at("exportTiled").get()); x.set_external_levels(j.at("externalLevels").get()); x.set_flags(j.at("flags").get>()); + x.set_image_export_mode(j.at("imageExportMode").get()); x.set_json_version(j.at("jsonVersion").get()); x.set_level_name_pattern(j.at("levelNamePattern").get()); x.set_levels(j.at("levels").get>()); @@ -2648,6 +2675,7 @@ namespace nlohmann { j["exportTiled"] = x.get_export_tiled(); j["externalLevels"] = x.get_external_levels(); j["flags"] = x.get_flags(); + j["imageExportMode"] = x.get_image_export_mode(); j["jsonVersion"] = x.get_json_version(); j["levelNamePattern"] = x.get_level_name_pattern(); j["levels"] = x.get_levels(); @@ -2705,30 +2733,30 @@ namespace nlohmann { } } - inline void from_json(const json & j, quicktype::TextLangageMode & x) { - if (j == "LangC") x = quicktype::TextLangageMode::LANG_C; - else if (j == "LangHaxe") x = quicktype::TextLangageMode::LANG_HAXE; - else if (j == "LangJS") x = quicktype::TextLangageMode::LANG_JS; - else if (j == "LangJson") x = quicktype::TextLangageMode::LANG_JSON; - else if (j == "LangLua") x = quicktype::TextLangageMode::LANG_LUA; - else if (j == "LangMarkdown") x = quicktype::TextLangageMode::LANG_MARKDOWN; - else if (j == "LangPython") x = quicktype::TextLangageMode::LANG_PYTHON; - else if (j == "LangRuby") x = quicktype::TextLangageMode::LANG_RUBY; - else if (j == "LangXml") x = quicktype::TextLangageMode::LANG_XML; + inline void from_json(const json & j, quicktype::TextLanguageMode & x) { + if (j == "LangC") x = quicktype::TextLanguageMode::LANG_C; + else if (j == "LangHaxe") x = quicktype::TextLanguageMode::LANG_HAXE; + else if (j == "LangJS") x = quicktype::TextLanguageMode::LANG_JS; + else if (j == "LangJson") x = quicktype::TextLanguageMode::LANG_JSON; + else if (j == "LangLua") x = quicktype::TextLanguageMode::LANG_LUA; + else if (j == "LangMarkdown") x = quicktype::TextLanguageMode::LANG_MARKDOWN; + else if (j == "LangPython") x = quicktype::TextLanguageMode::LANG_PYTHON; + else if (j == "LangRuby") x = quicktype::TextLanguageMode::LANG_RUBY; + else if (j == "LangXml") x = quicktype::TextLanguageMode::LANG_XML; else throw "Input JSON does not conform to schema"; } - inline void to_json(json & j, const quicktype::TextLangageMode & x) { + inline void to_json(json & j, const quicktype::TextLanguageMode & x) { switch (x) { - case quicktype::TextLangageMode::LANG_C: j = "LangC"; break; - case quicktype::TextLangageMode::LANG_HAXE: j = "LangHaxe"; break; - case quicktype::TextLangageMode::LANG_JS: j = "LangJS"; break; - case quicktype::TextLangageMode::LANG_JSON: j = "LangJson"; break; - case quicktype::TextLangageMode::LANG_LUA: j = "LangLua"; break; - case quicktype::TextLangageMode::LANG_MARKDOWN: j = "LangMarkdown"; break; - case quicktype::TextLangageMode::LANG_PYTHON: j = "LangPython"; break; - case quicktype::TextLangageMode::LANG_RUBY: j = "LangRuby"; break; - case quicktype::TextLangageMode::LANG_XML: j = "LangXml"; break; + case quicktype::TextLanguageMode::LANG_C: j = "LangC"; break; + case quicktype::TextLanguageMode::LANG_HAXE: j = "LangHaxe"; break; + case quicktype::TextLanguageMode::LANG_JS: j = "LangJS"; break; + case quicktype::TextLanguageMode::LANG_JSON: j = "LangJson"; break; + case quicktype::TextLanguageMode::LANG_LUA: j = "LangLua"; break; + case quicktype::TextLanguageMode::LANG_MARKDOWN: j = "LangMarkdown"; break; + case quicktype::TextLanguageMode::LANG_PYTHON: j = "LangPython"; break; + case quicktype::TextLanguageMode::LANG_RUBY: j = "LangRuby"; break; + case quicktype::TextLanguageMode::LANG_XML: j = "LangXml"; break; default: throw "This should not happen"; } } @@ -2863,6 +2891,22 @@ namespace nlohmann { } } + inline void from_json(const json & j, quicktype::ImageExportMode & x) { + if (j == "None") x = quicktype::ImageExportMode::NONE; + else if (j == "OneImagePerLayer") x = quicktype::ImageExportMode::ONE_IMAGE_PER_LAYER; + else if (j == "OneImagePerLevel") x = quicktype::ImageExportMode::ONE_IMAGE_PER_LEVEL; + else throw "Input JSON does not conform to schema"; + } + + inline void to_json(json & j, const quicktype::ImageExportMode & x) { + switch (x) { + case quicktype::ImageExportMode::NONE: j = "None"; break; + case quicktype::ImageExportMode::ONE_IMAGE_PER_LAYER: j = "OneImagePerLayer"; break; + case quicktype::ImageExportMode::ONE_IMAGE_PER_LEVEL: j = "OneImagePerLevel"; break; + default: throw "This should not happen"; + } + } + inline void from_json(const json & j, quicktype::BgPos & x) { if (j == "Contain") x = quicktype::BgPos::CONTAIN; else if (j == "Cover") x = quicktype::BgPos::COVER; diff --git a/docs/quicktype/LdtkJson.cs b/docs/quicktype/LdtkJson.cs index 5d2e9af17..47bff85be 100644 --- a/docs/quicktype/LdtkJson.cs +++ b/docs/quicktype/LdtkJson.cs @@ -19,7 +19,7 @@ namespace ldtk /// This file is a JSON schema of files created by LDtk level editor (https://ldtk.io). /// /// This is the root of any Project JSON file. It contains: - the project settings, - an - /// array of levels, - and a definition object (that can probably be safely ignored for most + /// array of levels, - a group of definitions (that can probably be safely ignored for most /// users). /// public partial class LdtkJson @@ -85,11 +85,11 @@ public partial class LdtkJson public Definitions Defs { get; set; } /// - /// If TRUE, all layers in all levels will also be exported as PNG along with the project - /// file (default is FALSE) + /// **WARNING**: this deprecated value is no longer exported since version 0.9.3 Replaced + /// by: `imageExportMode` /// [JsonProperty("exportPng")] - public bool ExportPng { get; set; } + public bool? ExportPng { get; set; } /// /// If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file @@ -112,6 +112,13 @@ public partial class LdtkJson [JsonProperty("flags")] public Flag[] Flags { get; set; } + /// + /// "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + /// `OneImagePerLevel` + /// + [JsonProperty("imageExportMode")] + public ImageExportMode ImageExportMode { get; set; } + /// /// File format version /// @@ -184,11 +191,14 @@ public partial class LdtkJson public partial class Definitions { /// - /// All entities, including their custom fields + /// All entities definitions, including their custom fields /// [JsonProperty("entities")] public EntityDefinition[] Entities { get; set; } + /// + /// All internal enums + /// [JsonProperty("enums")] public EnumDefinition[] Enums { get; set; } @@ -199,15 +209,21 @@ public partial class Definitions [JsonProperty("externalEnums")] public EnumDefinition[] ExternalEnums { get; set; } + /// + /// All layer definitions + /// [JsonProperty("layers")] public LayerDefinition[] Layers { get; set; } /// - /// An array containing all custom fields available to all levels. + /// All custom fields available to all levels. /// [JsonProperty("levelFields")] public FieldDefinition[] LevelFields { get; set; } + /// + /// All tilesets + /// [JsonProperty("tilesets")] public TilesetDefinition[] Tilesets { get; set; } } @@ -445,8 +461,8 @@ public partial class FieldDefinition /// Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`, /// `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` /// - [JsonProperty("textLangageMode")] - public TextLangageMode? TextLangageMode { get; set; } + [JsonProperty("textLanguageMode")] + public TextLanguageMode? TextLanguageMode { get; set; } /// /// Internal type enum @@ -1399,7 +1415,7 @@ public enum EditorDisplayMode { EntityTile, Hidden, NameAndValue, PointPath, Poi /// public enum EditorDisplayPos { Above, Beneath, Center }; - public enum TextLangageMode { LangC, LangHaxe, LangJs, LangJson, LangLua, LangMarkdown, LangPython, LangRuby, LangXml }; + public enum TextLanguageMode { LangC, LangHaxe, LangJs, LangJson, LangLua, LangMarkdown, LangPython, LangRuby, LangXml }; /// /// Possible values: `DiscardOldOnes`, `PreventAdding`, `MoveLastOne` @@ -1440,6 +1456,12 @@ public enum TypeEnum { AutoLayer, Entities, IntGrid, Tiles }; public enum Flag { DiscardPreCsvIntGrid, IgnoreBackupSuggest }; + /// + /// "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + /// `OneImagePerLevel` + /// + public enum ImageExportMode { None, OneImagePerLayer, OneImagePerLevel }; + public enum BgPos { Contain, Cover, CoverDirty, Unscaled }; /// @@ -1468,7 +1490,7 @@ internal static class Converter { EditorDisplayModeConverter.Singleton, EditorDisplayPosConverter.Singleton, - TextLangageModeConverter.Singleton, + TextLanguageModeConverter.Singleton, LimitBehaviorConverter.Singleton, LimitScopeConverter.Singleton, RenderModeConverter.Singleton, @@ -1477,6 +1499,7 @@ internal static class Converter TileModeConverter.Singleton, TypeEnumConverter.Singleton, FlagConverter.Singleton, + ImageExportModeConverter.Singleton, BgPosConverter.Singleton, WorldLayoutConverter.Singleton, new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal } @@ -1611,9 +1634,9 @@ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSeria public static readonly EditorDisplayPosConverter Singleton = new EditorDisplayPosConverter(); } - internal class TextLangageModeConverter : JsonConverter + internal class TextLanguageModeConverter : JsonConverter { - public override bool CanConvert(Type t) => t == typeof(TextLangageMode) || t == typeof(TextLangageMode?); + public override bool CanConvert(Type t) => t == typeof(TextLanguageMode) || t == typeof(TextLanguageMode?); public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer) { @@ -1622,25 +1645,25 @@ public override object ReadJson(JsonReader reader, Type t, object existingValue, switch (value) { case "LangC": - return TextLangageMode.LangC; + return TextLanguageMode.LangC; case "LangHaxe": - return TextLangageMode.LangHaxe; + return TextLanguageMode.LangHaxe; case "LangJS": - return TextLangageMode.LangJs; + return TextLanguageMode.LangJs; case "LangJson": - return TextLangageMode.LangJson; + return TextLanguageMode.LangJson; case "LangLua": - return TextLangageMode.LangLua; + return TextLanguageMode.LangLua; case "LangMarkdown": - return TextLangageMode.LangMarkdown; + return TextLanguageMode.LangMarkdown; case "LangPython": - return TextLangageMode.LangPython; + return TextLanguageMode.LangPython; case "LangRuby": - return TextLangageMode.LangRuby; + return TextLanguageMode.LangRuby; case "LangXml": - return TextLangageMode.LangXml; + return TextLanguageMode.LangXml; } - throw new Exception("Cannot unmarshal type TextLangageMode"); + throw new Exception("Cannot unmarshal type TextLanguageMode"); } public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer) @@ -1650,41 +1673,41 @@ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSeria serializer.Serialize(writer, null); return; } - var value = (TextLangageMode)untypedValue; + var value = (TextLanguageMode)untypedValue; switch (value) { - case TextLangageMode.LangC: + case TextLanguageMode.LangC: serializer.Serialize(writer, "LangC"); return; - case TextLangageMode.LangHaxe: + case TextLanguageMode.LangHaxe: serializer.Serialize(writer, "LangHaxe"); return; - case TextLangageMode.LangJs: + case TextLanguageMode.LangJs: serializer.Serialize(writer, "LangJS"); return; - case TextLangageMode.LangJson: + case TextLanguageMode.LangJson: serializer.Serialize(writer, "LangJson"); return; - case TextLangageMode.LangLua: + case TextLanguageMode.LangLua: serializer.Serialize(writer, "LangLua"); return; - case TextLangageMode.LangMarkdown: + case TextLanguageMode.LangMarkdown: serializer.Serialize(writer, "LangMarkdown"); return; - case TextLangageMode.LangPython: + case TextLanguageMode.LangPython: serializer.Serialize(writer, "LangPython"); return; - case TextLangageMode.LangRuby: + case TextLanguageMode.LangRuby: serializer.Serialize(writer, "LangRuby"); return; - case TextLangageMode.LangXml: + case TextLanguageMode.LangXml: serializer.Serialize(writer, "LangXml"); return; } - throw new Exception("Cannot marshal type TextLangageMode"); + throw new Exception("Cannot marshal type TextLanguageMode"); } - public static readonly TextLangageModeConverter Singleton = new TextLangageModeConverter(); + public static readonly TextLanguageModeConverter Singleton = new TextLanguageModeConverter(); } internal class LimitBehaviorConverter : JsonConverter @@ -2060,6 +2083,52 @@ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSeria public static readonly FlagConverter Singleton = new FlagConverter(); } + internal class ImageExportModeConverter : JsonConverter + { + public override bool CanConvert(Type t) => t == typeof(ImageExportMode) || t == typeof(ImageExportMode?); + + public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer) + { + if (reader.TokenType == JsonToken.Null) return null; + var value = serializer.Deserialize(reader); + switch (value) + { + case "None": + return ImageExportMode.None; + case "OneImagePerLayer": + return ImageExportMode.OneImagePerLayer; + case "OneImagePerLevel": + return ImageExportMode.OneImagePerLevel; + } + throw new Exception("Cannot unmarshal type ImageExportMode"); + } + + public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer) + { + if (untypedValue == null) + { + serializer.Serialize(writer, null); + return; + } + var value = (ImageExportMode)untypedValue; + switch (value) + { + case ImageExportMode.None: + serializer.Serialize(writer, "None"); + return; + case ImageExportMode.OneImagePerLayer: + serializer.Serialize(writer, "OneImagePerLayer"); + return; + case ImageExportMode.OneImagePerLevel: + serializer.Serialize(writer, "OneImagePerLevel"); + return; + } + throw new Exception("Cannot marshal type ImageExportMode"); + } + + public static readonly ImageExportModeConverter Singleton = new ImageExportModeConverter(); + } + internal class BgPosConverter : JsonConverter { public override bool CanConvert(Type t) => t == typeof(BgPos) || t == typeof(BgPos?); diff --git a/docs/quicktype/LdtkJson.go b/docs/quicktype/LdtkJson.go index 4cdfcf858..d45e11f43 100644 --- a/docs/quicktype/LdtkJson.go +++ b/docs/quicktype/LdtkJson.go @@ -21,32 +21,33 @@ func (r *LdtkJSON) Marshal() ([]byte, error) { // This file is a JSON schema of files created by LDtk level editor (https://ldtk.io). // // This is the root of any Project JSON file. It contains: - the project settings, - an -// array of levels, - and a definition object (that can probably be safely ignored for most +// array of levels, - a group of definitions (that can probably be safely ignored for most // users). type LdtkJSON struct { - BackupLimit int64 `json:"backupLimit"` // Number of backup files to keep, if the `backupOnSave` is TRUE - BackupOnSave bool `json:"backupOnSave"` // If TRUE, an extra copy of the project will be created in a sub folder, when saving. - BgColor string `json:"bgColor"` // Project background color - DefaultGridSize int64 `json:"defaultGridSize"` // Default grid size for new layers - DefaultLevelBgColor string `json:"defaultLevelBgColor"`// Default background color of levels - DefaultLevelHeight int64 `json:"defaultLevelHeight"` // Default new level height - DefaultLevelWidth int64 `json:"defaultLevelWidth"` // Default new level width - DefaultPivotX float64 `json:"defaultPivotX"` // Default X pivot (0 to 1) for new entities - DefaultPivotY float64 `json:"defaultPivotY"` // Default Y pivot (0 to 1) for new entities - Defs Definitions `json:"defs"` // A structure containing all the definitions of this project - ExportPNG bool `json:"exportPng"` // If TRUE, all layers in all levels will also be exported as PNG along with the project; file (default is FALSE) - ExportTiled bool `json:"exportTiled"` // If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file; (default is FALSE) - ExternalLevels bool `json:"externalLevels"` // If TRUE, one file will be saved for the project (incl. all its definitions) and one file; in a sub-folder for each level. - Flags []Flag `json:"flags"` // An array containing various advanced flags (ie. options or other states). Possible; values: `DiscardPreCsvIntGrid`, `IgnoreBackupSuggest` - JSONVersion string `json:"jsonVersion"` // File format version - LevelNamePattern string `json:"levelNamePattern"` // The default naming convention for level identifiers. - Levels []Level `json:"levels"` // All levels. The order of this array is only relevant in `LinearHorizontal` and; `linearVertical` world layouts (see `worldLayout` value). Otherwise, you should refer to; the `worldX`,`worldY` coordinates of each Level. - MinifyJSON bool `json:"minifyJson"` // If TRUE, the Json is partially minified (no indentation, nor line breaks, default is; FALSE) - NextUid int64 `json:"nextUid"` // Next Unique integer ID available - PNGFilePattern *string `json:"pngFilePattern"` // File naming pattern for exported PNGs - WorldGridHeight int64 `json:"worldGridHeight"` // Height of the world grid in pixels. - WorldGridWidth int64 `json:"worldGridWidth"` // Width of the world grid in pixels. - WorldLayout WorldLayout `json:"worldLayout"` // An enum that describes how levels are organized in this project (ie. linearly or in a 2D; space). Possible values: `Free`, `GridVania`, `LinearHorizontal`, `LinearVertical` + BackupLimit int64 `json:"backupLimit"` // Number of backup files to keep, if the `backupOnSave` is TRUE + BackupOnSave bool `json:"backupOnSave"` // If TRUE, an extra copy of the project will be created in a sub folder, when saving. + BgColor string `json:"bgColor"` // Project background color + DefaultGridSize int64 `json:"defaultGridSize"` // Default grid size for new layers + DefaultLevelBgColor string `json:"defaultLevelBgColor"`// Default background color of levels + DefaultLevelHeight int64 `json:"defaultLevelHeight"` // Default new level height + DefaultLevelWidth int64 `json:"defaultLevelWidth"` // Default new level width + DefaultPivotX float64 `json:"defaultPivotX"` // Default X pivot (0 to 1) for new entities + DefaultPivotY float64 `json:"defaultPivotY"` // Default Y pivot (0 to 1) for new entities + Defs Definitions `json:"defs"` // A structure containing all the definitions of this project + ExportPNG *bool `json:"exportPng"` // **WARNING**: this deprecated value is no longer exported since version 0.9.3 Replaced; by: `imageExportMode` + ExportTiled bool `json:"exportTiled"` // If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file; (default is FALSE) + ExternalLevels bool `json:"externalLevels"` // If TRUE, one file will be saved for the project (incl. all its definitions) and one file; in a sub-folder for each level. + Flags []Flag `json:"flags"` // An array containing various advanced flags (ie. options or other states). Possible; values: `DiscardPreCsvIntGrid`, `IgnoreBackupSuggest` + ImageExportMode ImageExportMode `json:"imageExportMode"` // "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`,; `OneImagePerLevel` + JSONVersion string `json:"jsonVersion"` // File format version + LevelNamePattern string `json:"levelNamePattern"` // The default naming convention for level identifiers. + Levels []Level `json:"levels"` // All levels. The order of this array is only relevant in `LinearHorizontal` and; `linearVertical` world layouts (see `worldLayout` value). Otherwise, you should refer to; the `worldX`,`worldY` coordinates of each Level. + MinifyJSON bool `json:"minifyJson"` // If TRUE, the Json is partially minified (no indentation, nor line breaks, default is; FALSE) + NextUid int64 `json:"nextUid"` // Next Unique integer ID available + PNGFilePattern *string `json:"pngFilePattern"` // File naming pattern for exported PNGs + WorldGridHeight int64 `json:"worldGridHeight"` // Height of the world grid in pixels. + WorldGridWidth int64 `json:"worldGridWidth"` // Width of the world grid in pixels. + WorldLayout WorldLayout `json:"worldLayout"` // An enum that describes how levels are organized in this project (ie. linearly or in a 2D; space). Possible values: `Free`, `GridVania`, `LinearHorizontal`, `LinearVertical` } // A structure containing all the definitions of this project @@ -58,12 +59,12 @@ type LdtkJSON struct { // `__identifier` or `__type`). The 2 only definition types you might need here are // **Tilesets** and **Enums**. type Definitions struct { - Entities []EntityDefinition `json:"entities"` // All entities, including their custom fields - Enums []EnumDefinition `json:"enums"` + Entities []EntityDefinition `json:"entities"` // All entities definitions, including their custom fields + Enums []EnumDefinition `json:"enums"` // All internal enums ExternalEnums []EnumDefinition `json:"externalEnums"`// Note: external enums are exactly the same as `enums`, except they have a `relPath` to; point to an external source file. - Layers []LayerDefinition `json:"layers"` - LevelFields []FieldDefinition `json:"levelFields"` // An array containing all custom fields available to all levels. - Tilesets []TilesetDefinition `json:"tilesets"` + Layers []LayerDefinition `json:"layers"` // All layer definitions + LevelFields []FieldDefinition `json:"levelFields"` // All custom fields available to all levels. + Tilesets []TilesetDefinition `json:"tilesets"` // All tilesets } type EntityDefinition struct { @@ -110,7 +111,7 @@ type FieldDefinition struct { Max *float64 `json:"max"` // Max limit for value, if applicable Min *float64 `json:"min"` // Min limit for value, if applicable Regex *string `json:"regex"` // Optional regular expression that needs to be matched to accept values. Expected format:; `/some_reg_ex/g`, with optional "i" flag. - TextLangageMode *TextLangageMode `json:"textLangageMode"` // Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`,; `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` + TextLanguageMode *TextLanguageMode `json:"textLanguageMode"` // Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`,; `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` FieldDefinitionType interface{} `json:"type"` // Internal type enum Uid int64 `json:"uid"` // Unique Int identifier } @@ -347,17 +348,17 @@ const ( Center EditorDisplayPos = "Center" ) -type TextLangageMode string +type TextLanguageMode string const ( - LangC TextLangageMode = "LangC" - LangHaxe TextLangageMode = "LangHaxe" - LangJS TextLangageMode = "LangJS" - LangJSON TextLangageMode = "LangJson" - LangLua TextLangageMode = "LangLua" - LangMarkdown TextLangageMode = "LangMarkdown" - LangPython TextLangageMode = "LangPython" - LangRuby TextLangageMode = "LangRuby" - LangXML TextLangageMode = "LangXml" + LangC TextLanguageMode = "LangC" + LangHaxe TextLanguageMode = "LangHaxe" + LangJS TextLanguageMode = "LangJS" + LangJSON TextLanguageMode = "LangJson" + LangLua TextLanguageMode = "LangLua" + LangMarkdown TextLanguageMode = "LangMarkdown" + LangPython TextLanguageMode = "LangPython" + LangRuby TextLanguageMode = "LangRuby" + LangXML TextLanguageMode = "LangXml" ) // Possible values: `DiscardOldOnes`, `PreventAdding`, `MoveLastOne` @@ -398,8 +399,8 @@ const ( // Checker mode Possible values: `None`, `Horizontal`, `Vertical` type Checker string const ( + CheckerNone Checker = "None" Horizontal Checker = "Horizontal" - None Checker = "None" Vertical Checker = "Vertical" ) @@ -426,6 +427,15 @@ const ( IgnoreBackupSuggest Flag = "IgnoreBackupSuggest" ) +// "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, +// `OneImagePerLevel` +type ImageExportMode string +const ( + ImageExportModeNone ImageExportMode = "None" + OneImagePerLayer ImageExportMode = "OneImagePerLayer" + OneImagePerLevel ImageExportMode = "OneImagePerLevel" +) + type BgPos string const ( BgPosCover BgPos = "Cover" diff --git a/docs/quicktype/LdtkJson.js b/docs/quicktype/LdtkJson.js index bcefa10a2..28920a47d 100644 --- a/docs/quicktype/LdtkJson.js +++ b/docs/quicktype/LdtkJson.js @@ -161,10 +161,11 @@ const typeMap = { { json: "defaultPivotX", js: "defaultPivotX", typ: 3.14 }, { json: "defaultPivotY", js: "defaultPivotY", typ: 3.14 }, { json: "defs", js: "defs", typ: r("Definitions") }, - { json: "exportPng", js: "exportPng", typ: true }, + { json: "exportPng", js: "exportPng", typ: u(undefined, u(true, null)) }, { json: "exportTiled", js: "exportTiled", typ: true }, { json: "externalLevels", js: "externalLevels", typ: true }, { json: "flags", js: "flags", typ: a(r("Flag")) }, + { json: "imageExportMode", js: "imageExportMode", typ: r("ImageExportMode") }, { json: "jsonVersion", js: "jsonVersion", typ: "" }, { json: "levelNamePattern", js: "levelNamePattern", typ: "" }, { json: "levels", js: "levels", typ: a(r("Level")) }, @@ -224,7 +225,7 @@ const typeMap = { { json: "max", js: "max", typ: u(undefined, u(3.14, null)) }, { json: "min", js: "min", typ: u(undefined, u(3.14, null)) }, { json: "regex", js: "regex", typ: u(undefined, u(null, "")) }, - { json: "textLangageMode", js: "textLangageMode", typ: u(undefined, u(r("TextLangageMode"), null)) }, + { json: "textLanguageMode", js: "textLanguageMode", typ: u(undefined, u(r("TextLanguageMode"), null)) }, { json: "type", js: "type", typ: "any" }, { json: "uid", js: "uid", typ: 0 }, ], false), @@ -417,7 +418,7 @@ const typeMap = { "Beneath", "Center", ], - "TextLangageMode": [ + "TextLanguageMode": [ "LangC", "LangHaxe", "LangJS", @@ -469,6 +470,11 @@ const typeMap = { "DiscardPreCsvIntGrid", "IgnoreBackupSuggest", ], + "ImageExportMode": [ + "None", + "OneImagePerLayer", + "OneImagePerLevel", + ], "BgPos": [ "Contain", "Cover", diff --git a/docs/quicktype/LdtkJson.py b/docs/quicktype/LdtkJson.py index 35aac3584..9d58752bd 100644 --- a/docs/quicktype/LdtkJson.py +++ b/docs/quicktype/LdtkJson.py @@ -96,7 +96,7 @@ class EditorDisplayPos(Enum): CENTER = "Center" -class TextLangageMode(Enum): +class TextLanguageMode(Enum): LANG_C = "LangC" LANG_HAXE = "LangHaxe" LANG_JS = "LangJS" @@ -153,13 +153,13 @@ class FieldDefinition: """Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`, `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` """ - text_langage_mode: Optional[TextLangageMode] + text_language_mode: Optional[TextLanguageMode] """Internal type enum""" field_definition_type: Any """Unique Int identifier""" uid: int - def __init__(self, type: str, accept_file_types: Optional[List[str]], array_max_length: Optional[int], array_min_length: Optional[int], can_be_null: bool, default_override: Any, editor_always_show: bool, editor_cut_long_values: bool, editor_display_mode: EditorDisplayMode, editor_display_pos: EditorDisplayPos, identifier: str, is_array: bool, max: Optional[float], min: Optional[float], regex: Optional[str], text_langage_mode: Optional[TextLangageMode], field_definition_type: Any, uid: int) -> None: + def __init__(self, type: str, accept_file_types: Optional[List[str]], array_max_length: Optional[int], array_min_length: Optional[int], can_be_null: bool, default_override: Any, editor_always_show: bool, editor_cut_long_values: bool, editor_display_mode: EditorDisplayMode, editor_display_pos: EditorDisplayPos, identifier: str, is_array: bool, max: Optional[float], min: Optional[float], regex: Optional[str], text_language_mode: Optional[TextLanguageMode], field_definition_type: Any, uid: int) -> None: self.type = type self.accept_file_types = accept_file_types self.array_max_length = array_max_length @@ -175,7 +175,7 @@ def __init__(self, type: str, accept_file_types: Optional[List[str]], array_max_ self.max = max self.min = min self.regex = regex - self.text_langage_mode = text_langage_mode + self.text_language_mode = text_language_mode self.field_definition_type = field_definition_type self.uid = uid @@ -197,10 +197,10 @@ def from_dict(obj: Any) -> 'FieldDefinition': max = from_union([from_none, from_float], obj.get("max")) min = from_union([from_none, from_float], obj.get("min")) regex = from_union([from_none, from_str], obj.get("regex")) - text_langage_mode = from_union([from_none, TextLangageMode], obj.get("textLangageMode")) + text_language_mode = from_union([from_none, TextLanguageMode], obj.get("textLanguageMode")) field_definition_type = obj.get("type") uid = from_int(obj.get("uid")) - return FieldDefinition(type, accept_file_types, array_max_length, array_min_length, can_be_null, default_override, editor_always_show, editor_cut_long_values, editor_display_mode, editor_display_pos, identifier, is_array, max, min, regex, text_langage_mode, field_definition_type, uid) + return FieldDefinition(type, accept_file_types, array_max_length, array_min_length, can_be_null, default_override, editor_always_show, editor_cut_long_values, editor_display_mode, editor_display_pos, identifier, is_array, max, min, regex, text_language_mode, field_definition_type, uid) def to_dict(self) -> dict: result: dict = {} @@ -219,7 +219,7 @@ def to_dict(self) -> dict: result["max"] = from_union([from_none, to_float], self.max) result["min"] = from_union([from_none, to_float], self.min) result["regex"] = from_union([from_none, from_str], self.regex) - result["textLangageMode"] = from_union([from_none, lambda x: to_enum(TextLangageMode, x)], self.text_langage_mode) + result["textLanguageMode"] = from_union([from_none, lambda x: to_enum(TextLanguageMode, x)], self.text_language_mode) result["type"] = self.field_definition_type result["uid"] = from_int(self.uid) return result @@ -895,16 +895,19 @@ class Definitions: `__identifier` or `__type`). The 2 only definition types you might need here are **Tilesets** and **Enums**. """ - """All entities, including their custom fields""" + """All entities definitions, including their custom fields""" entities: List[EntityDefinition] + """All internal enums""" enums: List[EnumDefinition] """Note: external enums are exactly the same as `enums`, except they have a `relPath` to point to an external source file. """ external_enums: List[EnumDefinition] + """All layer definitions""" layers: List[LayerDefinition] - """An array containing all custom fields available to all levels.""" + """All custom fields available to all levels.""" level_fields: List[FieldDefinition] + """All tilesets""" tilesets: List[TilesetDefinition] def __init__(self, entities: List[EntityDefinition], enums: List[EnumDefinition], external_enums: List[EnumDefinition], layers: List[LayerDefinition], level_fields: List[FieldDefinition], tilesets: List[TilesetDefinition]) -> None: @@ -942,6 +945,15 @@ class Flag(Enum): IGNORE_BACKUP_SUGGEST = "IgnoreBackupSuggest" +class ImageExportMode(Enum): + """"Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + `OneImagePerLevel` + """ + NONE = "None" + ONE_IMAGE_PER_LAYER = "OneImagePerLayer" + ONE_IMAGE_PER_LEVEL = "OneImagePerLevel" + + class LevelBackgroundPosition: """Level background image position info""" """An array of 4 float values describing the cropped sub-rectangle of the displayed @@ -1506,7 +1518,7 @@ class LdtkJSON: """This file is a JSON schema of files created by LDtk level editor (https://ldtk.io). This is the root of any Project JSON file. It contains: - the project settings, - an - array of levels, - and a definition object (that can probably be safely ignored for most + array of levels, - a group of definitions (that can probably be safely ignored for most users). """ """Number of backup files to keep, if the `backupOnSave` is TRUE""" @@ -1529,10 +1541,10 @@ class LdtkJSON: default_pivot_y: float """A structure containing all the definitions of this project""" defs: Definitions - """If TRUE, all layers in all levels will also be exported as PNG along with the project - file (default is FALSE) + """**WARNING**: this deprecated value is no longer exported since version 0.9.3 Replaced + by: `imageExportMode` """ - export_png: bool + export_png: Optional[bool] """If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file (default is FALSE) """ @@ -1545,6 +1557,10 @@ class LdtkJSON: values: `DiscardPreCsvIntGrid`, `IgnoreBackupSuggest` """ flags: List[Flag] + """"Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + `OneImagePerLevel` + """ + image_export_mode: ImageExportMode """File format version""" json_version: str """The default naming convention for level identifiers.""" @@ -1571,7 +1587,7 @@ class LdtkJSON: """ world_layout: WorldLayout - def __init__(self, backup_limit: int, backup_on_save: bool, bg_color: str, default_grid_size: int, default_level_bg_color: str, default_level_height: int, default_level_width: int, default_pivot_x: float, default_pivot_y: float, defs: Definitions, export_png: bool, export_tiled: bool, external_levels: bool, flags: List[Flag], json_version: str, level_name_pattern: str, levels: List[Level], minify_json: bool, next_uid: int, png_file_pattern: Optional[str], world_grid_height: int, world_grid_width: int, world_layout: WorldLayout) -> None: + def __init__(self, backup_limit: int, backup_on_save: bool, bg_color: str, default_grid_size: int, default_level_bg_color: str, default_level_height: int, default_level_width: int, default_pivot_x: float, default_pivot_y: float, defs: Definitions, export_png: Optional[bool], export_tiled: bool, external_levels: bool, flags: List[Flag], image_export_mode: ImageExportMode, json_version: str, level_name_pattern: str, levels: List[Level], minify_json: bool, next_uid: int, png_file_pattern: Optional[str], world_grid_height: int, world_grid_width: int, world_layout: WorldLayout) -> None: self.backup_limit = backup_limit self.backup_on_save = backup_on_save self.bg_color = bg_color @@ -1586,6 +1602,7 @@ def __init__(self, backup_limit: int, backup_on_save: bool, bg_color: str, defau self.export_tiled = export_tiled self.external_levels = external_levels self.flags = flags + self.image_export_mode = image_export_mode self.json_version = json_version self.level_name_pattern = level_name_pattern self.levels = levels @@ -1609,10 +1626,11 @@ def from_dict(obj: Any) -> 'LdtkJSON': default_pivot_x = from_float(obj.get("defaultPivotX")) default_pivot_y = from_float(obj.get("defaultPivotY")) defs = Definitions.from_dict(obj.get("defs")) - export_png = from_bool(obj.get("exportPng")) + export_png = from_union([from_none, from_bool], obj.get("exportPng")) export_tiled = from_bool(obj.get("exportTiled")) external_levels = from_bool(obj.get("externalLevels")) flags = from_list(Flag, obj.get("flags")) + image_export_mode = ImageExportMode(obj.get("imageExportMode")) json_version = from_str(obj.get("jsonVersion")) level_name_pattern = from_str(obj.get("levelNamePattern")) levels = from_list(Level.from_dict, obj.get("levels")) @@ -1622,7 +1640,7 @@ def from_dict(obj: Any) -> 'LdtkJSON': world_grid_height = from_int(obj.get("worldGridHeight")) world_grid_width = from_int(obj.get("worldGridWidth")) world_layout = WorldLayout(obj.get("worldLayout")) - return LdtkJSON(backup_limit, backup_on_save, bg_color, default_grid_size, default_level_bg_color, default_level_height, default_level_width, default_pivot_x, default_pivot_y, defs, export_png, export_tiled, external_levels, flags, json_version, level_name_pattern, levels, minify_json, next_uid, png_file_pattern, world_grid_height, world_grid_width, world_layout) + return LdtkJSON(backup_limit, backup_on_save, bg_color, default_grid_size, default_level_bg_color, default_level_height, default_level_width, default_pivot_x, default_pivot_y, defs, export_png, export_tiled, external_levels, flags, image_export_mode, json_version, level_name_pattern, levels, minify_json, next_uid, png_file_pattern, world_grid_height, world_grid_width, world_layout) def to_dict(self) -> dict: result: dict = {} @@ -1636,10 +1654,11 @@ def to_dict(self) -> dict: result["defaultPivotX"] = to_float(self.default_pivot_x) result["defaultPivotY"] = to_float(self.default_pivot_y) result["defs"] = to_class(Definitions, self.defs) - result["exportPng"] = from_bool(self.export_png) + result["exportPng"] = from_union([from_none, from_bool], self.export_png) result["exportTiled"] = from_bool(self.export_tiled) result["externalLevels"] = from_bool(self.external_levels) result["flags"] = from_list(lambda x: to_enum(Flag, x), self.flags) + result["imageExportMode"] = to_enum(ImageExportMode, self.image_export_mode) result["jsonVersion"] = from_str(self.json_version) result["levelNamePattern"] = from_str(self.level_name_pattern) result["levels"] = from_list(lambda x: to_class(Level, x), self.levels) diff --git a/docs/quicktype/LdtkJson.rs b/docs/quicktype/LdtkJson.rs index 8ac8a69c4..2f2975e17 100644 --- a/docs/quicktype/LdtkJson.rs +++ b/docs/quicktype/LdtkJson.rs @@ -17,7 +17,7 @@ use std::collections::HashMap; /// This file is a JSON schema of files created by LDtk level editor (https://ldtk.io). /// /// This is the root of any Project JSON file. It contains: - the project settings, - an -/// array of levels, - and a definition object (that can probably be safely ignored for most +/// array of levels, - a group of definitions (that can probably be safely ignored for most /// users). #[derive(Serialize, Deserialize)] pub struct LdtkJson { @@ -61,10 +61,10 @@ pub struct LdtkJson { #[serde(rename = "defs")] defs: Definitions, - /// If TRUE, all layers in all levels will also be exported as PNG along with the project - /// file (default is FALSE) + /// **WARNING**: this deprecated value is no longer exported since version 0.9.3 Replaced + /// by: `imageExportMode` #[serde(rename = "exportPng")] - export_png: bool, + export_png: Option, /// If TRUE, a Tiled compatible file will also be generated along with the LDtk JSON file /// (default is FALSE) @@ -81,6 +81,11 @@ pub struct LdtkJson { #[serde(rename = "flags")] flags: Vec, + /// "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, + /// `OneImagePerLevel` + #[serde(rename = "imageExportMode")] + image_export_mode: ImageExportMode, + /// File format version #[serde(rename = "jsonVersion")] json_version: String, @@ -132,10 +137,11 @@ pub struct LdtkJson { /// **Tilesets** and **Enums**. #[derive(Serialize, Deserialize)] pub struct Definitions { - /// All entities, including their custom fields + /// All entities definitions, including their custom fields #[serde(rename = "entities")] entities: Vec, + /// All internal enums #[serde(rename = "enums")] enums: Vec, @@ -144,13 +150,15 @@ pub struct Definitions { #[serde(rename = "externalEnums")] external_enums: Vec, + /// All layer definitions #[serde(rename = "layers")] layers: Vec, - /// An array containing all custom fields available to all levels. + /// All custom fields available to all levels. #[serde(rename = "levelFields")] level_fields: Vec, + /// All tilesets #[serde(rename = "tilesets")] tilesets: Vec, } @@ -318,8 +326,8 @@ pub struct FieldDefinition { /// Possible values: <`null`>, `LangPython`, `LangRuby`, `LangJS`, `LangLua`, `LangC`, /// `LangHaxe`, `LangMarkdown`, `LangJson`, `LangXml` - #[serde(rename = "textLangageMode")] - text_langage_mode: Option, + #[serde(rename = "textLanguageMode")] + text_language_mode: Option, /// Internal type enum #[serde(rename = "type")] @@ -1040,7 +1048,7 @@ pub enum EditorDisplayPos { } #[derive(Serialize, Deserialize)] -pub enum TextLangageMode { +pub enum TextLanguageMode { #[serde(rename = "LangC")] LangC, @@ -1177,6 +1185,20 @@ pub enum Flag { IgnoreBackupSuggest, } +/// "Image export" option when saving project. Possible values: `None`, `OneImagePerLayer`, +/// `OneImagePerLevel` +#[derive(Serialize, Deserialize)] +pub enum ImageExportMode { + #[serde(rename = "None")] + None, + + #[serde(rename = "OneImagePerLayer")] + OneImagePerLayer, + + #[serde(rename = "OneImagePerLevel")] + OneImagePerLevel, +} + #[derive(Serialize, Deserialize)] pub enum BgPos { #[serde(rename = "Contain")]