Skip to content

Commit d75683c

Browse files
committed
polishing
1 parent fc301d8 commit d75683c

File tree

8 files changed

+81
-62
lines changed

8 files changed

+81
-62
lines changed

.efrocachemap

Lines changed: 40 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### 1.7.37 (build 22117, api 9, 2024-11-27)
1+
### 1.7.37 (build 22118, api 9, 2024-11-30)
22
- Bumping api version to 9. As you'll see below, there's some UI changes that
33
will require a bit of work for any UI mods to adapt to. If your mods don't
44
touch UI stuff at all you can simply bump your api version and call it a day.

src/assets/ba_data/python/babase/_hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,14 +455,14 @@ def copy_dev_console_history() -> None:
455455
)
456456
return
457457

458-
# Just dump everything in the log-handler's cache.
458+
# Just dump everything that's in the log-handler's cache.
459459
archive = envconfig.log_handler.get_cached()
460460
lines: list[str] = []
461461
stdnames = ('stdout', 'stderr')
462462
for entry in archive.entries:
463463
reltime = entry.time.timestamp() - envconfig.launch_time
464464
level_ex = '' if entry.name in stdnames else f' {entry.level.name}'
465-
lines.append(f'{reltime:.3f} {entry.name}{level_ex}: {entry.message}')
465+
lines.append(f'{reltime:.3f}{level_ex} {entry.name}: {entry.message}')
466466

467467
_babase.clipboard_set_text('\n'.join(lines))
468468
_babase.screenmessage(Lstr(resource='copyConfirmText'), color=(0, 1, 0))

src/assets/ba_data/python/baenv.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
# Build number and version of the ballistica binary we expect to be
5555
# using.
56-
TARGET_BALLISTICA_BUILD = 22117
56+
TARGET_BALLISTICA_BUILD = 22118
5757
TARGET_BALLISTICA_VERSION = '1.7.37'
5858

5959

src/assets/ba_data/python/bauiv1lib/account/settings.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ def _refresh(self) -> None:
377377
)
378378
link_accounts_button_space = 70.0
379379

380+
show_v1_obsolete_note = self._v1_signed_in and (
381+
primary_v2_account is None
382+
)
383+
v1_obsolete_note_space = 80.0
384+
380385
show_unlink_accounts_button = show_link_accounts_button
381386
unlink_accounts_button_space = 90.0
382387

@@ -434,6 +439,8 @@ def _refresh(self) -> None:
434439
self._sub_height += manage_account_button_space
435440
if show_link_accounts_button:
436441
self._sub_height += link_accounts_button_space
442+
if show_v1_obsolete_note:
443+
self._sub_height += v1_obsolete_note_space
437444
if show_unlink_accounts_button:
438445
self._sub_height += unlink_accounts_button_space
439446
if show_v2_link_info:
@@ -800,6 +807,26 @@ def _refresh(self) -> None:
800807
bui.widget(edit=btn, show_buffer_bottom=40, show_buffer_top=100)
801808
self._sign_in_text = None
802809

810+
if show_v1_obsolete_note:
811+
v -= v1_obsolete_note_space
812+
bui.textwidget(
813+
parent=self._subcontainer,
814+
h_align='center',
815+
v_align='center',
816+
size=(0, 0),
817+
position=(self._sub_width * 0.5, v + 35.0),
818+
text=(
819+
'YOU ARE SIGNED IN WITH A V1 ACCOUNT.\n'
820+
'THESE ARE NO LONGER SUPPORTED AND MANY\n'
821+
'FEATURES WILL NOT WORK. PLEASE SWITCH TO\n'
822+
'A V2 ACCOUNT OR UPGRADE THIS ONE.'
823+
),
824+
maxwidth=self._sub_width * 0.8,
825+
color=(1, 0, 0),
826+
shadow=1.0,
827+
flatness=1.0,
828+
)
829+
803830
if show_manage_account_button:
804831
button_width = 300
805832
v -= manage_account_button_space
@@ -1233,8 +1260,8 @@ def _have_unlinkable_v1_accounts(self) -> bool:
12331260
plus = bui.app.plus
12341261
assert plus is not None
12351262

