Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions editor/editor.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"InputSystem": {
"height": 991,
"height": 1009,
"inputSchemes": {
"Editor": {
"bools": [
Expand Down Expand Up @@ -91,7 +91,7 @@
},
"PhysicsSystem": {},
"UISystem": {
"height": 991,
"height": 1009,
"width": 1920
}
},
Expand Down
97 changes: 21 additions & 76 deletions editor/editor_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,79 +96,11 @@ bool EditorSystem::initialize(const JSON::json& systemData)
}
ImGui_ImplWin32_Init(Application::GetSingleton()->getWindow()->getWindowHandle());
ImGui_ImplDX11_Init(RenderingDevice::GetSingleton()->getDevice(), RenderingDevice::GetSingleton()->getContext());
ImGui::StyleColorsDark();

{
ImGuiStyle& style = ImGui::GetStyle();
style.WindowPadding = ImVec2(15, 15);
style.WindowRounding = 5.0f;
style.FramePadding = ImVec2(5, 5);
style.FrameRounding = 4.0f;
style.ItemSpacing = ImVec2(12, 6);
style.ItemInnerSpacing = ImVec2(8, 4);
style.IndentSpacing = 25.0f;
style.ScrollbarSize = 15.0f;
style.ScrollbarRounding = 9.0f;
style.GrabMinSize = 5.0f;
style.GrabRounding = 3.0f;

ImVec4* colors = ImGui::GetStyle().Colors;
colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.05f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_Border] = ImVec4(0.23f, 0.23f, 0.23f, 1.00f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.68f, 0.63f, 0.63f, 1.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_CheckMark] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.12f, 0.43f, 0.33f, 0.88f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.20f, 0.68f, 0.42f, 0.58f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.36f, 0.75f, 0.10f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Tab] = ImVec4(0.18f, 0.57f, 0.58f, 0.86f);
colors[ImGuiCol_TabHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_TabActive] = ImVec4(0.20f, 0.68f, 0.42f, 1.00f);
colors[ImGuiCol_TabUnfocused] = ImVec4(0.14f, 0.41f, 0.42f, 0.46f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.14f, 0.41f, 0.42f, 1.00f);
colors[ImGuiCol_DockingPreview] = ImVec4(0.00f, 1.00f, 0.21f, 0.70f);
colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
colors[ImGuiCol_TableHeaderBg] = ImVec4(0.19f, 0.19f, 0.20f, 1.00f);
colors[ImGuiCol_TableBorderStrong] = ImVec4(0.31f, 0.31f, 0.35f, 1.00f);
colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f);
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.48f);
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
}
m_Themes.push_back(std::make_unique<DarkTheme>());
m_Themes.push_back(std::make_unique<LightTheme>());
m_CurrentTheme = m_Themes.front().get();
m_CurrentTheme->apply();

