Polyphase Game Engine
Loading...
Searching...
No Matches
EditorTheme.h
Go to the documentation of this file.
1#pragma once
2
3#if EDITOR
4
5#include <string>
6#include <vector>
7
8enum class EditorThemeType
9{
10 Dark,
11 Light,
12 FutureDark,
13 Classic,
14
15 Count,
16
17 Custom = 100 // Custom themes use indices 100+
18};
19
20// Helpers for custom theme types
21inline bool IsCustomTheme(EditorThemeType type) { return static_cast<int>(type) >= static_cast<int>(EditorThemeType::Custom); }
22inline int GetCustomThemeIndex(EditorThemeType type) { return static_cast<int>(type) - static_cast<int>(EditorThemeType::Custom); }
23inline EditorThemeType MakeCustomThemeType(int customIndex) { return static_cast<EditorThemeType>(static_cast<int>(EditorThemeType::Custom) + customIndex); }
24
25namespace EditorTheme
26{
27 // Get list of available theme names for UI (built-in + custom)
28 const std::vector<std::string>& GetThemeNames();
29
30 // Rebuild theme names list (call after importing/removing custom themes)
31 void RefreshThemeNames();
32
33 // Apply a theme by type
34 void ApplyTheme(EditorThemeType type);
35
36 // Get theme type from name
37 EditorThemeType GetThemeTypeFromName(const std::string& name);
38
39 // Get theme name from type
40 const char* GetThemeName(EditorThemeType type);
41
42 // Individual theme application functions (for adding new themes)
43 void ApplyDarkTheme();
44 void ApplyLightTheme();
45 void ApplyFutureDarkTheme();
46 void ApplyClassicTheme();
47}
48
49#endif