aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRémi Verschelde2017-05-15 07:57:05 +0200
committerGitHub2017-05-15 07:57:05 +0200
commitaa046a85dc791e07a243d63570987fbddb2f04c9 (patch)
treedfcffb375cedb43011e203bacea2f8d80182d5c8 /core
parentcaeee1784692cf15966a389a854eb09576b70848 (diff)
parentee670f3724bd388fe7a805d4a5b0e0ed058603a9 (diff)
downloadgodot-aa046a85dc791e07a243d63570987fbddb2f04c9.tar.gz
godot-aa046a85dc791e07a243d63570987fbddb2f04c9.tar.zst
godot-aa046a85dc791e07a243d63570987fbddb2f04c9.zip
Merge pull request #8740 from pixelpicosean/scrollingWithFactor
Implemented scrolling factor for precision trackpads for 2.1
Diffstat (limited to 'core')
-rw-r--r--core/os/input_event.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/os/input_event.h b/core/os/input_event.h
index 5b89d0d69..8d8623f41 100644
--- a/core/os/input_event.h
+++ b/core/os/input_event.h
@@ -203,6 +203,7 @@ struct InputEventMouse {
struct InputEventMouseButton : public InputEventMouse {
+ double factor;
int button_index;
bool pressed; //otherwise released
bool doubleclick; //last even less than doubleclick time
@@ -287,7 +288,10 @@ struct InputEvent {
InputEvent xform_by(const Matrix32 &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