Allow the cursor to be force disabled.

This commit is contained in:
Paul Chote
2019-04-20 11:32:12 +01:00
committed by reaperrr
parent f731c09086
commit 1cfb110d03

View File

@@ -39,6 +39,7 @@ namespace OpenRA
public static ModData ModData;
public static Settings Settings;
public static ICursor Cursor;
public static bool HideCursor;
static WorldRenderer worldRenderer;
internal static OrderManager OrderManager;
@@ -658,11 +659,16 @@ namespace OpenRA
Ui.Draw();
if (ModData != null && ModData.CursorProvider != null)
{
if (HideCursor)
Cursor.SetCursor(null);
else
{
Cursor.SetCursor(Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default");
Cursor.Render(Renderer);
}
}
}
using (new PerfSample("render_flip"))
Renderer.EndFrame(new DefaultInputHandler(OrderManager.World));