From 1cfb110d032d1ce5558c770c38267f880283dcc9 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 20 Apr 2019 11:32:12 +0100 Subject: [PATCH] Allow the cursor to be force disabled. --- OpenRA.Game/Game.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 3df37874bb..0e4f30a368 100644 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -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; @@ -659,8 +660,13 @@ namespace OpenRA if (ModData != null && ModData.CursorProvider != null) { - Cursor.SetCursor(Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default"); - Cursor.Render(Renderer); + if (HideCursor) + Cursor.SetCursor(null); + else + { + Cursor.SetCursor(Ui.Root.GetCursorOuter(Viewport.LastMousePos) ?? "default"); + Cursor.Render(Renderer); + } } }