1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Add viewport preview plugin and refactor TextureEditorPlugin

This commit is contained in:
Lightning_A
2021-03-21 15:33:17 -06:00
parent c5058d72d0
commit cf8de3b316
5 changed files with 156 additions and 116 deletions

View File

@@ -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<Texture> texture;
protected:
void _notification(int p_what);
void _gui_input(Ref<InputEvent> p_event);
void _changed_callback(Object *p_changed, const char *p_prop);
static void _bind_methods();
private:
TextureRect *texture_display;
public:
void edit(Ref<Texture> p_texture);
TextureEditor();
~TextureEditor();
TextureRect *get_texture_display();
TexturePreview(Ref<Texture> p_texture, bool p_show_metadata);
};
class EditorInspectorPluginTexture : public EditorInspectorPlugin {