1236-
# if this is not present, we haven't had contact from the server so
1237-
# let's not proceed..
1263+
# If this is not present, we haven't had contact from the server
1264+
# so let's not proceed.
12381265
if plus.get_v1_account_public_login_id() is None:
12391266
return False
12401267
accounts = plus.get_v1_account_misc_read_val_2('linkedAccounts', [])
@@ -1251,7 +1278,8 @@ def _update_unlink_accounts_button(self) -> None:
12511278

12521279
def _should_show_legacy_unlink_button(self) -> bool:
12531280
plus = bui.app.plus
1254-
assert plus is not None
1281+
if plus is None:
1282+
return False
12551283

12561284
# Only show this when fully signed in to a v2 account.
12571285
if not self._v1_signed_in or plus.accounts.primary is None:

src/ballistica/shared/ballistica.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
3939
namespace ballistica {
4040

4141
// These are set automatically via script; don't modify them here.
42-
const int kEngineBuildNumber = 22117;
42+
const int kEngineBuildNumber = 22118;
4343
const char* kEngineVersion = "1.7.37";
4444
const int kEngineApiVersion = 9;
4545

src/ballistica/ui_v1/ui_v1.cc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,21 +84,12 @@ bool UIV1FeatureSet::PartyIconVisible() {
8484

8585
void UIV1FeatureSet::SetAccountState(bool signed_in, const std::string& name) {
8686
assert(root_widget_.Exists());
87-
// Store the value and plug it in if we've got a live widget.
88-
// account_signed_in_ = signed_in;
89-
// account_name_ = name;
90-
// if (auto* r = root_widget()) {
9187
root_widget_->SetAccountState(signed_in, name);
92-
// }
9388
}
9489

9590
void UIV1FeatureSet::SetSquadSizeLabel(int num) {
9691
assert(root_widget_.Exists());
97-
// Store the value and plug it in if we've got a live widget.
98-
// party_icon_number_ = num;
99-
// if (auto* r = root_widget()) {
10092
root_widget_->SetSquadSizeLabel(num);
101-
// }
10293
}
10394

10495
void UIV1FeatureSet::ActivatePartyIcon() {

src/ballistica/ui_v1/widget/root_widget.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,7 +1289,7 @@ void RootWidget::SetAccountState(bool signed_in, const std::string& name) {
12891289
assert(wb);
12901290

12911291
if (signed_in) {
1292-
w->SetText(name);
1292+
w->SetText(g_base->assets->CharStr(SpecialChar::kV2Logo) + name);
12931293
w->set_color(0.0f, 0.4f, 0.1f, 1.0f);
12941294
w->set_shadow(0.2f);
12951295
w->set_flatness(1.0f);
@@ -1336,15 +1336,15 @@ void RootWidget::SetLeagueType(const std::string& val) {
13361336
Vector3f color{};
13371337

13381338
if (val == "") {
1339-
color = {0.5f, 0.5f, 0.5f};
1339+
color = {0.4f, 0.4f, 0.4f};
13401340
} else if (val == "b") {
13411341
color = {1.0f, 0.7f, 0.5f};
13421342
} else if (val == "s") {
1343-
color = {1.0f, 1.0f, 1.0f};
1343+
color = {1.0f, 1.0f, 1.4f};
13441344
} else if (val == "g") {
1345-
color = {1.4f, 0.8f, 0.2f};
1345+
color = {1.4f, 1.0f, 0.4f};
13461346
} else if (val == "d") {
1347-
color = {1.2f, 0.8f, 1.5f};
1347+
color = {1.0f, 0.8f, 2.0f};
13481348
} else {
13491349
g_core->Log(LogName::kBa, LogLevel::kError,
13501350
"RootWidget: Invalid league type '" + val + "'.");

0 commit comments

Comments
 (0)