Photon Editor Library 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
EditorSettings.h
Go to the documentation of this file.
1#pragma once
2
3#include <SDL/Option.h>
4#include <SDL/sdl_interface.h>
5#include <DataIO/FileSystem/Path.h>
6
7namespace ph::editor
8{
9
10class EditorSettings : public Option
11{
12public:
17
18public:
19 PH_DEFINE_SDL_CLASS(TSdlOwnerClass<EditorSettings>)
20 {
21 ClassType clazz("editor-settings");
22 clazz.docName("Editor Settings");
23 clazz.description("Settings for editor.");
24 clazz.baseOn<Option>();
25
26 TSdlPath<OwnerType> defaultSceneFile("default-scene-file", &OwnerType::defaultSceneFile);
27 defaultSceneFile.description(
28 "Scene file that loads automatically if none was specified.");
29 clazz.addField(defaultSceneFile);
30
31 TSdlBool<OwnerType> loadDefaultSceneOnStartup("load-default-scene-on-start-up", &OwnerType::loadDefaultSceneOnStartup);
32 loadDefaultSceneOnStartup.description(
33 "Load the specified default scene automatically when editor starts.");
34 loadDefaultSceneOnStartup.defaultTo(true);
35 clazz.addField(loadDefaultSceneOnStartup);
36
37 TSdlBool<OwnerType> isDevelopmentMode("development-mode", &OwnerType::isDevelopmentMode);
38 isDevelopmentMode.description(
39 "Run the editor in development mode. Additional features such as debugging functionalities "
40 "are enabled in this mode.");
41 isDevelopmentMode.defaultTo(false);
42 clazz.addField(isDevelopmentMode);
43
44 TSdlFloat<OwnerType> imageZoomSensitivity("image-zoom-sensitivity", &OwnerType::imageZoomSensitivity);
45 imageZoomSensitivity.description(
46 "Amount of increment/decrement of a single step when zooming image.");
47 imageZoomSensitivity.defaultTo(1.0f);
48 clazz.addField(imageZoomSensitivity);
49
50 return clazz;
51 }
52};
53
54}// end namespace ph::editor
Definition EditorSettings.h:11
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< EditorSettings >)
Definition EditorSettings.h:19
Path defaultSceneFile
Definition EditorSettings.h:13
bool isDevelopmentMode
Definition EditorSettings.h:15
bool loadDefaultSceneOnStartup
Definition EditorSettings.h:14
float imageZoomSensitivity
Definition EditorSettings.h:16
Definition ph_editor.h:10