Merge pull request #14 from prototux/option_nogui

Add an option to show or hide the menu
This commit is contained in:
Muzychenko Andrey authored and GitHub committed 2021-09-29 07:32:01 +03:00
commit 593b4d161c
3 files changed
+27 -5

No files matched your search

+6
View File
@@ -67,6 +67,7 @@ void options::init()
Options.Sounds = 1;
Options.Music = 0;
Options.ShowMenu = 1;
Options.FullScreen = 0;
Options.LeftFlipperKeyDft = SDLK_z;
Options.RightFlipperKeyDft = SDLK_SLASH;
@@ -90,6 +91,7 @@ void options::init()
Options.UniformScaling = true;
Options.Sounds = get_int("Sounds", Options.Sounds);
Options.Music = get_int("Music", Options.Music);
Options.ShowMenu = get_int("ShowMenu", Options.ShowMenu);
Options.FullScreen = get_int("FullScreen", Options.FullScreen);
Options.Players = get_int("Players", Options.Players);
Options.LeftFlipperKey = get_int("Left Flipper key", Options.LeftFlipperKey);
@@ -120,6 +122,7 @@ void options::uninit()
{
set_int("Sounds", Options.Sounds);
set_int("Music", Options.Music);
set_int("ShowMenu", Options.ShowMenu);
set_int("FullScreen", Options.FullScreen);
set_int("Players", Options.Players);
set_int("Left Flipper key", Options.LeftFlipperKey);
@@ -188,6 +191,9 @@ void options::toggle(Menu1 uIDCheckItem)
else
midi::play_pb_theme(0);
return;
case Menu1::Show_Menu:
Options.ShowMenu = Options.ShowMenu == 0;
return;
case Menu1::Full_Screen:
newValue = Options.FullScreen == 0;
Options.FullScreen = Options.FullScreen == 0;