looper/theme.h

43 lines
No EOL
1.1 KiB
C++

#pragma once
#include "config.h"
#include "imgui.h"
#include <set>
#include <map>
#include <string>
#include "file_browser.h"
#include <json/json.h>
#include <filesystem>
using std::string;
using namespace std::filesystem;
struct ThemeStrings {
string name;
string description;
ThemeStrings();
ThemeStrings(Json::Value config);
};
class Theme {
ImGuiStyle style;
public:
static std::set<path> availableThemes;
static std::map<path, ThemeStrings> themeStrings;
static void updateAvailableThemes();
static path themeDir;
static const char* prefPath;
static const int MinSchemaVersion = 0;
static const int MaxSchemaVersion = 1;
string file_path;
std::map<string, ThemeStrings> strings;
std::set<int> HueEnabledColors;
ThemeStrings GetStrings();
static bool ShowEditor(bool *open, Theme* &theme, ImGuiID dockid, int window_width, int window_height);
void Apply(float hue);
void Save(string path);
void Save(path path);
Theme();
Theme(bool dark);
Theme(string path);
Theme(path path);
};