diff options
Diffstat (limited to 'scene/resources/theme.h')
-rw-r--r-- | scene/resources/theme.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/resources/theme.h b/scene/resources/theme.h index 9b84d0e8ad..1856bd4979 100644 --- a/scene/resources/theme.h +++ b/scene/resources/theme.h @@ -46,6 +46,15 @@ class Theme : public Resource { static Ref<Theme> default_theme; + + //keep a reference count to font, so each time the font changes, we emit theme changed too + Map< Ref<Font>, int> font_refcount; + + void _ref_font(Ref<Font> p_sc); + void _unref_font( Ref<Font> p_sc); + void _emit_theme_changed(); + + HashMap<StringName,HashMap<StringName,Ref<Texture>,StringNameHasher >, StringNameHasher > icon_map; HashMap<StringName,HashMap<StringName,Ref<StyleBox>,StringNameHasher >,StringNameHasher > style_map; HashMap<StringName,HashMap<StringName,Ref<Font>,StringNameHasher >,StringNameHasher > font_map; |