You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +00:00
Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.
Ported from 304a1f5b5a (#7864).
Fixes #492 and #3913.
This commit is contained in:
@@ -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_val(floor->get_val() + 1);
|
||||
floor->set_val(floor->get_val() + 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_val(floor->get_val() - 1);
|
||||
floor->set_val(floor->get_val() - p_event.mouse_button.factor);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user