diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-25 11:13:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-25 11:13:27 +0200 |
commit | 3084a48ace3e7dabd83e4c62280328f429defad6 (patch) | |
tree | 1390e9c68aea9b9ab8802b8e3d82605997f7eb95 /editor/editor_properties.h | |
parent | cc09dc92c8ee06255a158d81533d35c6d2e8d31e (diff) | |
parent | 455c06ecd466424cdf1b444a7c289b322390e795 (diff) |
Merge pull request #63219 from reduz/implement-vector4-projection
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r-- | editor/editor_properties.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 7bec2d0013..b3aac6e8ca 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -636,6 +636,40 @@ public: EditorPropertyQuaternion(); }; +class EditorPropertyVector4 : public EditorProperty { + GDCLASS(EditorPropertyVector4, EditorProperty); + EditorSpinSlider *spin[4]; + bool setting = false; + void _value_changed(double p_val, const String &p_name); + +protected: + virtual void _set_read_only(bool p_read_only) override; + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property() override; + void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String()); + EditorPropertyVector4(); +}; + +class EditorPropertyVector4i : public EditorProperty { + GDCLASS(EditorPropertyVector4i, EditorProperty); + EditorSpinSlider *spin[4]; + bool setting = false; + void _value_changed(double p_val, const String &p_name); + +protected: + virtual void _set_read_only(bool p_read_only) override; + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property() override; + void setup(double p_min, double p_max, bool p_no_slider, const String &p_suffix = String()); + EditorPropertyVector4i(); +}; + class EditorPropertyAABB : public EditorProperty { GDCLASS(EditorPropertyAABB, EditorProperty); EditorSpinSlider *spin[6]; @@ -705,6 +739,24 @@ public: EditorPropertyTransform3D(); }; +class EditorPropertyProjection : public EditorProperty { + GDCLASS(EditorPropertyProjection, EditorProperty); + EditorSpinSlider *spin[16]; + bool setting = false; + void _value_changed(double p_val, const String &p_name); + +protected: + virtual void _set_read_only(bool p_read_only) override; + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property() override; + virtual void update_using_transform(Projection p_transform); + void setup(double p_min, double p_max, double p_step, bool p_no_slider, const String &p_suffix = String()); + EditorPropertyProjection(); +}; + class EditorPropertyColor : public EditorProperty { GDCLASS(EditorPropertyColor, EditorProperty); ColorPickerButton *picker = nullptr; |