diff --git a/OpenRA.Game/Input/InputHandler.cs b/OpenRA.Game/Input/InputHandler.cs index 79fb87f130..7923978688 100755 --- a/OpenRA.Game/Input/InputHandler.cs +++ b/OpenRA.Game/Input/InputHandler.cs @@ -49,4 +49,23 @@ namespace OpenRA Sync.CheckSyncUnchanged(world, () => Ui.HandleInput(input)); } } + + public class MouseButtonPreference + { + public MouseButton Action + { + get + { + return Game.Settings.Game.UseClassicMouseStyle ? MouseButton.Left : MouseButton.Right; + } + } + + public MouseButton Cancel + { + get + { + return Game.Settings.Game.UseClassicMouseStyle ? MouseButton.Right : MouseButton.Left; + } + } + } } diff --git a/OpenRA.Game/Orders/UnitOrderGenerator.cs b/OpenRA.Game/Orders/UnitOrderGenerator.cs index fe54431119..6095444fec 100644 --- a/OpenRA.Game/Orders/UnitOrderGenerator.cs +++ b/OpenRA.Game/Orders/UnitOrderGenerator.cs @@ -88,6 +88,20 @@ namespace OpenRA.Orders return cursorOrder != null ? cursorOrder.Cursor : (useSelect ? "select" : "default"); } + // Used for classic mouse orders, determines whether or not action at xy is move or select + public static bool InputOverridesSelection(World world, int2 xy, MouseInput mi) + { + var target = Target.FromActor(world.ScreenMap.ActorsAt(xy).WithHighestSelectionPriority()); + var underCursor = world.Selection.Actors.WithHighestSelectionPriority(); + + var o = OrderForUnit(underCursor, target, mi); + + if (o != null && o.Order.OverrideSelection) + return false; + + return true; + } + static UnitOrderResult OrderForUnit(Actor self, Target target, MouseInput mi) { if (self.Owner != self.World.LocalPlayer) @@ -96,7 +110,7 @@ namespace OpenRA.Orders if (self.Destroyed || !target.IsValidFor(self)) return null; - if (mi.Button == MouseButton.Right) + if (mi.Button == Game.Settings.Game.MouseButtonPreference.Action) { foreach (var o in self.TraitsImplementing() .SelectMany(trait => trait.Orders diff --git a/OpenRA.Game/Settings.cs b/OpenRA.Game/Settings.cs index 265166385c..8e29368030 100644 --- a/OpenRA.Game/Settings.cs +++ b/OpenRA.Game/Settings.cs @@ -127,9 +127,12 @@ namespace OpenRA public bool ViewportEdgeScroll = true; public bool LockMouseWindow = false; public MouseScrollType MouseScroll = MouseScrollType.Standard; + public MouseButtonPreference MouseButtonPreference = new MouseButtonPreference(); public float ViewportEdgeScrollStep = 10f; public float UIScrollSpeed = 50f; + public int SelectionDeadzone = 24; + public bool UseClassicMouseStyle = false; public bool AlwaysShowStatusBars = false; public bool TeamHealthColors = false; diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index fd0091d7ba..9edb9b8932 100644 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -79,6 +79,7 @@ namespace OpenRA.Traits int OrderPriority { get; } bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor); bool IsQueued { get; } + bool OverrideSelection { get; } } public interface IResolveOrder { void ResolveOrder(Actor self, Order order); } diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index cdf82eab71..c6ec62f6fc 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -40,7 +40,7 @@ namespace OpenRA.Widgets { if (!IsDragging) { - foreach (var u in SelectActorsInBox(World, lastMousePosition, lastMousePosition, _ => true)) + foreach (var u in SelectActorsInBoxWithDeadzone(World, lastMousePosition, lastMousePosition, _ => true)) worldRenderer.DrawRollover(u); return; @@ -48,13 +48,16 @@ namespace OpenRA.Widgets var selbox = SelectionBox; Game.Renderer.WorldLineRenderer.DrawRect(selbox.Value.First.ToFloat2(), selbox.Value.Second.ToFloat2(), Color.White); - foreach (var u in SelectActorsInBox(World, selbox.Value.First, selbox.Value.Second, _ => true)) + foreach (var u in SelectActorsInBoxWithDeadzone(World, selbox.Value.First, selbox.Value.Second, _ => true)) worldRenderer.DrawRollover(u); } public override bool HandleMouseInput(MouseInput mi) { var xy = worldRenderer.Viewport.ViewToWorldPx(mi.Location); + + var useClassicMouseStyle = Game.Settings.Game.UseClassicMouseStyle; + var hasBox = SelectionBox != null; var multiClick = mi.MultiTapCount >= 2; @@ -65,8 +68,15 @@ namespace OpenRA.Widgets dragStart = xy; - // place buildings - ApplyOrders(World, xy, mi); + // Place buildings, use support powers, and other non-unit things + if (!(World.OrderGenerator is UnitOrderGenerator)) + { + ApplyOrders(World, xy, mi); + dragStart = dragEnd = null; + YieldMouseFocus(mi); + lastMousePosition = xy; + return true; + } } if (mi.Button == MouseButton.Left && mi.Event == MouseInputEvent.Move && dragStart.HasValue) @@ -76,6 +86,24 @@ namespace OpenRA.Widgets { if (World.OrderGenerator is UnitOrderGenerator) { + if (useClassicMouseStyle && HasMouseFocus) + { + if (!hasBox && World.Selection.Actors.Any() && !multiClick) + { + if (!(World.ScreenMap.ActorsAt(xy).Where(x => x.HasTrait() && x.Trait().Info.Selectable && + (x.Owner.IsAlliedWith(World.RenderPlayer) || !World.FogObscures(x))).Any() && !mi.Modifiers.HasModifier(Modifiers.Ctrl) && + !mi.Modifiers.HasModifier(Modifiers.Alt) && UnitOrderGenerator.InputOverridesSelection(World, xy, mi))) + { + // Order units instead of selecting + ApplyOrders(World, xy, mi); + dragStart = dragEnd = null; + YieldMouseFocus(mi); + lastMousePosition = xy; + return true; + } + } + } + if (multiClick) { var unit = World.ScreenMap.ActorsAt(xy) @@ -88,7 +116,7 @@ namespace OpenRA.Widgets } else if (dragStart.HasValue) { - var newSelection = SelectActorsInBox(World, dragStart.Value, xy, _ => true); + var newSelection = SelectActorsInBoxWithDeadzone(World, dragStart.Value, xy, _ => true); World.Selection.Combine(World, newSelection, mi.Modifiers.HasModifier(Modifiers.Shift), dragStart == xy); } } @@ -97,9 +125,17 @@ namespace OpenRA.Widgets YieldMouseFocus(mi); } - // don't issue orders while selecting - if (mi.Button == MouseButton.Right && mi.Event == MouseInputEvent.Down && !hasBox) - ApplyOrders(World, xy, mi); + if (mi.Button == MouseButton.Right && mi.Event == MouseInputEvent.Down) + { + // Don't do anything while selecting + if (!hasBox) + { + if (useClassicMouseStyle) + World.Selection.Clear(); + + ApplyOrders(World, xy, mi); + } + } lastMousePosition = xy; @@ -110,7 +146,7 @@ namespace OpenRA.Widgets { get { - return dragStart.HasValue && dragEnd.HasValue; + return dragStart.HasValue && dragEnd.HasValue && (dragStart.Value - dragEnd.Value).Length > Game.Settings.Game.SelectionDeadzone; } } @@ -172,7 +208,7 @@ namespace OpenRA.Widgets var mi = new MouseInput { Location = screenPos, - Button = MouseButton.Right, + Button = Game.Settings.Game.MouseButtonPreference.Action, Modifiers = Game.GetModifierKeys() }; @@ -224,6 +260,14 @@ namespace OpenRA.Widgets return false; } + static IEnumerable SelectActorsInBoxWithDeadzone(World world, int2 a, int2 b, Func cond) + { + if (a == b || (a - b).Length > Game.Settings.Game.SelectionDeadzone) + return SelectActorsInBox(world, a, b, cond); + else + return SelectActorsInBox(world, b, b, cond); + } + static IEnumerable SelectActorsInBox(World world, int2 a, int2 b, Func cond) { return world.ScreenMap.ActorsInBox(a, b) diff --git a/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs b/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs index 567f41baeb..b7c9af5e59 100644 --- a/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs +++ b/OpenRA.Mods.Cnc/Traits/SupportPowers/IonCannonPower.cs @@ -45,6 +45,10 @@ namespace OpenRA.Mods.Cnc.Traits public override IOrderGenerator OrderGenerator(string order, SupportPowerManager manager) { + // Clear selection if using Left-Click Orders + if (Game.Settings.Game.UseClassicMouseStyle) + manager.Self.World.Selection.Clear(); + Sound.PlayToPlayer(manager.Self.Owner, Info.SelectTargetSound); var info = Info as IonCannonPowerInfo; return new SelectGenericPowerTarget(order, manager, info.Cursor, MouseButton.Left); diff --git a/OpenRA.Mods.Common/Orders/DeployOrderTargeter.cs b/OpenRA.Mods.Common/Orders/DeployOrderTargeter.cs index 605c017ee8..5450883ed4 100644 --- a/OpenRA.Mods.Common/Orders/DeployOrderTargeter.cs +++ b/OpenRA.Mods.Common/Orders/DeployOrderTargeter.cs @@ -32,6 +32,7 @@ namespace OpenRA.Mods.Common.Orders public string OrderID { get; private set; } public int OrderPriority { get; private set; } + public bool OverrideSelection { get { return true; } } public bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs index 606a00accd..b4571b498e 100644 --- a/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs +++ b/OpenRA.Mods.Common/Orders/PlaceBuildingOrderGenerator.cs @@ -34,6 +34,10 @@ namespace OpenRA.Mods.Common.Orders producer = queue.Actor; building = name; + // Clear selection if using Left-Click Orders + if (Game.Settings.Game.UseClassicMouseStyle) + producer.World.Selection.Clear(); + var map = producer.World.Map; var tileset = producer.World.TileSet.Id.ToLowerInvariant(); buildingInfo = map.Rules.Actors[building].Traits.Get(); diff --git a/OpenRA.Mods.Common/Orders/UnitOrderTargeter.cs b/OpenRA.Mods.Common/Orders/UnitOrderTargeter.cs index 02bcb33995..13ac615446 100644 --- a/OpenRA.Mods.Common/Orders/UnitOrderTargeter.cs +++ b/OpenRA.Mods.Common/Orders/UnitOrderTargeter.cs @@ -31,6 +31,7 @@ namespace OpenRA.Mods.Common.Orders public string OrderID { get; private set; } public int OrderPriority { get; private set; } public bool? ForceAttack = null; + public bool OverrideSelection { get { return true; } } public abstract bool CanTargetActor(Actor self, Actor target, TargetModifiers modifiers, ref string cursor); public abstract bool CanTargetFrozenActor(Actor self, FrozenActor target, TargetModifiers modifiers, ref string cursor); diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 9adb07ed5e..bf679bed0e 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -302,6 +302,7 @@ namespace OpenRA.Mods.Common.Traits { public string OrderID { get { return "Move"; } } public int OrderPriority { get { return 4; } } + public bool OverrideSelection { get { return false; } } readonly AircraftInfo info; diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 6f53c583ad..d91c486af3 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -194,6 +194,7 @@ namespace OpenRA.Mods.Common.Traits public string OrderID { get; private set; } public int OrderPriority { get; private set; } + public bool OverrideSelection { get { return true; } } bool CanTargetActor(Actor self, Target target, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs b/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs index 40bb681cc0..98e65ccea0 100644 --- a/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs +++ b/OpenRA.Mods.Common/Traits/Buildings/RallyPoint.cs @@ -56,6 +56,7 @@ namespace OpenRA.Mods.Common.Traits { public string OrderID { get { return "SetRallyPoint"; } } public int OrderPriority { get { return 0; } } + public bool OverrideSelection { get { return true; } } public bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.Common/Traits/Guard.cs b/OpenRA.Mods.Common/Traits/Guard.cs index 2e0c4a30f3..0c856daec6 100644 --- a/OpenRA.Mods.Common/Traits/Guard.cs +++ b/OpenRA.Mods.Common/Traits/Guard.cs @@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Traits public IEnumerable Order(World world, CPos xy, MouseInput mi) { - if (mi.Button == MouseButton.Left) + if (mi.Button == Game.Settings.Game.MouseButtonPreference.Cancel) { world.CancelInputMode(); yield break; diff --git a/OpenRA.Mods.Common/Traits/Harvester.cs b/OpenRA.Mods.Common/Traits/Harvester.cs index 568d36e1c0..42e672e4ea 100644 --- a/OpenRA.Mods.Common/Traits/Harvester.cs +++ b/OpenRA.Mods.Common/Traits/Harvester.cs @@ -445,6 +445,7 @@ namespace OpenRA.Mods.Common.Traits public string OrderID { get { return "Harvest"; } } public int OrderPriority { get { return 10; } } public bool IsQueued { get; protected set; } + public bool OverrideSelection { get { return true; } } public bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.Common/Traits/Mobile.cs b/OpenRA.Mods.Common/Traits/Mobile.cs index 64e520218d..fd50b2b4bc 100644 --- a/OpenRA.Mods.Common/Traits/Mobile.cs +++ b/OpenRA.Mods.Common/Traits/Mobile.cs @@ -619,6 +619,7 @@ namespace OpenRA.Mods.Common.Traits { readonly MobileInfo unitType; readonly bool rejectMove; + public bool OverrideSelection { get { return false; } } public MoveOrderTargeter(Actor self, MobileInfo unitType) { diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs index 71eeb15d39..76080d3239 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/GrantUpgradePower.cs @@ -102,6 +102,10 @@ namespace OpenRA.Mods.Common.Traits public SelectTarget(World world, string order, SupportPowerManager manager, GrantUpgradePower power) { + // Clear selection if using Left-Click Orders + if (Game.Settings.Game.UseClassicMouseStyle) + manager.Self.World.Selection.Clear(); + this.manager = manager; this.order = order; this.power = power; diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs index 85f123158e..395833905e 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SupportPowerManager.cs @@ -239,6 +239,10 @@ namespace OpenRA.Mods.Common.Traits public SelectGenericPowerTarget(string order, SupportPowerManager manager, string cursor, MouseButton button) { + // Clear selection if using Left-Click Orders + if (Game.Settings.Game.UseClassicMouseStyle) + manager.Self.World.Selection.Clear(); + this.manager = manager; this.order = order; this.cursor = cursor; diff --git a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs index 30d15c34e7..9934948cb2 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/SettingsLogic.cs @@ -312,6 +312,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic var gs = Game.Settings.Game; var ks = Game.Settings.Keys; + BindCheckboxPref(panel, "CLASSICORDERS_CHECKBOX", gs, "UseClassicMouseStyle"); BindCheckboxPref(panel, "EDGESCROLL_CHECKBOX", gs, "ViewportEdgeScroll"); BindCheckboxPref(panel, "LOCKMOUSE_CHECKBOX", gs, "LockMouseWindow"); BindSliderPref(panel, "SCROLLSPEED_SLIDER", gs, "ViewportEdgeScrollStep"); @@ -472,6 +473,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic return () => { + gs.UseClassicMouseStyle = dgs.UseClassicMouseStyle; gs.MouseScroll = dgs.MouseScroll; gs.LockMouseWindow = dgs.LockMouseWindow; gs.ViewportEdgeScroll = dgs.ViewportEdgeScroll; diff --git a/OpenRA.Mods.Common/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.Common/Widgets/WorldCommandWidget.cs index fd9a392925..b40633b46f 100644 --- a/OpenRA.Mods.Common/Widgets/WorldCommandWidget.cs +++ b/OpenRA.Mods.Common/Widgets/WorldCommandWidget.cs @@ -98,7 +98,7 @@ namespace OpenRA.Mods.Common.Widgets if (actors.Any()) world.OrderGenerator = new GenericSelectTarget(actors, - "AttackMove", "attackmove", MouseButton.Right); + "AttackMove", "attackmove", Game.Settings.Game.MouseButtonPreference.Action); return true; } diff --git a/OpenRA.Mods.RA/Traits/Minelayer.cs b/OpenRA.Mods.RA/Traits/Minelayer.cs index 721540a673..fda7ea187b 100644 --- a/OpenRA.Mods.RA/Traits/Minelayer.cs +++ b/OpenRA.Mods.RA/Traits/Minelayer.cs @@ -146,7 +146,7 @@ namespace OpenRA.Mods.RA.Traits public IEnumerable Order(World world, CPos xy, MouseInput mi) { - if (mi.Button == MouseButton.Left) + if (mi.Button == Game.Settings.Game.MouseButtonPreference.Cancel) { world.CancelInputMode(); yield break; @@ -157,7 +157,7 @@ namespace OpenRA.Mods.RA.Traits .MaxByOrDefault(a => a.Info.Traits.Contains() ? a.Info.Traits.Get().Priority : int.MinValue); - if (mi.Button == MouseButton.Right && underCursor == null) + if (mi.Button == Game.Settings.Game.MouseButtonPreference.Action && underCursor == null) { minelayer.World.CancelInputMode(); yield return new Order("PlaceMinefield", minelayer, false) { TargetLocation = xy }; @@ -197,6 +197,7 @@ namespace OpenRA.Mods.RA.Traits { public string OrderID { get { return "BeginMinefield"; } } public int OrderPriority { get { return 5; } } + public bool OverrideSelection { get { return true; } } public bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor) { diff --git a/OpenRA.Mods.RA/Traits/PortableChrono.cs b/OpenRA.Mods.RA/Traits/PortableChrono.cs index 9d72c6e854..5c7328f66a 100644 --- a/OpenRA.Mods.RA/Traits/PortableChrono.cs +++ b/OpenRA.Mods.RA/Traits/PortableChrono.cs @@ -119,6 +119,7 @@ namespace OpenRA.Mods.RA.Traits public string OrderID { get { return "PortableChronoTeleport"; } } public int OrderPriority { get { return 5; } } public bool IsQueued { get; protected set; } + public bool OverrideSelection { get { return true; } } public bool CanTarget(Actor self, Target target, List othersAtTarget, TargetModifiers modifiers, ref string cursor) { @@ -153,7 +154,7 @@ namespace OpenRA.Mods.RA.Traits public IEnumerable Order(World world, CPos xy, MouseInput mi) { - if (mi.Button == MouseButton.Left) + if (mi.Button == Game.Settings.Game.MouseButtonPreference.Cancel) { world.CancelInputMode(); yield break; diff --git a/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs index da1481c69d..ea433fbbdc 100644 --- a/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.RA/Traits/SupportPowers/ChronoshiftPower.cs @@ -101,6 +101,10 @@ namespace OpenRA.Mods.RA.Traits public SelectTarget(World world, string order, SupportPowerManager manager, ChronoshiftPower power) { + // Clear selection if using Left-Click Orders + if (Game.Settings.Game.UseClassicMouseStyle) + manager.Self.World.Selection.Clear(); + this.manager = manager; this.order = order; this.power = power; diff --git a/mods/cnc/chrome/settings.yaml b/mods/cnc/chrome/settings.yaml index 7760764ece..e20b0219f5 100644 --- a/mods/cnc/chrome/settings.yaml +++ b/mods/cnc/chrome/settings.yaml @@ -320,53 +320,16 @@ Container@SETTINGS_PANEL: Font: Bold Text: Input Align: Center - Checkbox@EDGESCROLL_CHECKBOX: + Checkbox@CLASSICORDERS_CHECKBOX: X: 15 Y: 40 - Width: 130 - Height: 20 - Font: Regular - Text: Edge Scrolling - Checkbox@LOCKMOUSE_CHECKBOX: - X: 15 - Y: 70 - Width: 130 - Height: 20 - Font: Regular - Text: Lock mouse to window - Label@SCROLL_SPEED_LABEL: - X: PARENT_RIGHT - WIDTH - 270 - Y: 37 - Width: 95 - Height: 25 - Text: Scroll Speed: - Align: Right - Slider@SCROLLSPEED_SLIDER: - X: PARENT_RIGHT - WIDTH - 15 - Y: 43 Width: 250 Height: 20 - Ticks: 5 - MinimumValue: 10 - MaximumValue: 50 - Label@UI_SCROLL_SPEED_LABEL: - X: PARENT_RIGHT - WIDTH - 270 - Y: 67 - Width: 95 - Height: 25 - Text: UI Scroll Speed: - Align: Right - Slider@UI_SCROLLSPEED_SLIDER: - X: PARENT_RIGHT - WIDTH - 15 - Y: 73 - Width: 250 - Height: 20 - Ticks: 5 - MinimumValue: 1 - MaximumValue: 100 + Font: Regular + Text: Left-Click Orders Label@MOUSE_SCROLL_LABEL: X: PARENT_RIGHT - WIDTH - 120 - Y: 99 + Y: 39 Width: 160 Height: 20 Font: Regular @@ -374,11 +337,55 @@ Container@SETTINGS_PANEL: Align: Right DropDownButton@MOUSE_SCROLL: X: PARENT_RIGHT - WIDTH - 15 - Y: 98 + Y: 38 Width: 100 Height: 25 Font: Regular Text: Enabled + Checkbox@EDGESCROLL_CHECKBOX: + X: 15 + Y: 70 + Width: 130 + Height: 20 + Font: Regular + Text: Edge Scrolling + Checkbox@LOCKMOUSE_CHECKBOX: + X: 15 + Y: 100 + Width: 130 + Height: 20 + Font: Regular + Text: Lock mouse to window + Label@SCROLL_SPEED_LABEL: + X: PARENT_RIGHT - WIDTH - 270 + Y: 67 + Width: 95 + Height: 25 + Text: Scroll Speed: + Align: Right + Slider@SCROLLSPEED_SLIDER: + X: PARENT_RIGHT - WIDTH - 15 + Y: 73 + Width: 250 + Height: 20 + Ticks: 5 + MinimumValue: 10 + MaximumValue: 50 + Label@UI_SCROLL_SPEED_LABEL: + X: PARENT_RIGHT - WIDTH - 270 + Y: 97 + Width: 95 + Height: 25 + Text: UI Scroll Speed: + Align: Right + Slider@UI_SCROLLSPEED_SLIDER: + X: PARENT_RIGHT - WIDTH - 15 + Y: 103 + Width: 250 + Height: 20 + Ticks: 5 + MinimumValue: 1 + MaximumValue: 100 Label@HOTKEYS_TITLE: Y: 135 Width: PARENT_RIGHT diff --git a/mods/ra/chrome/settings.yaml b/mods/ra/chrome/settings.yaml index bc60296a97..846da5cf86 100644 --- a/mods/ra/chrome/settings.yaml +++ b/mods/ra/chrome/settings.yaml @@ -324,53 +324,16 @@ Background@SETTINGS_PANEL: Width: PARENT_RIGHT - 10 Height: PARENT_BOTTOM Children: - Checkbox@EDGESCROLL_CHECKBOX: + Checkbox@CLASSICORDERS_CHECKBOX: X: 15 Y: 40 - Width: 130 - Height: 20 - Font: Regular - Text: Edge Scrolling - Checkbox@LOCKMOUSE_CHECKBOX: - X: 15 - Y: 70 - Width: 130 - Height: 20 - Font: Regular - Text: Lock mouse to window - Label@SCROLL_SPEED_LABEL: - X: PARENT_RIGHT - WIDTH - 270 - Y: 37 - Width: 95 - Height: 25 - Text: Scroll Speed: - Align: Right - Slider@SCROLLSPEED_SLIDER: - X: PARENT_RIGHT - WIDTH - 15 - Y: 43 Width: 250 Height: 20 - Ticks: 5 - MinimumValue: 10 - MaximumValue: 50 - Label@UI_SCROLL_SPEED_LABEL: - X: PARENT_RIGHT - WIDTH - 270 - Y: 67 - Width: 95 - Height: 25 - Text: UI Scroll Speed: - Align: Right - Slider@UI_SCROLLSPEED_SLIDER: - X: PARENT_RIGHT - WIDTH - 15 - Y: 73 - Width: 250 - Height: 20 - Ticks: 5 - MinimumValue: 1 - MaximumValue: 100 + Font: Regular + Text: Left-Click Orders Label@MOUSE_SCROLL_LABEL: X: PARENT_RIGHT - WIDTH - 120 - Y: 99 + Y: 39 Width: 160 Height: 20 Font: Regular @@ -378,11 +341,55 @@ Background@SETTINGS_PANEL: Align: Right DropDownButton@MOUSE_SCROLL: X: PARENT_RIGHT - WIDTH - 15 - Y: 98 + Y: 38 Width: 100 Height: 25 Font: Regular Text: Enabled + Checkbox@EDGESCROLL_CHECKBOX: + X: 15 + Y: 70 + Width: 130 + Height: 20 + Font: Regular + Text: Edge Scrolling + Checkbox@LOCKMOUSE_CHECKBOX: + X: 15 + Y: 100 + Width: 130 + Height: 20 + Font: Regular + Text: Lock mouse to window + Label@SCROLL_SPEED_LABEL: + X: PARENT_RIGHT - WIDTH - 270 + Y: 67 + Width: 95 + Height: 25 + Text: Scroll Speed: + Align: Right + Slider@SCROLLSPEED_SLIDER: + X: PARENT_RIGHT - WIDTH - 15 + Y: 73 + Width: 250 + Height: 20 + Ticks: 5 + MinimumValue: 10 + MaximumValue: 50 + Label@UI_SCROLL_SPEED_LABEL: + X: PARENT_RIGHT - WIDTH - 270 + Y: 97 + Width: 95 + Height: 25 + Text: UI Scroll Speed: + Align: Right + Slider@UI_SCROLLSPEED_SLIDER: + X: PARENT_RIGHT - WIDTH - 15 + Y: 103 + Width: 250 + Height: 20 + Ticks: 5 + MinimumValue: 1 + MaximumValue: 100 Label@HOTKEYS_TITLE: Y: 135 Width: PARENT_RIGHT