Commit Last Manual Party Connect Port to config

This commit is contained in:
Ritiek Malhotra 2022-11-27 19:43:54 +05:30
parent e3f3f28c62
commit b276a812e2
2 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@
- Removed a few obsolete internal functions: `_ba.is_ouya_build()`, `_ba.android_media_scan_file()`.
- Renaming some methods/data to disambiguate 'login' vs 'sign-in', both in the app and on ballistica.net. Those two terms are somewhat ambiguous and interchangeable in English and can either be a verb or a noun. I'd like to keep things clear in Ballistica by always using 'sign-in' for the verb form and 'login' for the noun. For example: 'You can now sign in to your account using your Google Play login'.
- WARNING: There are currently some rough edges with Google Play V2 accounts; for example Google Play achievements and leaderboards UIs are not currently showing up. I will be cleaning all of this up before the official 1.7.14 release.
- Commit Last Manual Party Connect Port to config. Previously, it always assumed the port to be 43210.
### 1.7.13 (build 20919, api 7, 2022-11-03)
- Android target-sdk has been updated to 33 (Android 13). Please holler if anything seems broken or is behaving differently than before on Android.

View File

@ -234,6 +234,7 @@ class ManualGatherTab(GatherTab):
c_width = region_width
c_height = region_height - 20
last_addr = ba.app.config.get('Last Manual Party Connect Address', '')
last_port = ba.app.config.get('Last Manual Party Connect Port', 43210)
v = c_height - 70
v -= 70
ba.textwidget(
@ -275,7 +276,7 @@ class ManualGatherTab(GatherTab):
parent=self._container,
editable=True,
description=ba.Lstr(resource='gatherWindow.' 'portText'),
text='43210',
text=str(last_port),
autoselect=True,
max_chars=5,
position=(c_width * 0.5 - 240 + 490, v - 30),
@ -811,6 +812,7 @@ class ManualGatherTab(GatherTab):
# Store for later.
config = ba.app.config
config['Last Manual Party Connect Address'] = resolved_address
config['Last Manual Party Connect Port'] = port
config.commit()
ba.internal.connect_to_party(resolved_address, port=port)