You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
-Ability to open resources in the same window
-Plenty of fixes and improvements to new inspector -Fixes that were needed to make inspector work better
This commit is contained in:
@@ -35,28 +35,39 @@
|
||||
#include "editor/editor_plugin.h"
|
||||
#include "scene/gui/gradient_edit.h"
|
||||
|
||||
class GradientEditor : public GradientEdit {
|
||||
GDCLASS(GradientEditor, GradientEdit)
|
||||
|
||||
bool editing;
|
||||
Ref<Gradient> gradient;
|
||||
|
||||
void _gradient_changed();
|
||||
void _ramp_changed();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
virtual Size2 get_minimum_size() const;
|
||||
void set_gradient(const Ref<Gradient> &p_gradient);
|
||||
GradientEditor();
|
||||
};
|
||||
|
||||
class EditorInspectorPluginGradient : public EditorInspectorPlugin {
|
||||
GDCLASS(EditorInspectorPluginGradient, EditorInspectorPlugin)
|
||||
public:
|
||||
virtual bool can_handle(Object *p_object);
|
||||
virtual void parse_begin(Object *p_object);
|
||||
};
|
||||
|
||||
class GradientEditorPlugin : public EditorPlugin {
|
||||
|
||||
GDCLASS(GradientEditorPlugin, EditorPlugin);
|
||||
|
||||
Ref<Gradient> gradient_ref;
|
||||
GradientEdit *ramp_editor;
|
||||
EditorNode *editor;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
void _ramp_changed();
|
||||
void _undo_redo_gradient(const Vector<float> &offsets, const Vector<Color> &colors);
|
||||
|
||||
public:
|
||||
virtual String get_name() const { return "ColorRamp"; }
|
||||
bool has_main_screen() const { return false; }
|
||||
virtual void edit(Object *p_object);
|
||||
virtual bool handles(Object *p_object) const;
|
||||
virtual void make_visible(bool p_visible);
|
||||
|
||||
GradientEditorPlugin(EditorNode *p_node);
|
||||
~GradientEditorPlugin();
|
||||
};
|
||||
|
||||
#endif /* TOOLS_EDITOR_PLUGINS_COLOR_RAMP_EDITOR_PLUGIN_H_ */
|
||||
|
||||
Reference in New Issue
Block a user