summaryrefslogtreecommitdiffstats
path: root/editor/plugins/theme_editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/theme_editor_plugin.h')
-rw-r--r--editor/plugins/theme_editor_plugin.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index 077ce8e8f7..33accf587a 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -47,6 +47,7 @@ class OptionButton;
class PanelContainer;
class TabBar;
class TabContainer;
+class ThemeEditorPlugin;
class TextureRect;
class ThemeItemImportTree : public VBoxContainer {
@@ -320,6 +321,11 @@ public:
ThemeTypeDialog();
};
+// Custom `Label` needed to use `EditorHelpTooltip` to display theme item documentation.
+class ThemeItemLabel : public Label {
+ virtual Control *make_custom_tooltip(const String &p_text) const;
+};
+
class ThemeTypeEditor : public MarginContainer {
GDCLASS(ThemeTypeEditor, MarginContainer);
@@ -419,6 +425,9 @@ public:
class ThemeEditor : public VBoxContainer {
GDCLASS(ThemeEditor, VBoxContainer);
+ friend class ThemeEditorPlugin;
+ ThemeEditorPlugin *plugin = nullptr;
+
Ref<Theme> theme;
TabBar *preview_tabs = nullptr;
@@ -433,6 +442,7 @@ class ThemeEditor : public VBoxContainer {
void _theme_save_button_cbk(bool p_save_as);
void _theme_edit_button_cbk();
+ void _theme_close_button_cbk();
void _add_preview_button_cbk();
void _preview_scene_dialog_cbk(const String &p_path);
@@ -462,9 +472,10 @@ class ThemeEditorPlugin : public EditorPlugin {
public:
virtual String get_name() const override { return "Theme"; }
bool has_main_screen() const override { return false; }
- virtual void edit(Object *p_node) override;
- virtual bool handles(Object *p_node) const override;
+ virtual void edit(Object *p_object) override;
+ virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
+ virtual bool can_auto_hide() const override;
ThemeEditorPlugin();
};