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 /modules/gridmap | |
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 'modules/gridmap')
-rw-r--r-- | modules/gridmap/grid_map_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 39fe0a1675..d8993710a4 100644 --- a/modules/gridmap/grid_map_editor_plugin.cpp +++ b/modules/gridmap/grid_map_editor_plugin.cpp @@ -519,12 +519,12 @@ bool GridMapEditor::forward_spatial_input_event(Camera *p_camera, const InputEve if (p_event.mouse_button.button_index == BUTTON_WHEEL_UP && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) { if (p_event.mouse_button.pressed) - floor->set_value(floor->get_value() + 1); + floor->set_value(floor->get_value() + p_event.mouse_button.factor); return true; //eaten } else if (p_event.mouse_button.button_index == BUTTON_WHEEL_DOWN && (p_event.mouse_button.mod.command || p_event.mouse_button.mod.shift)) { if (p_event.mouse_button.pressed) - floor->set_value(floor->get_value() - 1); + floor->set_value(floor->get_value() - p_event.mouse_button.factor); return true; } |