mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-04-23 08:14:31 +00:00
Implement toggle for allowing background inputs (#6214)
This commit is contained in:
parent
25ee1ec3ab
commit
1d9de8544a
|
|
@ -1 +1 @@
|
|||
Subproject commit 61bf1fbe9fceb032eba3c3cf61f93ca4065fa78a
|
||||
Subproject commit 956f1082122f219d536c20483df89469f4b807dc
|
||||
|
|
@ -145,6 +145,17 @@ void SohMenu::AddMenuSettings() {
|
|||
"Allows controller navigation of the port menu (Settings, Enhancements,...)\nCAUTION: "
|
||||
"This will disable game inputs while the menu is visible.\n\nD-pad to move between "
|
||||
"items, A to select, B to move up in scope."));
|
||||
AddWidget(path, "Allow background inputs", WIDGET_CVAR_CHECKBOX)
|
||||
.CVar(CVAR_ALLOW_BACKGROUND_INPUTS)
|
||||
.RaceDisable(false)
|
||||
.Callback([](WidgetInfo& info) {
|
||||
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS,
|
||||
CVarGetInteger(CVAR_ALLOW_BACKGROUND_INPUTS, 1) ? "1" : "0");
|
||||
})
|
||||
.Options(CheckboxOptions()
|
||||
.Tooltip("Allows controller inputs to be picked up by the game even when the game window isn't "
|
||||
"the focused window.")
|
||||
.DefaultValue(1));
|
||||
AddWidget(path, "Menu Background Opacity", WIDGET_CVAR_SLIDER_FLOAT)
|
||||
.CVar(CVAR_SETTING("Menu.BackgroundOpacity"))
|
||||
.RaceDisable(false)
|
||||
|
|
|
|||
Loading…
Reference in a new issue