Allow selection priority to be modified using a hotkey
This commit is contained in:
committed by
teinarss
parent
3e39ada304
commit
c1fc0c1b74
@@ -218,6 +218,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
{
|
||||
TooltipType = WorldTooltipType.None;
|
||||
ActorTooltipExtra = null;
|
||||
var modifiers = Game.GetModifierKeys();
|
||||
var cell = worldRenderer.Viewport.ViewToWorld(Viewport.LastMousePos);
|
||||
if (!world.Map.Contains(cell))
|
||||
return;
|
||||
@@ -231,7 +232,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
var worldPixel = worldRenderer.Viewport.ViewToWorldPx(Viewport.LastMousePos);
|
||||
var underCursor = world.ScreenMap.ActorsAtMouse(worldPixel)
|
||||
.Where(a => a.Actor.Info.HasTraitInfo<ITooltipInfo>() && !world.FogObscures(a.Actor))
|
||||
.WithHighestSelectionPriority(worldPixel);
|
||||
.WithHighestSelectionPriority(worldPixel, modifiers);
|
||||
|
||||
if (underCursor != null)
|
||||
{
|
||||
@@ -247,7 +248,7 @@ namespace OpenRA.Mods.Common.Widgets
|
||||
|
||||
var frozen = world.ScreenMap.FrozenActorsAtMouse(world.RenderPlayer, worldPixel)
|
||||
.Where(a => a.TooltipInfo != null && a.IsValid && a.Visible && !a.Hidden)
|
||||
.WithHighestSelectionPriority(worldPixel);
|
||||
.WithHighestSelectionPriority(worldPixel, modifiers);
|
||||
|
||||
if (frozen != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user