return true;
}
Expand Down Expand Up @@ -416,6 +348,19 @@ void EditorSystem::drawDefaultUI(float deltaMilliseconds)
static bool styleEditor = false;
if (ImGui::BeginMenu("View"))
{
if (ImGui::BeginMenu("Theme"))
{
for (auto& theme : m_Themes)
{
if (ImGui::MenuItem(theme->getName().c_str(), "", m_CurrentTheme == theme.get()))
{
m_CurrentTheme = theme.get();
m_CurrentTheme->apply();
}
}
ImGui::EndMenu();
}

if (ImGui::Checkbox("Wireframe Mode", &m_WireframeMode))
{
if (m_WireframeMode)
Expand Down Expand Up @@ -979,18 +924,18 @@ int EditorSystem::exportScene(const String& sceneName, const String& sceneFilePa

for (auto& filePair : toCopy)
{
tasks.push_back(std::make_shared<Task>([=, &progress]() {
tasks.push_back(std::make_shared<Task>([=, &progress]()
{
progress++;
if (m_IsCopyFailed)
{
return;
}
m_IsCopyFailed = !OS::RelativeCopyFile(filePair.first, m_CurrExportDir + filePair.second);
}));
m_IsCopyFailed = !OS::RelativeCopyFile(filePair.first, m_CurrExportDir + filePair.second); }));
}

/// TODO: Fix the need for this dummy task (blocks the main thread while tasks are running)
tasks.push_back(std::make_shared<Task>([]() {}));
tasks.push_back(std::make_shared<Task>([]() { }));
progress++;

ThreadPool& threadPool = Application::GetSingleton()->getThreadPool();
Expand Down
7 changes: 7 additions & 0 deletions editor/editor_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

#include "Tracy/Tracy.hpp"

#include "themes/theme.h"
#include "themes/dark_theme.h"
#include "themes/light_theme.h"

ImColor ColorToImColor(Color& c);

class SceneDock;
Expand Down Expand Up @@ -82,6 +86,9 @@ class EditorSystem : public System
int exportScene(const String& sceneName, const String& sceneFilePath, Atomic<int>& progress);
void postExport();

Vector<std::unique_ptr<Theme>> m_Themes;
Theme* m_CurrentTheme = nullptr;

public:
static EditorSystem* GetSingleton();

Expand Down
90 changes: 90 additions & 0 deletions editor/themes/dark_theme.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
// dark_theme.cpp
#pragma once

#include "theme.h"

struct DarkTheme : public Theme
{
public:
void apply() const override
{
ImGui::StyleColorsDark();
ImGuiStyle& style = ImGui::GetStyle();

// Layout
style.WindowPadding = ImVec2(15, 15);
style.WindowRounding = 5.0f;
style.FramePadding = ImVec2(5, 5);
style.FrameRounding = 4.0f;
style.ItemSpacing = ImVec2(12, 6);
style.ItemInnerSpacing = ImVec2(8, 4);
style.IndentSpacing = 25.0f;
style.ScrollbarSize = 15.0f;
style.ScrollbarRounding = 9.0f;
style.GrabMinSize = 5.0f;
style.GrabRounding = 3.0f;

// Colors
ImVec4* colors = style.Colors;
colors[ImGuiCol_Text] = ImVec4(0.80f, 0.80f, 0.83f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.05f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_Border] = ImVec4(0.23f, 0.23f, 0.23f, 1.00f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.68f, 0.63f, 0.63f, 1.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.24f, 0.23f, 0.29f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.07f, 0.07f, 0.09f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.98f, 0.95f, 0.75f);
colors[ImGuiCol_MenuBarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.10f, 0.09f, 0.12f, 1.00f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_CheckMark] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.80f, 0.80f, 0.83f, 0.31f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.12f, 0.43f, 0.33f, 0.88f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.20f, 0.68f, 0.42f, 0.58f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.43f, 0.43f, 0.50f, 0.50f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.36f, 0.75f, 0.10f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
colors[ImGuiCol_Tab] = ImVec4(0.18f, 0.57f, 0.58f, 0.86f);
colors[ImGuiCol_TabHovered] = ImVec4(0.20f, 0.68f, 0.42f, 0.83f);
colors[ImGuiCol_TabActive] = ImVec4(0.20f, 0.68f, 0.42f, 1.00f);
colors[ImGuiCol_TabUnfocused] = ImVec4(0.14f, 0.41f, 0.42f, 0.46f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.14f, 0.41f, 0.42f, 1.00f);
colors[ImGuiCol_DockingPreview] = ImVec4(0.00f, 1.00f, 0.21f, 0.70f);
colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.20f, 0.20f, 0.20f, 1.00f);
colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
colors[ImGuiCol_TableHeaderBg] = ImVec4(0.19f, 0.19f, 0.20f, 1.00f);
colors[ImGuiCol_TableBorderStrong] = ImVec4(0.31f, 0.31f, 0.35f, 1.00f);
colors[ImGuiCol_TableBorderLight] = ImVec4(0.23f, 0.23f, 0.25f, 1.00f);
colors[ImGuiCol_TableRowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_TableRowBgAlt] = ImVec4(1.00f, 1.00f, 1.00f, 0.06f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.25f, 1.00f, 0.00f, 0.48f);
colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(1.00f, 0.98f, 0.95f, 0.73f);
}

String getName() const override
{
return "Dark";
}
};
89 changes: 89 additions & 0 deletions editor/themes/light_theme.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#pragma once

#include "theme.h"

class LightTheme : public Theme
{
public:
void apply() const override
{
ImGui::StyleColorsLight();
ImGuiStyle& style = ImGui::GetStyle();

// Layout
style.WindowPadding = ImVec2(15, 15);
style.WindowRounding = 5.0f;
style.FramePadding = ImVec2(5, 5);
style.FrameRounding = 4.0f;
style.ItemSpacing = ImVec2(12, 6);
style.ItemInnerSpacing = ImVec2(8, 4);
style.IndentSpacing = 25.0f;
style.ScrollbarSize = 15.0f;
style.ScrollbarRounding = 9.0f;
style.GrabMinSize = 5.0f;
style.GrabRounding = 3.0f;

// Colors
ImVec4* colors = style.Colors;
colors[ImGuiCol_Text] = ImVec4(0.10f, 0.10f, 0.10f, 1.00f);
colors[ImGuiCol_TextDisabled] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
colors[ImGuiCol_WindowBg] = ImVec4(0.95f, 0.96f, 0.98f, 1.00f);
colors[ImGuiCol_ChildBg] = ImVec4(0.98f, 0.98f, 0.98f, 1.00f);
colors[ImGuiCol_PopupBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.50f);
colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
colors[ImGuiCol_FrameBg] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.75f, 0.75f, 0.75f, 1.00f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.65f, 0.65f, 0.65f, 1.00f);
colors[ImGuiCol_TitleBg] = ImVec4(0.86f, 0.86f, 0.90f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.75f, 0.75f, 0.80f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.95f, 0.95f, 0.95f, 0.50f);
colors[ImGuiCol_MenuBarBg] = ImVec4(0.92f, 0.92f, 0.95f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.95f, 0.95f, 0.96f, 1.00f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.75f, 0.75f, 0.80f, 0.60f);
colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.65f, 0.65f, 0.70f, 0.80f);
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.60f, 0.60f, 0.65f, 1.00f);
colors[ImGuiCol_CheckMark] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.60f, 0.60f, 0.70f, 0.50f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.75f, 0.75f, 0.85f, 1.00f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.85f, 0.85f, 0.95f, 1.00f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.65f, 0.65f, 0.90f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.80f, 0.80f, 0.90f, 1.00f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.85f, 0.85f, 0.95f, 1.00f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.65f, 0.65f, 0.85f, 1.00f);
colors[ImGuiCol_Separator] = ImVec4(0.60f, 0.60f, 0.70f, 1.00f);
colors[ImGuiCol_SeparatorHovered] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f);
colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.50f, 0.80f, 1.00f);
colors[ImGuiCol_ResizeGrip] = ImVec4(0.90f, 0.90f, 0.90f, 0.30f);
colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.60f, 0.60f, 0.70f, 0.60f);
colors[ImGuiCol_ResizeGripActive] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f);
colors[ImGuiCol_Tab] = ImVec4(0.80f, 0.80f, 0.85f, 1.00f);
colors[ImGuiCol_TabHovered] = ImVec4(0.90f, 0.90f, 0.95f, 1.00f);
colors[ImGuiCol_TabActive] = ImVec4(0.70f, 0.70f, 0.90f, 1.00f);
colors[ImGuiCol_TabUnfocused] = ImVec4(0.92f, 0.92f, 0.92f, 0.90f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.75f, 0.75f, 0.85f, 1.00f);
colors[ImGuiCol_DockingPreview] = ImVec4(0.30f, 0.60f, 0.90f, 0.70f);
colors[ImGuiCol_DockingEmptyBg] = ImVec4(0.94f, 0.94f, 0.94f, 1.00f);
colors[ImGuiCol_PlotLines] = ImVec4(0.35f, 0.35f, 0.35f, 1.00f);
colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f);
colors[ImGuiCol_PlotHistogram] = ImVec4(0.30f, 0.45f, 0.60f, 1.00f);
colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.25f, 0.50f, 0.75f, 1.00f);
colors[ImGuiCol_TableHeaderBg] = ImVec4(0.85f, 0.85f, 0.90f, 1.00f);
colors[ImGuiCol_TableBorderStrong] = ImVec4(0.70f, 0.70f, 0.75f, 1.00f);
colors[ImGuiCol_TableBorderLight] = ImVec4(0.85f, 0.85f, 0.90f, 1.00f);
colors[ImGuiCol_TableRowBg] = ImVec4(1.00f, 1.00f, 1.00f, 0.00f);
colors[ImGuiCol_TableRowBgAlt] = ImVec4(0.95f, 0.95f, 0.95f, 0.30f);
colors[ImGuiCol_TextSelectedBg] = ImVec4(0.30f, 0.60f, 0.90f, 0.50f);
colors[ImGuiCol_DragDropTarget] = ImVec4(0.00f, 0.60f, 1.00f, 0.90f);
colors[ImGuiCol_NavHighlight] = ImVec4(0.30f, 0.60f, 0.90f, 1.00f);
colors[ImGuiCol_NavWindowingHighlight] = ImVec4(0.30f, 0.60f, 0.90f, 0.70f);
colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f);
colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.90f, 0.90f, 0.90f, 0.60f);
}

String getName() const override
{
return "Light";
}
};
11 changes: 11 additions & 0 deletions editor/themes/theme.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include "common/types.h"

struct Theme
{
public:
virtual void apply() const = 0;
virtual String getName() const = 0;
virtual ~Theme() = default;
};
Loading