From 304a1f5b5a3ce6975952f5cd22d688a246367790 Mon Sep 17 00:00:00 2001 From: toger5 Date: Wed, 22 Feb 2017 00:45:31 +0200 Subject: Implemented scrolling factor for smooth trackpad scrolling Working platforms platform: OSX, Windows. Support for almost all ui elements, including project list. --- modules/gridmap/grid_map_editor_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gridmap/grid_map_editor_plugin.cpp') diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp index 39fe0a167..d8993710a 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; } -- cgit v1.2.3-70-g09d2