Restore ability to configure RMB orders + RMB panning.
This commit is contained in:
@@ -228,7 +228,8 @@ namespace OpenRA
|
|||||||
public int MouseScrollDeadzone = 8;
|
public int MouseScrollDeadzone = 8;
|
||||||
|
|
||||||
public bool UseClassicMouseStyle = false;
|
public bool UseClassicMouseStyle = false;
|
||||||
public bool ClassicMouseMiddleScroll = false;
|
public bool UseAlternateScrollButton = false;
|
||||||
|
|
||||||
public StatusBarsType StatusBars = StatusBarsType.Standard;
|
public StatusBarsType StatusBars = StatusBarsType.Standard;
|
||||||
public TargetLinesType TargetLines = TargetLinesType.Manual;
|
public TargetLinesType TargetLines = TargetLinesType.Manual;
|
||||||
public bool UsePlayerStanceColors = false;
|
public bool UsePlayerStanceColors = false;
|
||||||
|
|||||||
@@ -77,12 +77,6 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
var mouseControlDescClassic = widget.Get("MOUSE_CONTROL_DESC_CLASSIC");
|
var mouseControlDescClassic = widget.Get("MOUSE_CONTROL_DESC_CLASSIC");
|
||||||
mouseControlDescClassic.IsVisible = () => gs.UseClassicMouseStyle;
|
mouseControlDescClassic.IsVisible = () => gs.UseClassicMouseStyle;
|
||||||
|
|
||||||
var classicScrollRight = mouseControlDescClassic.Get("DESC_SCROLL_RIGHT");
|
|
||||||
classicScrollRight.IsVisible = () => !gs.ClassicMouseMiddleScroll;
|
|
||||||
|
|
||||||
var classicScrollMiddle = mouseControlDescClassic.Get("DESC_SCROLL_MIDDLE");
|
|
||||||
classicScrollMiddle.IsVisible = () => gs.ClassicMouseMiddleScroll;
|
|
||||||
|
|
||||||
var mouseControlDescModern = widget.Get("MOUSE_CONTROL_DESC_MODERN");
|
var mouseControlDescModern = widget.Get("MOUSE_CONTROL_DESC_MODERN");
|
||||||
mouseControlDescModern.IsVisible = () => !gs.UseClassicMouseStyle;
|
mouseControlDescModern.IsVisible = () => !gs.UseClassicMouseStyle;
|
||||||
|
|
||||||
@@ -92,6 +86,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
|
|
||||||
foreach (var container in new[] { mouseControlDescClassic, mouseControlDescModern })
|
foreach (var container in new[] { mouseControlDescClassic, mouseControlDescModern })
|
||||||
{
|
{
|
||||||
|
var classicScrollRight = container.Get("DESC_SCROLL_RIGHT");
|
||||||
|
classicScrollRight.IsVisible = () => gs.UseClassicMouseStyle ^ gs.UseAlternateScrollButton;
|
||||||
|
|
||||||
|
var classicScrollMiddle = container.Get("DESC_SCROLL_MIDDLE");
|
||||||
|
classicScrollMiddle.IsVisible = () => !gs.UseClassicMouseStyle ^ gs.UseAlternateScrollButton;
|
||||||
|
|
||||||
var zoomDesc = container.Get("DESC_ZOOM");
|
var zoomDesc = container.Get("DESC_ZOOM");
|
||||||
zoomDesc.IsVisible = () => gs.ZoomModifier == Modifiers.None;
|
zoomDesc.IsVisible = () => gs.ZoomModifier == Modifiers.None;
|
||||||
|
|
||||||
|
|||||||
@@ -505,7 +505,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
var gs = Game.Settings.Game;
|
var gs = Game.Settings.Game;
|
||||||
|
|
||||||
BindCheckboxPref(panel, "CLASSIC_MOUSE_MIDDLE_SCROLL_CHECKBOX", gs, "ClassicMouseMiddleScroll");
|
BindCheckboxPref(panel, "ALTERNATE_SCROLL_CHECKBOX", gs, "UseAlternateScrollButton");
|
||||||
BindCheckboxPref(panel, "EDGESCROLL_CHECKBOX", gs, "ViewportEdgeScroll");
|
BindCheckboxPref(panel, "EDGESCROLL_CHECKBOX", gs, "ViewportEdgeScroll");
|
||||||
BindCheckboxPref(panel, "LOCKMOUSE_CHECKBOX", gs, "LockMouseWindow");
|
BindCheckboxPref(panel, "LOCKMOUSE_CHECKBOX", gs, "LockMouseWindow");
|
||||||
BindSliderPref(panel, "ZOOMSPEED_SLIDER", gs, "ZoomSpeed");
|
BindSliderPref(panel, "ZOOMSPEED_SLIDER", gs, "ZoomSpeed");
|
||||||
@@ -520,23 +520,20 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
mouseScrollDropdown.OnMouseDown = _ => ShowMouseScrollDropdown(mouseScrollDropdown, gs);
|
mouseScrollDropdown.OnMouseDown = _ => ShowMouseScrollDropdown(mouseScrollDropdown, gs);
|
||||||
mouseScrollDropdown.GetText = () => gs.MouseScroll.ToString();
|
mouseScrollDropdown.GetText = () => gs.MouseScroll.ToString();
|
||||||
|
|
||||||
var classicMouseMiddleScrollCheckbox = panel.Get<CheckboxWidget>("CLASSIC_MOUSE_MIDDLE_SCROLL_CHECKBOX");
|
|
||||||
classicMouseMiddleScrollCheckbox.IsVisible = () => gs.UseClassicMouseStyle;
|
|
||||||
|
|
||||||
var mouseControlDescClassic = panel.Get("MOUSE_CONTROL_DESC_CLASSIC");
|
var mouseControlDescClassic = panel.Get("MOUSE_CONTROL_DESC_CLASSIC");
|
||||||
mouseControlDescClassic.IsVisible = () => gs.UseClassicMouseStyle;
|
mouseControlDescClassic.IsVisible = () => gs.UseClassicMouseStyle;
|
||||||
|
|
||||||
var classicScrollRight = mouseControlDescClassic.Get("DESC_SCROLL_RIGHT");
|
|
||||||
classicScrollRight.IsVisible = () => !gs.ClassicMouseMiddleScroll;
|
|
||||||
|
|
||||||
var classicScrollMiddle = mouseControlDescClassic.Get("DESC_SCROLL_MIDDLE");
|
|
||||||
classicScrollMiddle.IsVisible = () => gs.ClassicMouseMiddleScroll;
|
|
||||||
|
|
||||||
var mouseControlDescModern = panel.Get("MOUSE_CONTROL_DESC_MODERN");
|
var mouseControlDescModern = panel.Get("MOUSE_CONTROL_DESC_MODERN");
|
||||||
mouseControlDescModern.IsVisible = () => !gs.UseClassicMouseStyle;
|
mouseControlDescModern.IsVisible = () => !gs.UseClassicMouseStyle;
|
||||||
|
|
||||||
foreach (var container in new[] { mouseControlDescClassic, mouseControlDescModern })
|
foreach (var container in new[] { mouseControlDescClassic, mouseControlDescModern })
|
||||||
{
|
{
|
||||||
|
var classicScrollRight = container.Get("DESC_SCROLL_RIGHT");
|
||||||
|
classicScrollRight.IsVisible = () => gs.UseClassicMouseStyle ^ gs.UseAlternateScrollButton;
|
||||||
|
|
||||||
|
var classicScrollMiddle = container.Get("DESC_SCROLL_MIDDLE");
|
||||||
|
classicScrollMiddle.IsVisible = () => !gs.UseClassicMouseStyle ^ gs.UseAlternateScrollButton;
|
||||||
|
|
||||||
var zoomDesc = container.Get("DESC_ZOOM");
|
var zoomDesc = container.Get("DESC_ZOOM");
|
||||||
zoomDesc.IsVisible = () => gs.ZoomModifier == Modifiers.None;
|
zoomDesc.IsVisible = () => gs.ZoomModifier == Modifiers.None;
|
||||||
|
|
||||||
@@ -635,7 +632,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
|||||||
{
|
{
|
||||||
gs.UseClassicMouseStyle = dgs.UseClassicMouseStyle;
|
gs.UseClassicMouseStyle = dgs.UseClassicMouseStyle;
|
||||||
gs.MouseScroll = dgs.MouseScroll;
|
gs.MouseScroll = dgs.MouseScroll;
|
||||||
gs.ClassicMouseMiddleScroll = dgs.ClassicMouseMiddleScroll;
|
gs.UseAlternateScrollButton = dgs.UseAlternateScrollButton;
|
||||||
gs.LockMouseWindow = dgs.LockMouseWindow;
|
gs.LockMouseWindow = dgs.LockMouseWindow;
|
||||||
gs.ViewportEdgeScroll = dgs.ViewportEdgeScroll;
|
gs.ViewportEdgeScroll = dgs.ViewportEdgeScroll;
|
||||||
gs.ViewportEdgeScrollStep = dgs.ViewportEdgeScrollStep;
|
gs.ViewportEdgeScrollStep = dgs.ViewportEdgeScrollStep;
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
|
|
||||||
var gs = Game.Settings.Game;
|
var gs = Game.Settings.Game;
|
||||||
var scrollButton = gs.UseClassicMouseStyle && !gs.ClassicMouseMiddleScroll ? MouseButton.Right : MouseButton.Middle;
|
var scrollButton = gs.UseClassicMouseStyle ^ gs.UseAlternateScrollButton ? MouseButton.Right : MouseButton.Middle;
|
||||||
var scrollType = mi.Button.HasFlag(scrollButton) ? gs.MouseScroll : MouseScrollType.Disabled;
|
var scrollType = mi.Button.HasFlag(scrollButton) ? gs.MouseScroll : MouseScrollType.Disabled;
|
||||||
|
|
||||||
if (scrollType == MouseScrollType.Disabled)
|
if (scrollType == MouseScrollType.Disabled)
|
||||||
|
|||||||
@@ -190,7 +190,13 @@ Container@MAINMENU_INTRODUCTION_PROMPT:
|
|||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
||||||
LabelWithHighlight@DESC_SCROLL:
|
LabelWithHighlight@DESC_SCROLL_RIGHT:
|
||||||
|
X: 265
|
||||||
|
Y: 34
|
||||||
|
Height: 16
|
||||||
|
Font: Small
|
||||||
|
Text: - Pan the battlefield using the {Right} mouse button
|
||||||
|
LabelWithHighlight@DESC_SCROLL_MIDDLE:
|
||||||
X: 265
|
X: 265
|
||||||
Y: 34
|
Y: 34
|
||||||
Height: 16
|
Height: 16
|
||||||
|
|||||||
@@ -484,7 +484,12 @@ Container@SETTINGS_PANEL:
|
|||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
||||||
LabelWithHighlight@DESC_SCROLL:
|
LabelWithHighlight@DESC_SCROLL_RIGHT:
|
||||||
|
Y: 85
|
||||||
|
Height: 16
|
||||||
|
Font: Small
|
||||||
|
Text: - Pan the battlefield using the {Right} mouse button
|
||||||
|
LabelWithHighlight@DESC_SCROLL_MIDDLE:
|
||||||
Y: 85
|
Y: 85
|
||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
@@ -537,13 +542,13 @@ Container@SETTINGS_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Screen Edge Panning
|
Text: Screen Edge Panning
|
||||||
Checkbox@CLASSIC_MOUSE_MIDDLE_SCROLL_CHECKBOX:
|
Checkbox@ALTERNATE_SCROLL_CHECKBOX:
|
||||||
X: 360
|
X: 360
|
||||||
Y: 133
|
Y: 133
|
||||||
Width: 180
|
Width: 180
|
||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Middle Mouse Panning
|
Text: Alternate Mouse Panning
|
||||||
Label@SCROLL_SPEED_LABEL:
|
Label@SCROLL_SPEED_LABEL:
|
||||||
X: 310
|
X: 310
|
||||||
Y: 210
|
Y: 210
|
||||||
|
|||||||
@@ -185,7 +185,13 @@ Background@MAINMENU_INTRODUCTION_PROMPT:
|
|||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
||||||
LabelWithHighlight@DESC_SCROLL:
|
LabelWithHighlight@DESC_SCROLL_RIGHT:
|
||||||
|
X: 265
|
||||||
|
Y: 34
|
||||||
|
Height: 16
|
||||||
|
Font: Small
|
||||||
|
Text: - Pan the battlefield using the {Right} mouse button
|
||||||
|
LabelWithHighlight@DESC_SCROLL_MIDDLE:
|
||||||
X: 265
|
X: 265
|
||||||
Y: 34
|
Y: 34
|
||||||
Height: 16
|
Height: 16
|
||||||
|
|||||||
@@ -491,7 +491,12 @@ Background@SETTINGS_PANEL:
|
|||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
Text: - Zoom the battlefield using {MODIFIER + Scroll Wheel}
|
||||||
LabelWithHighlight@DESC_SCROLL:
|
LabelWithHighlight@DESC_SCROLL_RIGHT:
|
||||||
|
Y: 85
|
||||||
|
Height: 16
|
||||||
|
Font: Small
|
||||||
|
Text: - Pan the battlefield using the {Right} mouse button
|
||||||
|
LabelWithHighlight@DESC_SCROLL_MIDDLE:
|
||||||
Y: 85
|
Y: 85
|
||||||
Height: 16
|
Height: 16
|
||||||
Font: Small
|
Font: Small
|
||||||
@@ -544,13 +549,13 @@ Background@SETTINGS_PANEL:
|
|||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Screen Edge Panning
|
Text: Screen Edge Panning
|
||||||
Checkbox@CLASSIC_MOUSE_MIDDLE_SCROLL_CHECKBOX:
|
Checkbox@ALTERNATE_SCROLL_CHECKBOX:
|
||||||
X: 360
|
X: 360
|
||||||
Y: 133
|
Y: 133
|
||||||
Width: 180
|
Width: 180
|
||||||
Height: 20
|
Height: 20
|
||||||
Font: Regular
|
Font: Regular
|
||||||
Text: Middle Mouse Panning
|
Text: Alternate Mouse Panning
|
||||||
Label@SCROLL_SPEED_LABEL:
|
Label@SCROLL_SPEED_LABEL:
|
||||||
X: 305
|
X: 305
|
||||||
Y: 210
|
Y: 210
|
||||||
|
|||||||
Reference in New Issue
Block a user