mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-25 00:13:27 +08:00
Cleaning up controllers UI
This commit is contained in:
parent
93b2d15840
commit
42c7bb17f5
@ -4135,16 +4135,16 @@
|
||||
"assets/build/windows/x64/vc_redist.x64.exe": "https://files.ballistica.net/cache/ba1/ea/19/8b8787d81abcdce158ba608cd24f",
|
||||
"assets/build/windows/x64/vcruntime140_1d.dll": "https://files.ballistica.net/cache/ba1/11/d8/ff6344b429b00c24d9a1930d4338",
|
||||
"assets/build/windows/x64/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/20/33/0825e11e6518f87ece3009309933",
|
||||
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b6/f3/a034a7393edf52eefe644e6aa642",
|
||||
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5d/e2/c45ee46dc39c32aa4bff0d50ef2c",
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/25/3d/f3cce76ed1c66e39b6e07d199696",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cf/8b/5c09d999c0d6b160e34d69f1f710",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c7/b6/18b0280b4c99aaf48fb3bfcc4fac",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c4/65/dd50a2026be7df75e3d280a2efc3",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/62/4e/f6a184076ad4676ad6b4cf9d4d01",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/20/d9/f86cd5d9fb67183e0a2ceda0e897",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/e4/da/0b43bb125048696f4514eaca1e56",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/d6/46/d0e647509453bc2125ccbe7eba09",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c2/a8/fee89fe0a3d76489b5b26a2c5fac",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/70/d5/86c8bdb5cf1dd15d9b9a0c7490da"
|
||||
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/36/ca09cc3913ae40382d73340f62ab",
|
||||
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/30/613d0c5acf97d7eb7770c4138a3b",
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/58/e668468c6ebe7b3b1bacc7079f16",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/93/215ba8579ffc8bc5fc67aa6d1bfc",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a1/c5/b0be277a5324eccf97218644f429",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7c/f3/f82f3a29652ed279447dc5b1c4a5",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/21/aa/312efa59677ebd9a97b8f7f48796",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/7c/de/c926cf39c972f1084762c917bb9c",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/bd/bb/bfb59d70d101eefd14987007225d",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/df/d3/3e91ec5117fe359c2e94818b9788",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/20/c0/cad3a08df13d190bbeff26bb901f",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ea/28/efe665eddea710871da829ad2dce"
|
||||
}
|
||||
@ -11,6 +11,7 @@
|
||||
- Added 'claims_left_right' and 'claims_tab' to ba.hscrollwidget().
|
||||
- Default widget 'show_buffer' is now 20 instead of 0 (causes scrolling to stay slightly ahead of widget selection). This can be overridden with the ba.widget() call if anything breaks.
|
||||
- Relocated ba.app.uiscale to ba.app.ui.uiscale
|
||||
- Top level settings window now properly saves/restores its state again.
|
||||
|
||||
### 1.5.22 (20139)
|
||||
- Button and key names now display correctly again on Android (and are cleaned up on other platforms too).
|
||||
|
||||
@ -2819,6 +2819,14 @@ def is_running_on_ouya() -> bool:
|
||||
return bool()
|
||||
|
||||
|
||||
def is_xcode_build() -> bool:
|
||||
"""is_xcode_build() -> bool
|
||||
|
||||
(internal)
|
||||
"""
|
||||
return bool()
|
||||
|
||||
|
||||
def lock_all_input() -> None:
|
||||
"""lock_all_input() -> None
|
||||
|
||||
|
||||
@ -58,7 +58,6 @@ class AllSettingsWindow(ba.Window):
|
||||
width = 900 if uiscale is ba.UIScale.SMALL else 580
|
||||
x_inset = 75 if uiscale is ba.UIScale.SMALL else 0
|
||||
height = 435
|
||||
# button_height = 42
|
||||
self._r = 'settingsWindow'
|
||||
top_extra = 20 if uiscale is ba.UIScale.SMALL else 0
|
||||
|
||||
@ -204,6 +203,7 @@ class AllSettingsWindow(ba.Window):
|
||||
color=(0.8, 0.95, 1),
|
||||
texture=ba.gettexture('advancedIcon'),
|
||||
draw_controller=avb)
|
||||
self._restore_state()
|
||||
|
||||
@staticmethod
|
||||
def _preload_modules() -> None:
|
||||
|
||||
@ -64,12 +64,12 @@ class ControlsSettingsWindow(ba.Window):
|
||||
spacing = 50.0
|
||||
button_width = 350.0
|
||||
width = 460.0
|
||||
height = 85.0
|
||||
height = 130.0
|
||||
|
||||
space_height = spacing * 0.3
|
||||
|
||||
# FIXME: should create vis settings in platform for these,
|
||||
# not hard code them here..
|
||||
# not hard code them here.
|
||||
|
||||
show_gamepads = False
|
||||
platform = app.platform
|
||||
@ -93,7 +93,7 @@ class ControlsSettingsWindow(ba.Window):
|
||||
show_keyboard = False
|
||||
if _ba.getinputdevice('Keyboard', '#1', doraise=False) is not None:
|
||||
show_keyboard = True
|
||||
height += spacing * 2
|
||||
height += spacing
|
||||
show_keyboard_p2 = False if app.vr_mode else show_keyboard
|
||||
if show_keyboard_p2:
|
||||
height += spacing
|
||||
@ -120,26 +120,25 @@ class ControlsSettingsWindow(ba.Window):
|
||||
# height += spacing
|
||||
|
||||
show_mac_wiimote = False
|
||||
if platform == 'mac' and subplatform == 'appstore':
|
||||
show_mac_wiimote = True
|
||||
height += spacing
|
||||
# if platform == 'mac' and _ba.is_xcode_build():
|
||||
# show_mac_wiimote = True
|
||||
# height += spacing
|
||||
|
||||
# on non-oculus-vr windows, show an option to disable xinput
|
||||
# On windows (outside of oculus/vr), show an option to disable xinput.
|
||||
show_xinput_toggle = False
|
||||
if platform == 'windows' and (subplatform != 'oculus'
|
||||
or not app.vr_mode):
|
||||
if platform == 'windows' and not app.vr_mode:
|
||||
show_xinput_toggle = True
|
||||
|
||||
# on mac builds, show an option to switch between generic and
|
||||
# On mac builds, show an option to switch between generic and
|
||||
# made-for-iOS/Mac systems
|
||||
# (we can run into problems where devices register as one of each
|
||||
# type otherwise)..
|
||||
show_mac_controller_subsystem = False
|
||||
if platform == 'mac' and subplatform == 'appstore':
|
||||
if platform == 'mac' and _ba.is_xcode_build():
|
||||
show_mac_controller_subsystem = True
|
||||
|
||||
if show_mac_controller_subsystem:
|
||||
height += spacing
|
||||
height += spacing * 1.5
|
||||
|
||||
if show_xinput_toggle:
|
||||
height += spacing
|
||||
@ -150,6 +149,7 @@ class ControlsSettingsWindow(ba.Window):
|
||||
size=(width, height),
|
||||
transition=transition,
|
||||
scale_origin_stack_offset=scale_origin,
|
||||
stack_offset=((0, -10) if uiscale is ba.UIScale.SMALL else (0, 0)),
|
||||
scale=(smallscale if uiscale is ba.UIScale.SMALL else
|
||||
1.5 if uiscale is ba.UIScale.MEDIUM else 1.0)))
|
||||
self._back_button = btn = ba.buttonwidget(
|
||||
@ -381,7 +381,7 @@ class ControlsSettingsWindow(ba.Window):
|
||||
v_align='center',
|
||||
color=ba.app.ui.infotextcolor,
|
||||
maxwidth=width * 0.8)
|
||||
v -= spacing
|
||||
v -= spacing * 1.5
|
||||
self._restore_state()
|
||||
|
||||
def _set_mac_controller_subsystem(self, val: str) -> None:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user