summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.h
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_inspector.h')
-rw-r--r--editor/editor_inspector.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 3c9ba9f39d..8c522f00ef 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -51,6 +51,13 @@ public:
class EditorProperty : public Container {
GDCLASS(EditorProperty, Container);
+public:
+ enum MenuItems {
+ MENU_COPY_PROPERTY,
+ MENU_PASTE_PROPERTY,
+ MENU_COPY_PROPERTY_PATH,
+ };
+
private:
String label;
int text_size;
@@ -84,6 +91,7 @@ private:
bool use_folding;
bool draw_top_bg;
+ void _ensure_popup();
bool _is_property_different(const Variant &p_current, const Variant &p_orig);
bool _get_instantiated_node_original_property(const StringName &p_prop, Variant &value);
void _focusable_focused(int p_index);
@@ -97,16 +105,19 @@ private:
Vector<Control *> focusables;
Control *label_reference;
Control *bottom_editor;
+ PopupMenu *menu;
mutable String tooltip_text;
Map<StringName, Variant> cache;
+ GDVIRTUAL0(_update_property)
protected:
void _notification(int p_what);
static void _bind_methods();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
+ virtual void unhandled_key_input(const Ref<InputEvent> &p_event) override;
public:
void emit_changed(const StringName &p_property, const Variant &p_value, const StringName &p_field = StringName(), bool p_changing = false);
@@ -174,6 +185,8 @@ public:
bool can_revert_to_default() const { return can_revert; }
+ void menu_option(int p_option);
+
EditorProperty();
};
@@ -192,6 +205,12 @@ class EditorInspectorPlugin : public RefCounted {
protected:
static void _bind_methods();
+ GDVIRTUAL1RC(bool, _can_handle, Variant)
+ GDVIRTUAL0(_parse_begin)
+ GDVIRTUAL2(_parse_category, Object *, String)
+ GDVIRTUAL7R(bool, _parse_property, Object *, int, String, int, String, int, bool)
+ GDVIRTUAL0(_parse_end)
+
public:
void add_custom_control(Control *control);
void add_property_editor(const String &p_for_property, Control *p_prop);
@@ -245,7 +264,7 @@ class EditorInspectorSection : public Container {
protected:
void _notification(int p_what);
static void _bind_methods();
- void _gui_input(const Ref<InputEvent> &p_event);
+ virtual void gui_input(const Ref<InputEvent> &p_event) override;
public:
virtual Size2 get_minimum_size() const override;
@@ -314,6 +333,7 @@ class EditorInspector : public ScrollContainer {
String property_prefix; //used for sectioned inspector
String object_class;
+ Variant property_clipboard;
bool restrict_to_basic = false;
@@ -405,6 +425,8 @@ public:
void set_use_deletable_properties(bool p_enabled);
void set_restrict_to_basic_settings(bool p_restrict);
+ void set_property_clipboard(const Variant &p_value);
+ Variant get_property_clipboard() const;
EditorInspector();
};