EditorSettings struct
Settings of the level editor, kept in Jazz2.Editor.json in the configuration directory.
Public types
- struct PanelPlacement
- Whether a panel that can be docked floats, and where it floated the last time, in units.
- struct TileSetFavorites
- Recently used and favourite tiles of a tile set, by their index in it.
- struct ToolOptions
- Options of the tools that are kept, see ToolSettings.
- struct PlayTestSettings
- Options of play-tests and of what is shown of them that are kept, see PlayTestController.
Public static variables
-
static std::
int32_t MaxRecentFiles constexpr - Most recently used files kept.
-
static std::
int32_t MaxRecentItems constexpr - Most recently used events and tiles kept, see RecentEvents.
-
static std::
int32_t MaxFavoriteItems constexpr - Most favourite events and tiles kept.
Public static functions
- static auto GetPath() -> String
- Returns the path of the settings file.
Public functions
- void Load()
- Loads the settings, keeps the defaults if there are none.
- auto Save() const -> bool
- Saves the settings.
- void AddRecentFile(StringView path)
- Moves a file to the top of the recent files.
- void RemoveRecentFile(StringView path)
- Removes a file from the recent files, as when it was moved elsewhere.
-
void AddRecentEvent(std::
uint16_t type) - Moves an event to the top of the recent events.
- auto GetTileFavorites(StringView tileSet) -> TileSetFavorites&
- Returns the recent and favourite tiles of a tile set, added if there are none yet.
-
void AddRecentTile(StringView tileSet,
std::
uint16_t index) - Moves a tile of a tile set to the top of its recent tiles.
Public variables
- float UiScale
- Scale of the interface, 0 to choose it by the size of the window.
- bool ShowGrid
- Whether the grid is shown.
- bool PauseLayerMovement
- Whether layers with an automatic speed stay still.
- bool EventsOnTop
- Whether the sprites of events are drawn over all layers instead of among them as in the game.
- bool PreviewTexturedLayers
- Whether a textured layer being edited is drawn as in the game instead of as plain tiles to be painted.
- bool OverriddenAssets
- Whether events are drawn with the sprites the script of the level gives their objects, see ScriptGraphics.
-
std::
int32_t Tool - Tool chosen when the editor was left, see EditorToolType.
- bool PickerEvents
- Whether the picker showed the events when the editor was left, the tiles otherwise.
-
std::
int32_t TilePickerColumns - Tiles in a row of the tile picker.
- float RightPanelWidth
- Width of the panel on the right in units.
- float LayerListHeight
- Height of the list of layers in the panel on the right in units.
- float PickerPanelWidth
- Width of the panel with the tiles and the events on the left in units.
-
std::
int32_t Layout - Layout of the interface, 0 by the size of the window, 1 for a desktop, 2 compact with panels in drawers.
- bool Expert
- Whether all tools and commands are offered, or only the simple ones.
- PanelPlacement PickerPanelPlacement
- Where the panel with the tiles and the events is when it floats.
- PanelPlacement RightPanelPlacement
- Where the panel on the right is when it floats.
-
std::
int32_t PlayCharacter - Character to play the level with, see PlayerType.
-
std::
int32_t PlayDifficulty - Difficulty to play the level at, see GameDifficulty.
-
std::
int32_t PlayGameMode - Game mode of multiplayer to play the level in local splitscreen, see Multiplayer::
MpGameMode, 0 to play alone. -
std::
int32_t PlayPlayerCount - Players of multiplayer in local splitscreen.
- SmallVector<String, 0> RecentFiles
- Files opened or saved recently, the most recent first.
- bool ShowScreenFrame
- Whether the frame of what the game shows is drawn around the pointer.
-
std::
int32_t ScreenFrameKind - Frame drawn by ShowScreenFrame, 0 the view of the game, 1 4:3, 2 16:9, 3 a half of a split screen.
-
std::
int32_t CheckLevelFilter - Problems shown by Check Level, 1 errors, 2 warnings, 4 information.
-
SmallVector<std::
uint16_t, 0> RecentEvents - Events chosen recently, by their type, the most recent first.
-
SmallVector<std::
uint16_t, 0> FavoriteEvents - Favourite events, by their type.
- SmallVector<TileSetFavorites, 0> TileFavorites
- Recently used and favourite tiles of each tile set.
-
std::
int32_t Theme - Theme of the interface, 0 for the usual one, 1 for high contrast, see UI::
Windows:: ThemeKind. - bool ReducedMotion
- Whether movement of the interface and the view is kept to the least — panels and lists don't glide, the view doesn't fly.
- bool ReadableFont
- Whether text is in a plain readable font instead of the pixel font of the game, see UI::
Windows:: ReadableFont. - String ScriptEditor
- Program the script of a level is edited in, empty for the one the system opens such files with.
- ToolOptions Tools
- Options of the tools that are kept.
- PlayTestSettings PlayTest
- Options of play-tests that are kept.
Variable documentation
String Jazz2:: Editor:: EditorSettings:: ScriptEditor
Program the script of a level is edited in, empty for the one the system opens such files with.
Set only in the file. The path of a program, or a name found in PATH, followed by arguments if needed, where {file} stands for the script — the script is the last argument otherwise. A path with spaces followed by arguments has to be in quotes. For example C:\Program Files\Notepad++\notepad++.exe or code --reuse-window {file}, written in the file as "C:\\Program Files\\Notepad++\\notepad++.exe".