LkEngine
0.1.2
Loading...
Searching...
No Matches
EditorSettings.h
1
#pragma once
2
3
#include "
LkEngine/Core/LObject/Object.h
"
4
#include "LkEngine/Core/LObject/ObjectPtr.h"
5
#include "LkEngine/Asset/Asset.h"
6
7
#include "LkEngine/Serialization/Serializer.h"
8
#include "LkEngine/Serialization/FileStream.h"
9
10
11
namespace
LkEngine
{
12
13
struct
FEditorSettings
14
{
15
float
TranslationSnapValue = 0.10f;
16
float
RotationSnapValue = 5.0f;
17
float
ScaleSnapValue = 0.10f;
18
19
uint16_t ContentBrowserThumbnailSize = 128;
20
bool
bContentBrowserShowAssetTypes =
false
;
21
22
std::string Theme{};
23
24
static
FEditorSettings
& Get();
25
26
void
Save();
27
void
Load();
28
};
29
30
class
FEditorSettingsSerializer
31
{
32
public
:
33
FEditorSettingsSerializer
() =
default
;
34
~FEditorSettingsSerializer
() =
default
;
35
36
void
Serialize(
const
std::filesystem::path& EditorConfig);
37
void
Deserialize(
const
std::filesystem::path& EditorConfig,
FEditorSettings
& Settings);
38
39
private
:
40
void
SerializeToYaml(YAML::Emitter& Out,
const
FEditorSettings
& Settings);
41
bool
DeserializeFromYaml(
const
std::string& YamlString,
FEditorSettings
& Settings);
42
};
43
44
}
Object.h
LObject implementation.
LkEngine::FEditorSettingsSerializer
Definition
EditorSettings.h:31
LkEngine
Definition
Asset.h:11
LkEngine::FEditorSettings
Definition
EditorSettings.h:14
LkEngine
Source
LkEngine
Editor
EditorSettings.h
Generated by
1.12.0