Skip to content

Commit

Permalink
ui polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Jan 12, 2025
1 parent 82ae193 commit 764c2c5
Show file tree
Hide file tree
Showing 19 changed files with 127 additions and 84 deletions.
72 changes: 36 additions & 36 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.37 (build 22180, api 9, 2025-01-11)
### 1.7.37 (build 22181, api 9, 2025-01-11)
- Bumping api version to 9. As you'll see below, there's some UI changes that
will require a bit of work for any UI mods to adapt to. If your mods don't
touch UI stuff at all you can simply bump your api version and call it a day.
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22180
TARGET_BALLISTICA_BUILD = 22181
TARGET_BALLISTICA_VERSION = '1.7.37'


Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/account/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def __init__(
size=(self._scroll_width, self._scroll_height),
claims_left_right=True,
selection_loops_to_parent=True,
border_opacity=0.4,
)
self._subcontainer: bui.Widget | None = None
self._refresh()
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/achievements.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def __init__(
),
capture_arrows=True,
simple_culling_v=10,
border_opacity=0.4,
)
bui.widget(edit=self._scrollwidget, autoselect=True)
if uiscale is bui.UIScale.SMALL:
Expand Down
37 changes: 32 additions & 5 deletions src/assets/ba_data/python/bauiv1lib/coop/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,10 @@ def __init__(

self._scroll_width = self._width - (130 + 2 * x_inset)
self._scroll_height = self._height - (
219 if uiscale is bui.UIScale.SMALL else 160
# 219 if uiscale is bui.UIScale.SMALL else 160
170
if uiscale is bui.UIScale.SMALL
else 160
)

self._subcontainerwidth = 800.0
Expand All @@ -263,7 +266,8 @@ def __init__(
parent=self._root_widget,
highlight=False,
position=(
(65 + x_inset, 120)
# (65 + x_inset, 120)
(65 + x_inset, 70)
if uiscale is bui.UIScale.SMALL
else (65 + x_inset, 70)
),
Expand All @@ -273,6 +277,29 @@ def __init__(
selection_loops_to_parent=True,
border_opacity=0.3 if uiscale is bui.UIScale.SMALL else 1.0,
)

if uiscale is bui.UIScale.SMALL:
bimg = bui.imagewidget(
parent=self._root_widget,
texture=bui.gettexture('uiAtlas'),
mesh_transparent=bui.getmesh('windowBGBlotch'),
position=(x_inset + 10.0, -20),
size=(500.0, 200.0),
color=(0.4, 0.37, 0.49),
# color=(1, 0, 0),
)
bui.widget(edit=bimg, depth_range=(0.9, 1.0))
bimg = bui.imagewidget(
parent=self._root_widget,
texture=bui.gettexture('uiAtlas'),
mesh_transparent=bui.getmesh('windowBGBlotch'),
position=(x_inset + self._scroll_width - 270, -20),
size=(500.0, 200.0),
color=(0.4, 0.37, 0.49),
# color=(1, 0, 0),
)
bui.widget(edit=bimg, depth_range=(0.9, 1.0))

self._subcontainer: bui.Widget | None = None

# Take note of our account state; we'll refresh later if this changes.
Expand Down Expand Up @@ -742,7 +769,7 @@ def _refresh(self) -> None:

h_scroll = bui.hscrollwidget(
parent=w_parent,
size=(self._scroll_width - 10, 205),
size=(self._scroll_width, 205),
position=(-5, v),
simple_culling_h=70,
highlight=False,
Expand Down Expand Up @@ -836,7 +863,7 @@ def _refresh(self) -> None:
for i in range(self._tournament_button_count):
tournament_h_scroll = h_scroll = bui.hscrollwidget(
parent=w_parent,
size=(self._scroll_width - 10, 205),
size=(self._scroll_width, 205),
position=(-5, v),
highlight=False,
border_opacity=0.0,
Expand Down Expand Up @@ -918,7 +945,7 @@ def _refresh(self) -> None:

self._custom_h_scroll = custom_h_scroll = h_scroll = bui.hscrollwidget(
parent=w_parent,
size=(self._scroll_width - 10, 205),
size=(self._scroll_width, 205),
position=(-5, v),
highlight=False,
border_opacity=0.0,
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ def __init__(
height - (160 if uiscale is bui.UIScale.SMALL else 100),
),
capture_arrows=True,
border_opacity=0.4,
)

bui.widget(
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/gather/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ def __init__(
),
texture=bui.gettexture('scrollWidget'),
mesh_transparent=bui.getmesh('softEdgeOutside'),
opacity=0.4,
)
self._tab_container: bui.Widget | None = None

Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def __init__(
height - (150 if uiscale is bui.UIScale.SMALL else 120),
),
capture_arrows=True,
border_opacity=0.4,
)

bui.widget(
Expand Down
11 changes: 7 additions & 4 deletions src/assets/ba_data/python/bauiv1lib/inbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(

self._width = 800 if uiscale is bui.UIScale.SMALL else 500
self._height = (
455
485
if uiscale is bui.UIScale.SMALL
else 370 if uiscale is bui.UIScale.MEDIUM else 450
)
Expand All @@ -132,7 +132,7 @@ def __init__(
'menu_full' if uiscale is bui.UIScale.SMALL else 'menu_full'
),
scale=(
1.7
1.74
if uiscale is bui.UIScale.SMALL
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.15
),
Expand Down Expand Up @@ -171,7 +171,7 @@ def __init__(
position=(
self._width * 0.5,
self._height
- (24 if uiscale is bui.UIScale.SMALL else 20)
- (45 if uiscale is bui.UIScale.SMALL else 20)
+ yoffs,
),
size=(0, 0),
Expand Down Expand Up @@ -209,13 +209,14 @@ def __init__(
),
position=(
30,
(133 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
(110 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
),
capture_arrows=True,
simple_culling_v=200,
claims_left_right=True,
claims_up_down=True,
center_small_content_horizontally=True,
border_opacity=0.4,
)
bui.widget(edit=self._scrollwidget, autoselect=True)
if uiscale is bui.UIScale.SMALL:
Expand Down Expand Up @@ -466,6 +467,8 @@ def _on_inbox_request_response(
)
return

bui.scrollwidget(edit=self._scrollwidget, highlight=False)

bui.spinnerwidget(edit=self._loading_spinner, visible=False)
bui.textwidget(edit=self._infotext, text='')

Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/league/rankwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def __init__(
position=(65 + x_inset, 70),
size=(self._scroll_width, self._scroll_height),
center_small_content=True,
border_opacity=0.4,
)
bui.widget(edit=self._scrollwidget, autoselect=True)
bui.containerwidget(edit=self._scrollwidget, claims_left_right=True)
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/party.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def __init__(self, origin: Sequence[float] = (0, 0)):
size=(self._scroll_width, self._height - 200),
position=(30, 80),
color=(0.4, 0.6, 0.3),
border_opacity=0.6,
)
self._columnwidget = bui.columnwidget(
parent=self._scrollwidget, border=2, left_border=-200, margin=0
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/popup.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def __init__(
highlight=False,
color=(0.35, 0.55, 0.15),
size=(self._width - 40, self._height - 40),
border_opacity=0.5,
)
self._columnwidget = bui.columnwidget(
parent=self._scrollwidget, border=2, margin=0
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/settings/advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def __init__(
highlight=False,
size=(self._scroll_width, self._scroll_height),
selection_loops_to_parent=True,
border_opacity=0.4,
)
bui.widget(edit=self._scrollwidget, right_widget=self._scrollwidget)
self._subcontainer = bui.containerwidget(
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/store/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ def _set_tab(self, tab_id: TabID) -> None:
size=(self._scroll_width, self._scroll_height),
claims_left_right=True,
selection_loops_to_parent=True,
border_opacity=0.4,
)

# NOTE: this stuff is modified by the _Store class.
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/bauiv1lib/watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ def __init__(
),
texture=bui.gettexture('scrollWidget'),
mesh_transparent=bui.getmesh('softEdgeOutside'),
opacity=0.4,
)
self._tab_container: bui.Widget | None = None

Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22180;
const int kEngineBuildNumber = 22181;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;

Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/ui_v1/widget/h_scroll_widget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ void HScrollWidget::Draw(base::RenderPass* pass, bool draw_transparent) {
c.ScopedScissor({l + border_width_, b + border_height_ + 1,
l + (width()), b + (height() * 0.995f)});
auto xf = c.ScopedTransform();
c.Translate(thumb_center_x_, thumb_center_y_, 0.8f);
c.Translate(thumb_center_x_, thumb_center_y_, 0.75f);
c.Scale(-thumb_width_, thumb_height_, 0.1f);
c.FlipCullFace();
c.Rotate(-90, 0, 0, 1);
Expand Down
Loading

0 comments on commit 764c2c5

Please sign in to comment.