Make UI cursors configurable.

This commit is contained in:
Matthias Mailänder
2020-10-18 18:37:04 +02:00
committed by Paul Chote
parent 96c4554644
commit e7cfd2765c
7 changed files with 28 additions and 5 deletions

View File

@@ -38,6 +38,7 @@ namespace OpenRA.Mods.Common.Widgets
readonly int cellWidth;
readonly int previewWidth;
readonly int previewHeight;
readonly string worldDefaultCursor = ChromeMetrics.Get<string>("WorldDefaultCursor");
float radarMinimapHeight;
int frame;
@@ -283,7 +284,7 @@ namespace OpenRA.Mods.Common.Widgets
var cursor = world.OrderGenerator.GetCursor(world, cell, worldPixel, mi);
if (cursor == null)
return "default";
return worldDefaultCursor;
return Game.ModData.CursorProvider.HasCursorSequence(cursor + "-minimap") ? cursor + "-minimap" : cursor;
}