diff options
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r-- | editor/editor_properties.h | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h index b82ef977ef..574767890c 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -106,6 +106,7 @@ class EditorPropertyPath : public EditorProperty { Vector<String> extensions; bool folder; bool global; + bool save_mode; EditorFileDialog *dialog; LineEdit *path; Button *path_edit; @@ -120,6 +121,7 @@ protected: public: void setup(const Vector<String> &p_extensions, bool p_folder, bool p_global); + void set_save_mode(); virtual void update_property(); EditorPropertyPath(); }; @@ -336,7 +338,7 @@ class EditorPropertyVector2 : public EditorProperty { GDCLASS(EditorPropertyVector2, EditorProperty) EditorSpinSlider *spin[2]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -352,7 +354,7 @@ class EditorPropertyRect2 : public EditorProperty { GDCLASS(EditorPropertyRect2, EditorProperty) EditorSpinSlider *spin[4]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -368,7 +370,7 @@ class EditorPropertyVector3 : public EditorProperty { GDCLASS(EditorPropertyVector3, EditorProperty) EditorSpinSlider *spin[3]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -384,7 +386,7 @@ class EditorPropertyPlane : public EditorProperty { GDCLASS(EditorPropertyPlane, EditorProperty) EditorSpinSlider *spin[4]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -400,7 +402,7 @@ class EditorPropertyQuat : public EditorProperty { GDCLASS(EditorPropertyQuat, EditorProperty) EditorSpinSlider *spin[4]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -416,7 +418,7 @@ class EditorPropertyAABB : public EditorProperty { GDCLASS(EditorPropertyAABB, EditorProperty) EditorSpinSlider *spin[6]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -432,7 +434,7 @@ class EditorPropertyTransform2D : public EditorProperty { GDCLASS(EditorPropertyTransform2D, EditorProperty) EditorSpinSlider *spin[6]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -448,7 +450,7 @@ class EditorPropertyBasis : public EditorProperty { GDCLASS(EditorPropertyBasis, EditorProperty) EditorSpinSlider *spin[9]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -464,7 +466,7 @@ class EditorPropertyTransform : public EditorProperty { GDCLASS(EditorPropertyTransform, EditorProperty) EditorSpinSlider *spin[12]; bool setting; - void _value_changed(double p_val); + void _value_changed(double p_val, const String &p_name); protected: void _notification(int p_what); @@ -497,6 +499,7 @@ class EditorPropertyNodePath : public EditorProperty { Button *clear; SceneTreeDialog *scene_tree; NodePath base_hint; + bool use_path_from_scene_root; Vector<StringName> valid_types; void _node_selected(const NodePath &p_path); @@ -509,10 +512,19 @@ protected: public: virtual void update_property(); - void setup(const NodePath &p_base_hint, Vector<StringName> p_valid_types); + void setup(const NodePath &p_base_hint, Vector<StringName> p_valid_types, bool p_use_path_from_scene_root = true); EditorPropertyNodePath(); }; +class EditorPropertyRID : public EditorProperty { + GDCLASS(EditorPropertyRID, EditorProperty) + Label *label; + +public: + virtual void update_property(); + EditorPropertyRID(); +}; + class EditorPropertyResource : public EditorProperty { GDCLASS(EditorPropertyResource, EditorProperty) @@ -569,6 +581,9 @@ class EditorPropertyResource : public EditorProperty { void _button_input(const Ref<InputEvent> &p_event); void _open_editor_pressed(); + void _fold_other_editors(Object *p_self); + + bool opened_editor; protected: static void _bind_methods(); |