diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-17 18:36:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-17 18:36:06 +0200 |
commit | 17304f1aaed434b0547606ff22721d65292d8cf1 (patch) | |
tree | 8b52f567244fe41a2776a49099ee8c7f300bfe40 /editor/editor_properties.h | |
parent | cfda0e377004a9399255105132ccb1a906e9f12e (diff) | |
parent | 0e1c66d9fced8f9d3a8fbd87ddfd2c29a9ed2679 (diff) |
Merge pull request #37949 from reduz/implement-global-shader-uniforms
Implement global and per instance shader uniforms.
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r-- | editor/editor_properties.h | 58 |
1 files changed, 53 insertions, 5 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h index c5fc8aaf77..61c11f4534 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -361,7 +361,7 @@ protected: public: virtual void update_property(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyVector2(); + EditorPropertyVector2(bool p_force_wide = false); }; class EditorPropertyRect2 : public EditorProperty { @@ -377,7 +377,7 @@ protected: public: virtual void update_property(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyRect2(); + EditorPropertyRect2(bool p_force_wide = false); }; class EditorPropertyVector3 : public EditorProperty { @@ -393,7 +393,55 @@ protected: public: virtual void update_property(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyVector3(); + EditorPropertyVector3(bool p_force_wide = false); +}; + +class EditorPropertyVector2i : public EditorProperty { + GDCLASS(EditorPropertyVector2i, EditorProperty); + EditorSpinSlider *spin[2]; + bool setting; + void _value_changed(double p_val, const String &p_name); + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property(); + void setup(int p_min, int p_max, bool p_no_slider); + EditorPropertyVector2i(bool p_force_wide = false); +}; + +class EditorPropertyRect2i : public EditorProperty { + GDCLASS(EditorPropertyRect2i, EditorProperty); + EditorSpinSlider *spin[4]; + bool setting; + void _value_changed(double p_val, const String &p_name); + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property(); + void setup(int p_min, int p_max, bool p_no_slider); + EditorPropertyRect2i(bool p_force_wide = false); +}; + +class EditorPropertyVector3i : public EditorProperty { + GDCLASS(EditorPropertyVector3i, EditorProperty); + EditorSpinSlider *spin[3]; + bool setting; + void _value_changed(double p_val, const String &p_name); + +protected: + void _notification(int p_what); + static void _bind_methods(); + +public: + virtual void update_property(); + void setup(int p_min, int p_max, bool p_no_slider); + EditorPropertyVector3i(bool p_force_wide = false); }; class EditorPropertyPlane : public EditorProperty { @@ -409,7 +457,7 @@ protected: public: virtual void update_property(); void setup(double p_min, double p_max, double p_step, bool p_no_slider); - EditorPropertyPlane(); + EditorPropertyPlane(bool p_force_wide = false); }; class EditorPropertyQuat : public EditorProperty { @@ -626,7 +674,7 @@ class EditorInspectorDefaultPlugin : public EditorInspectorPlugin { public: virtual bool can_handle(Object *p_object); virtual void parse_begin(Object *p_object); - virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage); + virtual bool parse_property(Object *p_object, Variant::Type p_type, const String &p_path, PropertyHint p_hint, const String &p_hint_text, int p_usage, bool p_wide = false); virtual void parse_end(); }; |