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): class GamepadSettingsWindow(bui.Window):
"""Window for configuring a gamepad.""" """Window for configuring a gamepad."""
# pylint: disable=too-many-public-methods # pylint: disable=too-many-public-methods
def __init__( def __init__(
@ -824,6 +825,7 @@ class GamepadSettingsWindow(bui.Window):
def _do_reset(self) -> None: def _do_reset(self) -> None:
"""Resets the input's mapping settings.""" """Resets the input's mapping settings."""
from babase import InputDeviceNotFoundError from babase import InputDeviceNotFoundError
self._settings = {} self._settings = {}
# Unplugging the controller while performing a # Unplugging the controller while performing a
# mapping reset makes things go bonkers a little. # mapping reset makes things go bonkers a little.
@ -853,9 +855,7 @@ class GamepadSettingsWindow(bui.Window):
scale=( scale=(
2.3 2.3
if uiscale is bui.UIScale.SMALL if uiscale is bui.UIScale.SMALL
else 1.65 else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
if uiscale is bui.UIScale.MEDIUM
else 1.23
), ),
width=150, width=150,
choices=choices, choices=choices,

View File

@ -67,11 +67,11 @@ class ConfigKeyboardWindow(bui.Window):
'buttonRight', 'buttonRight',
]: ]:
assert bui.app.classic is not None assert bui.app.classic is not None
self._settings[ self._settings[button] = (
button bui.app.classic.get_input_device_mapped_value(
] = bui.app.classic.get_input_device_mapped_value(
self._input, button, default self._input, button, default
) )
)
def _rebuild_ui(self, is_reset: bool = False) -> None: def _rebuild_ui(self, is_reset: bool = False) -> None:
assert bui.app.classic is not None assert bui.app.classic is not None
@ -336,9 +336,7 @@ class ConfigKeyboardWindow(bui.Window):
scale=( scale=(
2.3 2.3
if uiscale is bui.UIScale.SMALL if uiscale is bui.UIScale.SMALL
else 1.65 else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
if uiscale is bui.UIScale.MEDIUM
else 1.23
), ),
width=150, width=150,
choices=choices, choices=choices,