summaryrefslogtreecommitdiffstats
path: root/editor/plugins/texture_editor_plugin.h
diff options
context:
space:
mode:
authorLightning_A <aaronjrecord@gmail.com>2021-03-21 15:33:17 -0600
committerLightning_A <aaronjrecord@gmail.com>2021-07-12 20:04:46 -0600
commitb09f68176847cde02a7aeec1b5a102805c688073 (patch)
treed6d4d05ac6bf2dcff27297893c7e09225eac9644 /editor/plugins/texture_editor_plugin.h
parentfc00a8390193220cea702d9ab684fb6c53d97a6b (diff)
downloadredot-engine-b09f68176847cde02a7aeec1b5a102805c688073.tar.gz
Add viewport preview plugin
Also includes a minor refactor of TextureEditorPlugin.
Diffstat (limited to 'editor/plugins/texture_editor_plugin.h')
-rw-r--r--editor/plugins/texture_editor_plugin.h18
1 files changed, 6 insertions, 12 deletions
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index ebe8882194..165090be93 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -35,21 +35,15 @@
#include "editor/editor_plugin.h"
#include "scene/resources/texture.h"
-class TextureEditor : public Control {
- GDCLASS(TextureEditor, Control);
+class TexturePreview : public MarginContainer {
+ GDCLASS(TexturePreview, MarginContainer);
- Ref<Texture2D> texture;
-
-protected:
- void _notification(int p_what);
- void _gui_input(Ref<InputEvent> p_event);
- void _texture_changed();
- static void _bind_methods();
+private:
+ TextureRect *texture_display;
public:
- void edit(Ref<Texture2D> p_texture);
- TextureEditor();
- ~TextureEditor();
+ TextureRect *get_texture_display();
+ TexturePreview(Ref<Texture2D> p_texture, bool p_show_metadata);
};
class EditorInspectorPluginTexture : public EditorInspectorPlugin {