summaryrefslogtreecommitdiff
path: root/editor/plugins/texture_region_editor_plugin.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/texture_region_editor_plugin.h')
-rw-r--r--editor/plugins/texture_region_editor_plugin.h33
1 files changed, 17 insertions, 16 deletions
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 2c4ab72743..dd92f6e3eb 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -41,8 +41,8 @@
class ViewPanner;
-class TextureRegionEditor : public VBoxContainer {
- GDCLASS(TextureRegionEditor, VBoxContainer);
+class TextureRegionEditor : public AcceptDialog {
+ GDCLASS(TextureRegionEditor, AcceptDialog);
enum SnapMode {
SNAP_NONE,
@@ -142,26 +142,27 @@ public:
TextureRegionEditor();
};
-class TextureRegionEditorPlugin : public EditorPlugin {
- GDCLASS(TextureRegionEditorPlugin, EditorPlugin);
+//
- bool manually_hidden;
- Button *texture_region_button = nullptr;
- TextureRegionEditor *region_editor = nullptr;
+class EditorInspectorPluginTextureRegion : public EditorInspectorPlugin {
+ GDCLASS(EditorInspectorPluginTextureRegion, EditorInspectorPlugin);
-protected:
- static void _bind_methods();
+ TextureRegionEditor *texture_region_editor = nullptr;
+
+ void _region_edit(Object *p_object);
- void _editor_visiblity_changed();
+public:
+ virtual bool can_handle(Object *p_object) override;
+ virtual bool parse_property(Object *p_object, const Variant::Type p_type, const String &p_path, const PropertyHint p_hint, const String &p_hint_text, const uint32_t p_usage, const bool p_wide) override;
+
+ EditorInspectorPluginTextureRegion();
+};
+
+class TextureRegionEditorPlugin : public EditorPlugin {
+ GDCLASS(TextureRegionEditorPlugin, EditorPlugin);
public:
virtual String get_name() const override { return "TextureRegion"; }
- bool has_main_screen() const override { return false; }
- virtual void edit(Object *p_object) override;
- virtual bool handles(Object *p_object) const override;
- virtual void make_visible(bool p_visible) override;
- void set_state(const Dictionary &p_state) override;
- Dictionary get_state() const override;
TextureRegionEditorPlugin();
};