Re-active Edge-Scrolling for inverted Mouse-Scrolling

This commit is contained in:
Kanar
2017-12-29 18:58:06 +01:00
committed by Paul Chote
parent 2400b152ea
commit dc46dd1f26

View File

@@ -368,7 +368,7 @@ namespace OpenRA.Mods.Common.Widgets
else if (mi.Event == MouseInputEvent.Move && (isStandardScrolling || else if (mi.Event == MouseInputEvent.Move && (isStandardScrolling ||
(standardScrollStart.HasValue && ((standardScrollStart.Value - mi.Location).Length > Game.Settings.Game.MouseScrollDeadzone)))) (standardScrollStart.HasValue && ((standardScrollStart.Value - mi.Location).Length > Game.Settings.Game.MouseScrollDeadzone))))
{ {
isStandardScrolling = true; isStandardScrolling = scrollType == MouseScrollType.Standard;
var d = scrollType == MouseScrollType.Inverted ? -1 : 1; var d = scrollType == MouseScrollType.Inverted ? -1 : 1;
worldRenderer.Viewport.Scroll((Viewport.LastMousePos - mi.Location) * d, false); worldRenderer.Viewport.Scroll((Viewport.LastMousePos - mi.Location) * d, false);
return true; return true;