diff options
author | AnaDenisa <anasecuiu@yahoo.com> | 2018-12-04 12:30:00 +0000 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-28 12:25:19 +0200 |
commit | 13279a7da7bf26a64efe91a3ea29139b0c73cd6d (patch) | |
tree | c518bff1a17e244cf2964e73a428c6b0d41fcaa6 /editor/editor_properties.h | |
parent | 7b10bae916dabcf1639fa1ee99c5fefd2790a1ca (diff) |
Add option to input value manually in EditorPropertyEasing
Double-clicking on the EditorPropertyEasing widget (e.g. for the Light
Attenuation parameter) shows an EditorSpinSlider to set the value manually.
Fixes #8449.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Diffstat (limited to 'editor/editor_properties.h')
-rw-r--r-- | editor/editor_properties.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/editor/editor_properties.h b/editor/editor_properties.h index 02d9349f2d..0a4a07cdc0 100644 --- a/editor/editor_properties.h +++ b/editor/editor_properties.h @@ -32,12 +32,12 @@ #define EDITOR_PROPERTIES_H #include "editor/create_dialog.h" -#include "editor/editor_file_system.h" #include "editor/editor_inspector.h" #include "editor/editor_spin_slider.h" #include "editor/property_selector.h" #include "editor/scene_tree_editor.h" #include "scene/gui/color_picker.h" +#include "scene/gui/line_edit.h" class EditorPropertyNil : public EditorProperty { GDCLASS(EditorPropertyNil, EditorProperty); @@ -308,7 +308,11 @@ class EditorPropertyEasing : public EditorProperty { GDCLASS(EditorPropertyEasing, EditorProperty); Control *easing_draw; PopupMenu *preset; + EditorSpinSlider *spin; + bool setting; + bool full; + bool flip; enum { EASING_ZERO, @@ -321,13 +325,16 @@ class EditorPropertyEasing : public EditorProperty { }; - bool flip; - void _drag_easing(const Ref<InputEvent> &p_ev); void _draw_easing(); - void _notification(int p_what); void _set_preset(int); + void _setup_spin(); + void _spin_value_changed(double p_value); + void _spin_focus_exited(); + + void _notification(int p_what); + protected: static void _bind_methods(); |