hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/ui/theme.h
blob: da17c183a7fb1326bb9e07b86a6c7dddbfbadaac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once

#include <imgui.h>

#include <filesystem>
#include <string>
#include <vector>

namespace Hsdbg
{
    struct Theme
    {
        std::string name = "Midnight";

        ImVec4 text = ImVec4(0.925f, 0.933f, 0.953f, 1.00f);
        ImVec4 text_dim = ImVec4(0.514f, 0.545f, 0.620f, 1.00f);
        ImVec4 bg = ImVec4(0.082f, 0.086f, 0.110f, 1.00f);
        ImVec4 bg_low = ImVec4(0.063f, 0.067f, 0.086f, 1.00f);
        ImVec4 bg_high = ImVec4(0.118f, 0.125f, 0.157f, 1.00f);
        ImVec4 surface = ImVec4(0.149f, 0.161f, 0.200f, 1.00f);
        ImVec4 border = ImVec4(0.212f, 0.227f, 0.278f, 1.00f);

        ImVec4 accent = ImVec4(0.302f, 0.714f, 0.769f, 1.00f);
        float rounding = 6.0f;
        float window_border = 1.0f;

        ImVec4 syntax_keyword = ImVec4(0.337f, 0.612f, 0.839f, 1.00f);
        ImVec4 syntax_type = ImVec4(0.306f, 0.788f, 0.690f, 1.00f);
        ImVec4 syntax_string = ImVec4(0.808f, 0.569f, 0.471f, 1.00f);
        ImVec4 syntax_number = ImVec4(0.710f, 0.808f, 0.659f, 1.00f);
        ImVec4 syntax_comment = ImVec4(0.416f, 0.600f, 0.333f, 1.00f);
        ImVec4 syntax_preprocessor = ImVec4(0.773f, 0.525f, 0.753f, 1.00f);
        ImVec4 current_line = ImVec4(0.227f, 0.282f, 0.180f, 1.00f);
    };

    struct ThemeEntry
    {
        std::string id;
        std::string name;
        std::filesystem::path path;
    };

    auto default_theme() -> Theme;

    auto list_themes(const std::filesystem::path& dir) -> std::vector<ThemeEntry>;

    auto load_theme(const std::filesystem::path& path) -> Theme;
}