diff options
author | toger5 <toger5@hotmail.de> | 2017-02-22 00:45:31 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-05-07 14:23:56 +0200 |
commit | 304a1f5b5a3ce6975952f5cd22d688a246367790 (patch) | |
tree | 14de7920daa3f90af91c668b3edcccdf439ed6f2 /core/os | |
parent | c8aea60324e3e219945a805f871363c10292f38b (diff) |
Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
Diffstat (limited to 'core/os')
-rw-r--r-- | core/os/input_event.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/os/input_event.h b/core/os/input_event.h index eb5c5685e5..93cceac27c 100644 --- a/core/os/input_event.h +++ b/core/os/input_event.h @@ -188,6 +188,7 @@ struct InputEventMouse { struct InputEventMouseButton : public InputEventMouse { + double factor; int button_index; bool pressed; //otherwise released bool doubleclick; //last even less than doubleclick time @@ -272,7 +273,10 @@ struct InputEvent { InputEvent xform_by(const Transform2D &p_xform) const; bool operator==(const InputEvent &p_event) const; operator String() const; - InputEvent() { zeromem(this, sizeof(InputEvent)); } + InputEvent() { + zeromem(this, sizeof(InputEvent)); + mouse_button.factor = 1; + } }; #endif |