aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_themes.cpp
diff options
context:
space:
mode:
authorNuno Donato2017-05-26 16:14:45 +0100
committerNuno Donato2017-05-26 17:16:15 +0100
commitfa5aa11898d897cdacd344e1c5d503e485483d51 (patch)
treecd7175ba5a2d7cdc837db0d510096a5c939f01be /editor/editor_themes.cpp
parentef66f8451ca7b5b98628924231a92e558930c53e (diff)
downloadgodot-fa5aa11898d897cdacd344e1c5d503e485483d51.tar.gz
godot-fa5aa11898d897cdacd344e1c5d503e485483d51.tar.zst
godot-fa5aa11898d897cdacd344e1c5d503e485483d51.zip
Added color presets for easy theme switching
Also tweaked the default colors (darker and less satured)
Diffstat (limited to '')
-rw-r--r--editor/editor_themes.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 9968b7304..bf15f43d3 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -96,8 +96,32 @@ Ref<Theme> create_editor_theme() {
// Define colors
Color highlight_color = EDITOR_DEF("interface/theme/highlight_color", Color::html("#b79047"));
- Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#213d4c"));
+ Color base_color = EDITOR_DEF("interface/theme/base_color", Color::html("#273241"));
float contrast = EDITOR_DEF("interface/theme/contrast", 0.25);
+ int preset = EDITOR_DEF("interface/theme/preset", 0);
+
+ switch (preset) {
+ case 0: { // Default
+ highlight_color = Color::html("#b79047");
+ base_color = Color::html("#273241");
+ contrast = 0.25;
+ } break;
+ case 1: { // Grey
+ highlight_color = Color::html("#3e3e3e");
+ base_color = Color::html("#3d3d3d");
+ contrast = 0.2;
+ } break;
+ case 2: { // Godot 2
+ highlight_color = Color::html("#86ace2");
+ base_color = Color::html("#3C3A44");
+ contrast = 0.25;
+ } break;
+ case 3: { // Arc
+ highlight_color = Color::html("#68a7f2");
+ base_color = Color::html("#434a59");
+ contrast = 0.2;
+ } break;
+ }
Color dark_color_1 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast);
Color dark_color_2 = base_color.linear_interpolate(Color(0, 0, 0, 1), contrast * 1.5);