mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 17:33:13 +08:00
Latest public/internal sync.
This commit is contained in:
parent
be7eb36ba5
commit
896aa9c663
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user