1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Merge pull request #81523 from KoBeWi/epic_self_roast

Allow contextual plugins to persist temporarily
This commit is contained in:
Rémi Verschelde
2023-10-06 16:50:53 +02:00
8 changed files with 151 additions and 18 deletions

View File

@@ -47,6 +47,7 @@ class OptionButton;
class PanelContainer;
class TabBar;
class TabContainer;
class ThemeEditorPlugin;
class TextureRect;
class ThemeItemImportTree : public VBoxContainer {
@@ -424,6 +425,9 @@ public:
class ThemeEditor : public VBoxContainer {
GDCLASS(ThemeEditor, VBoxContainer);
friend class ThemeEditorPlugin;
ThemeEditorPlugin *plugin = nullptr;
Ref<Theme> theme;
TabBar *preview_tabs = nullptr;
@@ -438,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);
@@ -467,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();
};