From 472da0edd23119a432f152d7b830c7424f0f5dc2 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Wed, 1 Mar 2023 13:47:25 -0800 Subject: [PATCH] add Hidden property to Mouse --- src/Input/Mouse.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Input/Mouse.cs b/src/Input/Mouse.cs index f92d3b5e..90d7bc9e 100644 --- a/src/Input/Mouse.cs +++ b/src/Input/Mouse.cs @@ -41,6 +41,17 @@ namespace MoonWorks.Input } } + private bool hidden; + public bool Hidden + { + get => hidden; + set + { + hidden = value; + SDL.SDL_ShowCursor(hidden ? SDL.SDL_DISABLE : SDL.SDL_ENABLE); + } + } + private readonly Dictionary CodeToButton; public Mouse()