Add option for Never Hide Mouse Cursor

Instead of having a single GUI checkbox for "Always Hide Mouse Cursor",
I have instead opted to use radio buttons so the user can swap between
different states of mouse visibility. "Movement" is the default
behavior, "Never" will hide the mouse cursor the entire time the game is
running, and "Always" will keep the mouse cursor always visible.
This commit is contained in:
sowens99
2021-09-22 23:57:52 -04:00
parent 5145853351
commit 2aa400e72f
9 changed files with 99 additions and 36 deletions

View File

@ -145,7 +145,7 @@ void SConfig::SaveInterfaceSettings(IniFile& ini)
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
interface->Set("ConfirmStop", bConfirmStop);
interface->Set("HideCursor", bHideCursor);
interface->Set("CursorVisibility", m_show_cursor);
interface->Set("LockCursor", bLockCursor);
interface->Set("LanguageCode", m_InterfaceLanguage);
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
@ -399,7 +399,7 @@ void SConfig::LoadInterfaceSettings(IniFile& ini)
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
interface->Get("ConfirmStop", &bConfirmStop, true);
interface->Get("HideCursor", &bHideCursor, false);
interface->Get("CursorVisibility", &m_show_cursor, ShowCursor::OnMovement);
interface->Get("LockCursor", &bLockCursor, false);
interface->Get("LanguageCode", &m_InterfaceLanguage, "");
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);