mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-18 20:49:19 +02:00
pch migration to modules [wip]
This commit is contained in:
32
editor/editorSettings.cppm
Normal file
32
editor/editorSettings.cppm
Normal file
@@ -0,0 +1,32 @@
|
||||
module;
|
||||
|
||||
export module eu07.editor.editorsettings;
|
||||
|
||||
export {
|
||||
|
||||
class editorSettings
|
||||
{
|
||||
public:
|
||||
// camera movement key scheme in the editor
|
||||
enum class movement_scheme
|
||||
{
|
||||
wsad, // new default: W/S/A/D + E/Q
|
||||
legacy // old scheme: arrows + Page Up/Down
|
||||
};
|
||||
|
||||
editorSettings() = default;
|
||||
|
||||
bool load();
|
||||
bool save();
|
||||
|
||||
movement_scheme movement() const { return m_movement; }
|
||||
void movement(movement_scheme scheme) { m_movement = scheme; }
|
||||
|
||||
private:
|
||||
movement_scheme m_movement{movement_scheme::wsad};
|
||||
};
|
||||
|
||||
// global editor settings instance
|
||||
extern editorSettings EditorSettings;
|
||||
|
||||
} // export
|
||||
Reference in New Issue
Block a user