Fix selection cursor behaviour
Fix erroneous minimap selection cursor when not in classic mode Fix selection cursor not showing up with units selected when not in classic mouse style
This commit is contained in:
committed by
Paul Chote
parent
4c2f52a465
commit
032f20b622
@@ -101,11 +101,12 @@ namespace OpenRA.Mods.Common.Orders
|
||||
.Where(o => o != null && o.Cursor != null);
|
||||
|
||||
var cursorOrder = ordersWithCursor.MaxByOrDefault(o => o.Order.OrderPriority);
|
||||
if (cursorOrder != null)
|
||||
return cursorOrder.Cursor;
|
||||
|
||||
useSelect = target.Type == TargetType.Actor && target.Actor.Info.HasTraitInfo<ISelectableInfo>() &&
|
||||
(mi.Modifiers.HasModifier(Modifiers.Shift) || world.Selection.Actors.Count == 0);
|
||||
(cursorOrder == null || world.Selection.Actors.Count == 0 || !InputOverridesSelection(world, worldPixel, mi));
|
||||
|
||||
if (!useSelect && cursorOrder != null)
|
||||
return cursorOrder.Cursor;
|
||||
}
|
||||
|
||||
return useSelect ? worldSelectCursor : worldDefaultCursor;
|
||||
|
||||
@@ -307,8 +307,10 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var cursor = world.OrderGenerator.GetCursor(world, cell, worldPixel, mi);
|
||||
|
||||
if (cursor == null)
|
||||
return worldDefaultCursor;
|
||||
// We can't select through the minimap in Mouse Control Types other than Classic,
|
||||
// as they move the minimap on left click, so don't show the selection cursor for them
|
||||
if (cursor == null || (gameSettings.MouseControlStyle != MouseControlStyle.Classic && cursor == worldSelectCursor))
|
||||
cursor = worldDefaultCursor;
|
||||
|
||||
return modData.Cursors.ContainsKey(cursor + "-minimap") ? cursor + "-minimap" : cursor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user