Inverse Drag Scrolling

This commit is contained in:
Caleb Anderson
2010-08-15 16:00:38 -05:00
committed by Chris Forbes
parent f6a880e524
commit 228852a55d
5 changed files with 37 additions and 13 deletions

5
OpenRA.Game/Widgets/ViewportScrollControllerWidget.cs Normal file → Executable file
View 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;