From 129a24300dfae4ffcf93654c811a6bc6e6c4591f Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Wed, 4 May 2022 22:39:06 -0700 Subject: [PATCH] SDL2: Reveal the ShowCursor function --- sdl/sdl.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sdl/sdl.go b/sdl/sdl.go index c8bd2e2..23676ba 100644 --- a/sdl/sdl.go +++ b/sdl/sdl.go @@ -118,6 +118,15 @@ func (r *Renderer) SetWindowIcon(icon image.Image) error { return nil } +// ShowCursor sets whether the mouse cursor should be visible. +func (r *Renderer) ShowCursor(v bool) { + if v { + sdl.ShowCursor(sdl.ENABLE) + } else { + sdl.ShowCursor(sdl.DISABLE) + } +} + // SetTitle sets the SDL window title. func (r *Renderer) SetTitle(title string) { r.title = title