Mercurial > minori
comparison include/core/config.h @ 102:b315f3759c56
*: big patch
1. use a wrapper for mINI that enables case sensitivity
(personal preference)
2. rename dark_theme.cc to theme.cc and change it to be
a class
3. include the "dep" folder so we don't have stupidity in
json.h or ini.h
4. I think the graph was also tweaked a lot in this, nothing
is constexpr and size is found at runtime...
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Fri, 03 Nov 2023 21:32:52 -0400 |
| parents | c537996cf67b |
| children | 2004b41d4a59 |
comparison
equal
deleted
inserted
replaced
| 101:c537996cf67b | 102:b315f3759c56 |
|---|---|
| 1 #ifndef __core__config_h | 1 #ifndef __core__config_h |
| 2 #define __core__config_h | 2 #define __core__config_h |
| 3 | 3 |
| 4 #include "core/anime.h" | 4 #include "core/anime.h" |
| 5 | 5 #include "gui/theme.h" |
| 6 enum class Themes { | |
| 7 LIGHT, | |
| 8 DARK, | |
| 9 OS // AKA "Default" | |
| 10 }; | |
| 11 | 6 |
| 12 class Config { | 7 class Config { |
| 13 public: | 8 public: |
| 14 int Load(); | 9 int Load(); |
| 15 int Save(); | 10 int Save(); |
| 16 | 11 |
| 17 Anime::Services service; | 12 Anime::Services service; |
| 18 Themes theme; | 13 Theme::Theme theme; |
| 19 | 14 |
| 20 struct { | 15 struct { |
| 21 public: | 16 public: |
| 22 Anime::TitleLanguage language; | 17 Anime::TitleLanguage language; |
| 23 bool display_aired_episodes; | 18 bool display_aired_episodes; |
| 32 std::string username; | 27 std::string username; |
| 33 int user_id; | 28 int user_id; |
| 34 } anilist; | 29 } anilist; |
| 35 }; | 30 }; |
| 36 | 31 |
| 32 #define WIDEIFY_EX(x) L##x | |
| 33 #define WIDEIFY(x) WIDEIFY_EX(x) | |
| 37 #define CONFIG_DIR "minori" | 34 #define CONFIG_DIR "minori" |
| 35 #define CONFIG_WDIR WIDEIFY(CONFIG_DIR) | |
| 38 #define CONFIG_NAME "config.ini" | 36 #define CONFIG_NAME "config.ini" |
| 37 #define CONFIG_WNAME WIDEIFY(CONFIG_NAME) | |
| 39 | 38 |
| 40 #define MAX_LINE_LENGTH 256 | 39 #define MAX_LINE_LENGTH 256 |
| 41 | 40 |
| 42 #endif // __core__config_h | 41 #endif // __core__config_h |
