mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 07:23:37 +08:00
commit
3d142dbd47
@ -6,7 +6,7 @@
|
|||||||
huge chunks of it and put back still-relevant pieces in a much more cleanly
|
huge chunks of it and put back still-relevant pieces in a much more cleanly
|
||||||
designed way. This should put us in a much better place for supporting various
|
designed way. This should put us in a much better place for supporting various
|
||||||
platforms and making graphical improvements going forward.
|
platforms and making graphical improvements going forward.
|
||||||
`ballistica/base/app_adapter/app_adapter_sdl.cc` for an example of the now
|
`ballistica/base/app_adapter/app_adapter_sdl.cc` is an example of the now
|
||||||
nicely implemented system.
|
nicely implemented system.
|
||||||
- The engine now requires OpenGL 3.0 or newer on desktop and OpenGL ES 3.0 or
|
- The engine now requires OpenGL 3.0 or newer on desktop and OpenGL ES 3.0 or
|
||||||
newer on mobile. This means we're cutting off a few percent of old devices on
|
newer on mobile. This means we're cutting off a few percent of old devices on
|
||||||
|
|||||||
@ -51,6 +51,18 @@ class OnScreenKeyboardWindow(Window):
|
|||||||
else (0, 0),
|
else (0, 0),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
self._cancel_button = _bauiv1.buttonwidget(
|
||||||
|
parent=self._root_widget,
|
||||||
|
scale=0.5,
|
||||||
|
position=(30, self._height - 55),
|
||||||
|
size=(60, 60),
|
||||||
|
label='',
|
||||||
|
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(
|
self._done_button = _bauiv1.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(self._width - 200, 44),
|
position=(self._width - 200, 44),
|
||||||
|
|||||||
@ -361,6 +361,7 @@ class PublicGatherTab(GatherTab):
|
|||||||
self._last_server_list_query_time: float | None = None
|
self._last_server_list_query_time: float | None = None
|
||||||
self._join_list_column: bui.Widget | None = None
|
self._join_list_column: bui.Widget | None = None
|
||||||
self._join_status_text: bui.Widget | None = None
|
self._join_status_text: bui.Widget | None = None
|
||||||
|
self._no_servers_text: bui.Widget | None = None
|
||||||
self._host_max_party_size_value: bui.Widget | None = None
|
self._host_max_party_size_value: bui.Widget | None = None
|
||||||
self._host_max_party_size_minus_button: (bui.Widget | None) = None
|
self._host_max_party_size_minus_button: (bui.Widget | None) = None
|
||||||
self._host_max_party_size_plus_button: (bui.Widget | None) = None
|
self._host_max_party_size_plus_button: (bui.Widget | None) = None
|
||||||
@ -658,6 +659,18 @@ class PublicGatherTab(GatherTab):
|
|||||||
color=(0.6, 0.6, 0.6),
|
color=(0.6, 0.6, 0.6),
|
||||||
position=(c_width * 0.5, c_height * 0.5),
|
position=(c_width * 0.5, c_height * 0.5),
|
||||||
)
|
)
|
||||||
|
self._no_servers_text = bui.textwidget(
|
||||||
|
parent=self._container,
|
||||||
|
text='',
|
||||||
|
size=(0, 0),
|
||||||
|
scale=0.9,
|
||||||
|
flatness=1.0,
|
||||||
|
shadow=0.0,
|
||||||
|
h_align='center',
|
||||||
|
v_align='top',
|
||||||
|
color=(0.6, 0.6, 0.6),
|
||||||
|
position=(c_width * 0.5, c_height * 0.5),
|
||||||
|
)
|
||||||
|
|
||||||
def _build_host_tab(
|
def _build_host_tab(
|
||||||
self, region_width: float, region_height: float
|
self, region_width: float, region_height: float
|
||||||
@ -950,6 +963,10 @@ class PublicGatherTab(GatherTab):
|
|||||||
self._update_party_rows()
|
self._update_party_rows()
|
||||||
|
|
||||||
def _update_party_rows(self) -> None:
|
def _update_party_rows(self) -> None:
|
||||||
|
|
||||||
|
plus = bui.app.plus
|
||||||
|
assert plus is not None
|
||||||
|
|
||||||
columnwidget = self._join_list_column
|
columnwidget = self._join_list_column
|
||||||
if not columnwidget:
|
if not columnwidget:
|
||||||
return
|
return
|
||||||
@ -963,6 +980,10 @@ class PublicGatherTab(GatherTab):
|
|||||||
edit=self._host_scrollwidget,
|
edit=self._host_scrollwidget,
|
||||||
claims_up_down=(len(self._parties_displayed) > 0),
|
claims_up_down=(len(self._parties_displayed) > 0),
|
||||||
)
|
)
|
||||||
|
bui.textwidget(
|
||||||
|
edit=self._no_servers_text,
|
||||||
|
text=''
|
||||||
|
)
|
||||||
|
|
||||||
# Clip if we have more UI rows than parties to show.
|
# Clip if we have more UI rows than parties to show.
|
||||||
clipcount = len(self._ui_rows) - len(self._parties_displayed)
|
clipcount = len(self._ui_rows) - len(self._parties_displayed)
|
||||||
@ -972,6 +993,15 @@ class PublicGatherTab(GatherTab):
|
|||||||
|
|
||||||
# If we have no parties to show, we're done.
|
# If we have no parties to show, we're done.
|
||||||
if not self._parties_displayed:
|
if not self._parties_displayed:
|
||||||
|
text = self._join_status_text
|
||||||
|
if (
|
||||||
|
plus.get_v1_account_state() == 'signed_in'
|
||||||
|
and cast(str, bui.textwidget(query=text)) == ''
|
||||||
|
):
|
||||||
|
bui.textwidget(
|
||||||
|
edit=self._no_servers_text,
|
||||||
|
text=bui.Lstr(resource='noServerFoundText')
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
sub_scroll_width = 830
|
sub_scroll_width = 830
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user