Unhardcode support power blocked cursor.
This commit is contained in:
committed by
Gustas
parent
fc4ebf332d
commit
69d9bbb400
@@ -283,12 +283,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
public class SelectGenericPowerTarget : OrderGenerator
|
||||
{
|
||||
readonly SupportPowerManager manager;
|
||||
readonly string cursor;
|
||||
readonly SupportPowerInfo info;
|
||||
readonly MouseButton expectedButton;
|
||||
|
||||
public string OrderKey { get; }
|
||||
|
||||
public SelectGenericPowerTarget(string order, SupportPowerManager manager, string cursor, MouseButton button)
|
||||
public SelectGenericPowerTarget(string order, SupportPowerManager manager, SupportPowerInfo info, MouseButton button)
|
||||
{
|
||||
// Clear selection if using Left-Click Orders
|
||||
if (Game.Settings.Game.UseClassicMouseStyle)
|
||||
@@ -296,7 +296,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
this.manager = manager;
|
||||
OrderKey = order;
|
||||
this.cursor = cursor;
|
||||
this.info = info;
|
||||
expectedButton = button;
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
protected override IEnumerable<IRenderable> RenderAnnotations(WorldRenderer wr, World world) { yield break; }
|
||||
protected override string GetCursor(World world, CPos cell, int2 worldPixel, MouseInput mi)
|
||||
{
|
||||
return world.Map.Contains(cell) ? cursor : "generic-blocked";
|
||||
return world.Map.Contains(cell) ? info.Cursor : info.BlockedCursor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user