Add graphics option to toggle mouse cursor

Adds an option to show or hide the system mouse cursor over the game window.
This commit is contained in:
Allison Fleischer
2020-01-28 23:17:13 -08:00
committed by Ethan Lee
parent 5afba66d2e
commit 03a4c3362a
5 changed files with 47 additions and 2 deletions

View File

@@ -460,6 +460,17 @@ SDL_assert(0 && "Remove open level dir");
game.savestats(map, dwgfx);
game.createmenu("graphicoptions");
game.currentmenuoption = 3;
}else if (game.currentmenuoption == 4) {
//toggle mouse cursor
music.playef(11, 10);
if (dwgfx.showmousecursor == true) {
SDL_ShowCursor(SDL_DISABLE);
dwgfx.showmousecursor = false;
}
else {
SDL_ShowCursor(SDL_ENABLE);
dwgfx.showmousecursor = true;
}
}
else
{