mirror of
https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server.git
synced 2025-11-14 17:46:03 +00:00
1.7.32 ba_data update
This commit is contained in:
parent
bf2f252ee5
commit
15393d5461
144 changed files with 4296 additions and 2411 deletions
30
dist/ba_data/python/bauiv1/onscreenkeyboard.py
vendored
30
dist/ba_data/python/bauiv1/onscreenkeyboard.py
vendored
|
|
@ -12,6 +12,7 @@ from typing import TYPE_CHECKING
|
|||
import babase
|
||||
|
||||
import _bauiv1
|
||||
from bauiv1._keyboard import Keyboard
|
||||
from bauiv1._uitypes import Window
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
|
@ -51,6 +52,19 @@ class OnScreenKeyboardWindow(Window):
|
|||
else (0, 0),
|
||||
)
|
||||
)
|
||||
self._cancel_button = _bauiv1.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
scale=0.5,
|
||||
position=(30, self._height - 55),
|
||||
size=(60, 60),
|
||||
label='',
|
||||
enable_sound=False,
|
||||
on_activate_call=self._cancel,
|
||||
autoselect=True,
|
||||
color=(0.55, 0.5, 0.6),
|
||||
icon=_bauiv1.gettexture('crossOut'),
|
||||
iconscale=1.2,
|
||||
)
|
||||
self._done_button = _bauiv1.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - 200, 44),
|
||||
|
|
@ -240,9 +254,7 @@ class OnScreenKeyboardWindow(Window):
|
|||
# Show change instructions only if we have more than one
|
||||
# keyboard option.
|
||||
keyboards = (
|
||||
babase.app.meta.scanresults.exports_of_class(
|
||||
babase.Keyboard
|
||||
)
|
||||
babase.app.meta.scanresults.exports_of_class(Keyboard)
|
||||
if babase.app.meta.scanresults is not None
|
||||
else []
|
||||
)
|
||||
|
|
@ -274,10 +286,10 @@ class OnScreenKeyboardWindow(Window):
|
|||
|
||||
def _get_keyboard(self) -> bui.Keyboard:
|
||||
assert babase.app.meta.scanresults is not None
|
||||
classname = babase.app.meta.scanresults.exports_of_class(
|
||||
babase.Keyboard
|
||||
)[self._keyboard_index]
|
||||
kbclass = babase.getclass(classname, babase.Keyboard)
|
||||
classname = babase.app.meta.scanresults.exports_of_class(Keyboard)[
|
||||
self._keyboard_index
|
||||
]
|
||||
kbclass = babase.getclass(classname, Keyboard)
|
||||
return kbclass()
|
||||
|
||||
def _refresh(self) -> None:
|
||||
|
|
@ -372,9 +384,7 @@ class OnScreenKeyboardWindow(Window):
|
|||
|
||||
def _next_keyboard(self) -> None:
|
||||
assert babase.app.meta.scanresults is not None
|
||||
kbexports = babase.app.meta.scanresults.exports_of_class(
|
||||
babase.Keyboard
|
||||
)
|
||||
kbexports = babase.app.meta.scanresults.exports_of_class(Keyboard)
|
||||
self._keyboard_index = (self._keyboard_index + 1) % len(kbexports)
|
||||
|
||||
self._load_keyboard()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue