Polyphase Game Engine
Loading...
Searching...
No Matches
AppearanceModule.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include "../PreferencesModule.h"
6
7class AppearanceModule : public PreferencesModule
8{
9public:
10 DECLARE_PREFERENCES_MODULE(AppearanceModule)
11
12 AppearanceModule();
13 virtual ~AppearanceModule();
14
15 virtual const char* GetName() const override { return GetStaticName(); }
16 virtual const char* GetParentPath() const override { return GetStaticParentPath(); }
17 virtual void Render() override;
18 virtual void LoadSettings(const rapidjson::Document& doc) override;
19 virtual void SaveSettings(rapidjson::Document& doc) override;
20
21 // Reads the saved text scale straight from disk. The editor fonts are
22 // loaded before PreferencesManager exists, so EditorImguiInit uses this.
23 static float LoadSavedTextScale();
24
25private:
26 float mTabRoundingLeft = 0.0f;
27 float mTabRoundingRight = 0.0f;
28 float mTextScale = 1.0f;
29
30 // Slider edit buffers. Nothing is applied until Apply / Reset is pressed.
31 float mPendingTextScale = 1.0f;
32 float mPendingInterfaceScale = 1.0f;
33 float mSeenInterfaceScale = 0.0f;
34
35 void ApplyTabRounding();
36 void ApplyTextScale(float scale);
37};
38
39#endif
Definition JsonHelpers.h:15