diff options
Diffstat (limited to 'editor/editor_help.h')
-rw-r--r-- | editor/editor_help.h | 49 |
1 files changed, 33 insertions, 16 deletions
diff --git a/editor/editor_help.h b/editor/editor_help.h index 81cd6d6674..b2ffe3bc29 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -125,25 +125,33 @@ class EditorHelp : public VBoxContainer { String base_path; - Color text_color; - Color title_color; - Color headline_color; - Color comment_color; - Color symbol_color; - Color value_color; - Color qualifier_color; - Color type_color; - - Ref<Font> doc_font; - Ref<Font> doc_bold_font; - Ref<Font> doc_title_font; - Ref<Font> doc_code_font; - - int doc_title_font_size; + struct ThemeCache { + Ref<StyleBox> background_style; + + Color text_color; + Color title_color; + Color headline_color; + Color comment_color; + Color symbol_color; + Color value_color; + Color qualifier_color; + Color type_color; + + Ref<Font> doc_font; + Ref<Font> doc_bold_font; + Ref<Font> doc_italic_font; + Ref<Font> doc_title_font; + Ref<Font> doc_code_font; + Ref<Font> doc_kbd_font; + + int doc_font_size = 0; + int doc_title_font_size = 0; + int doc_code_font_size = 0; + int doc_kbd_font_size = 0; + } theme_cache; int scroll_to = -1; - void _update_theme(); void _help_callback(const String &p_topic); void _add_text(const String &p_bbcode); @@ -156,6 +164,13 @@ class EditorHelp : public VBoxContainer { void _add_bulletpoint(); + void _push_normal_font(); + void _pop_normal_font(); + void _push_title_font(); + void _pop_title_font(); + void _push_code_font(); + void _pop_code_font(); + void _class_desc_finished(); void _class_list_select(const String &p_select); void _class_desc_select(const String &p_select); @@ -181,6 +196,8 @@ class EditorHelp : public VBoxContainer { static void _gen_doc_thread(void *p_udata); protected: + virtual void _update_theme_item_cache() override; + void _notification(int p_what); static void _bind_methods(); |