imgui/renderer: Hide Cursor on Idle Implementation (#1266)

Implement hide cursor on idle w/ idle timeout duration (configurable via GUI). While at it add always and never to hide the cursor options as well.

* Revert commit #1211 as to not interfere with the cursor states.
* Make hide cursor on idle as the default setting w/ timeout duration of 5 seconds to hide.
* Add an input tab in the settings page to add the hide cursor setting, with hiding the idle timeout box with respect to the cursor hide option.

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
Exhigh 2024-10-08 10:47:42 +04:00 committed by GitHub
parent 96344873d6
commit f139762c64
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 296 additions and 12 deletions

View file

@ -8,6 +8,9 @@
#include "types.h"
namespace Config {
enum HideCursorState : s16 { Never, Idle, Always };
void load(const std::filesystem::path& path);
void save(const std::filesystem::path& path);
@ -16,6 +19,9 @@ bool isFullscreenMode();
bool getPlayBGM();
int getBGMvolume();
s16 getCursorState();
int getCursorHideTimeout();
std::string getLogFilter();
std::string getLogType();
std::string getUserName();
@ -51,6 +57,8 @@ void setScreenHeight(u32 height);
void setFullscreenMode(bool enable);
void setPlayBGM(bool enable);
void setBGMvolume(int volume);
void setCursorState(s16 cursorState);
void setCursorHideTimeout(int newcursorHideTimeout);
void setLanguage(u32 language);
void setNeoMode(bool enable);
void setUserName(const std::string& type);