summaryrefslogtreecommitdiffstats
path: root/scene/resources/theme.h
diff options
context:
space:
mode:
authorBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-07-05 23:32:52 +0300
committerBojidar Marinov <bojidar.marinov.bg@gmail.com>2019-07-05 23:32:52 +0300
commit17901da1a8a3f8351524db9b415459c17a00c1eb (patch)
treeb619f9e2e3010e742d73be7fc3e8656fbb91d36c /scene/resources/theme.h
parent4cb0887660861402fe6857662e622488adb86514 (diff)
downloadredot-engine-17901da1a8a3f8351524db9b415459c17a00c1eb.tar.gz
Keep track of default theme and project custom default theme seperatelly
Fixes #30288
Diffstat (limited to 'scene/resources/theme.h')
-rw-r--r--scene/resources/theme.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/resources/theme.h b/scene/resources/theme.h
index fb59073cbe..4c4f9b5aba 100644
--- a/scene/resources/theme.h
+++ b/scene/resources/theme.h
@@ -46,7 +46,6 @@ class Theme : public Resource {
GDCLASS(Theme, Resource);
RES_BASE_EXTENSION("theme");
- static Ref<Theme> default_theme;
void _emit_theme_changed();
HashMap<StringName, HashMap<StringName, Ref<Texture> > > icon_map;
@@ -61,6 +60,8 @@ protected:
bool _get(const StringName &p_name, Variant &r_ret) const;
void _get_property_list(List<PropertyInfo> *p_list) const;
+ static Ref<Theme> project_default_theme;
+ static Ref<Theme> default_theme;
static Ref<Texture> default_icon;
static Ref<StyleBox> default_style;
static Ref<Font> default_font;
@@ -137,6 +138,9 @@ public:
static Ref<Theme> get_default();
static void set_default(const Ref<Theme> &p_default);
+ static Ref<Theme> get_project_default();
+ static void set_project_default(const Ref<Theme> &p_default);
+
static void set_default_icon(const Ref<Texture> &p_icon);
static void set_default_style(const Ref<StyleBox> &p_style);
static void set_default_font(const Ref<Font> &p_font);