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

26
OpenRA.Game/Widgets/Delegates/SettingsMenuDelegate.cs Normal file → Executable file
View File

@@ -44,15 +44,23 @@ namespace OpenRA.Widgets.Delegates
else
Game.Settings.PlayerName = name.Text;
};
name.OnEnterKey = () => { name.LoseFocus(); return true; };
var edgeScroll = general.GetWidget<CheckboxWidget>("EDGE_SCROLL");
edgeScroll.Checked = () => Game.Settings.ViewportEdgeScroll;
edgeScroll.OnMouseDown = mi =>
{
Game.Settings.ViewportEdgeScroll ^= true;
return true;
};
name.OnEnterKey = () => { name.LoseFocus(); return true; };
var edgeScroll = general.GetWidget<CheckboxWidget>("EDGE_SCROLL");
edgeScroll.Checked = () => Game.Settings.ViewportEdgeScroll;
edgeScroll.OnMouseDown = mi =>
{
Game.Settings.ViewportEdgeScroll ^= true;
return true;
};
var inverseScroll = general.GetWidget<CheckboxWidget>("INVERSE_SCROLL");
inverseScroll.Checked = () => Game.Settings.InverseDragScroll;
inverseScroll.OnMouseDown = mi =>
{
Game.Settings.InverseDragScroll ^= true;
return true;
};
// Audio
var audio = bg.GetWidget("AUDIO_PANE");