Latest public/internal sync.

This commit is contained in:
Eric 2024-03-13 17:58:38 -07:00
parent be7eb36ba5
commit 896aa9c663
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
2 changed files with 12 additions and 14 deletions

View File

@ -19,6 +19,7 @@ if TYPE_CHECKING:
class GamepadSettingsWindow(bui.Window):
"""Window for configuring a gamepad."""
# pylint: disable=too-many-public-methods
def __init__(
@ -824,6 +825,7 @@ class GamepadSettingsWindow(bui.Window):
def _do_reset(self) -> None:
"""Resets the input's mapping settings."""
from babase import InputDeviceNotFoundError
self._settings = {}
# Unplugging the controller while performing a
# mapping reset makes things go bonkers a little.
@ -839,8 +841,8 @@ class GamepadSettingsWindow(bui.Window):
"""Show a burger menu with extra settings."""
# pylint: disable=cyclic-import
choices: list[str] = [
'advanced',
'reset',
'advanced',
'reset',
]
choices_display: list[bui.Lstr] = [
bui.Lstr(resource=self._r + '.advancedText'),
@ -853,9 +855,7 @@ class GamepadSettingsWindow(bui.Window):
scale=(
2.3
if uiscale is bui.UIScale.SMALL
else 1.65
if uiscale is bui.UIScale.MEDIUM
else 1.23
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
),
width=150,
choices=choices,

View File

@ -67,10 +67,10 @@ class ConfigKeyboardWindow(bui.Window):
'buttonRight',
]:
assert bui.app.classic is not None
self._settings[
button
] = bui.app.classic.get_input_device_mapped_value(
self._input, button, default
self._settings[button] = (
bui.app.classic.get_input_device_mapped_value(
self._input, button, default
)
)
def _rebuild_ui(self, is_reset: bool = False) -> None:
@ -79,7 +79,7 @@ class ConfigKeyboardWindow(bui.Window):
for widget in self._root_widget.get_children():
widget.delete()
#b_off = 0 if self._unique_id != '#1' else 9
# b_off = 0 if self._unique_id != '#1' else 9
cancel_button = bui.buttonwidget(
parent=self._root_widget,
autoselect=True,
@ -324,7 +324,7 @@ class ConfigKeyboardWindow(bui.Window):
"""Show a burger menu with extra settings."""
# pylint: disable=cyclic-import
choices: list[str] = [
'reset',
'reset',
]
choices_display: list[bui.Lstr] = [
bui.Lstr(resource='settingsWindowAdvanced.resetText'),
@ -336,9 +336,7 @@ class ConfigKeyboardWindow(bui.Window):
scale=(
2.3
if uiscale is bui.UIScale.SMALL
else 1.65
if uiscale is bui.UIScale.MEDIUM
else 1.23
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
),
width=150,
choices=choices,