Inverse Drag Scrolling
This commit is contained in:
committed by
Chris Forbes
parent
f6a880e524
commit
228852a55d
5
OpenRA.Game/Widgets/ViewportScrollControllerWidget.cs
Normal file → Executable file
5
OpenRA.Game/Widgets/ViewportScrollControllerWidget.cs
Normal file → Executable file
@@ -38,8 +38,9 @@ namespace OpenRA.Widgets
|
||||
{
|
||||
if (mi.Event == MouseInputEvent.Move &&
|
||||
(mi.Button == MouseButton.Middle || mi.Button == (MouseButton.Left | MouseButton.Right)))
|
||||
{
|
||||
Game.viewport.Scroll(Viewport.LastMousePos - mi.Location);
|
||||
{
|
||||
int InverseScroll = Game.Settings.InverseDragScroll ? -1 : 1;
|
||||
Game.viewport.Scroll((Viewport.LastMousePos - mi.Location) * InverseScroll);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user