mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 16:13:23 +08:00
tidying and translation entries for PRs
This commit is contained in:
parent
6cee63f44f
commit
1e84871511
@ -429,12 +429,12 @@
|
|||||||
"assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/4e/8c/72ddb584856a15dfb11df95f9283",
|
"assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/4e/8c/72ddb584856a15dfb11df95f9283",
|
||||||
"assets/build/ba_data/data/languages/danish.json": "https://files.ballistica.net/cache/ba1/6a/fa/fcf4a804beaff927b0f12c179eaa",
|
"assets/build/ba_data/data/languages/danish.json": "https://files.ballistica.net/cache/ba1/6a/fa/fcf4a804beaff927b0f12c179eaa",
|
||||||
"assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad",
|
"assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad",
|
||||||
"assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/ad/85/3caf0c981389e46835862248386a",
|
"assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/15/9d/5199b6a053922c2f9cc0f705e113",
|
||||||
"assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/ac/f5/c0922a99e40dfc9f5e026d43b533",
|
"assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/ac/f5/c0922a99e40dfc9f5e026d43b533",
|
||||||
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/dc/50/c109f475599608a7e8fdacea667c",
|
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/dc/50/c109f475599608a7e8fdacea667c",
|
||||||
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/4f/4d/b259b145a69db1d34052281bb3bb",
|
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/4f/4d/b259b145a69db1d34052281bb3bb",
|
||||||
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/cb/7b/b881356f22e5f8293a5e4b8976ae",
|
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/cb/7b/b881356f22e5f8293a5e4b8976ae",
|
||||||
"assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/ee/fa/6eb38e7d4cfd13702c66d37b9723",
|
"assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/09/c3/029c8d6357aa2dc5a3ac3560265a",
|
||||||
"assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/8a/82/392f2a4e0e6e5a5e367f19e49538",
|
"assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/8a/82/392f2a4e0e6e5a5e367f19e49538",
|
||||||
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/2e/d1/b506ddf3d27af7be1ae6159531a3",
|
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/2e/d1/b506ddf3d27af7be1ae6159531a3",
|
||||||
"assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/b2/81/53c8cd7617d649403e539c3a6171",
|
"assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/b2/81/53c8cd7617d649403e539c3a6171",
|
||||||
|
|||||||
1
.idea/dictionaries/ericf.xml
generated
1
.idea/dictionaries/ericf.xml
generated
@ -1922,6 +1922,7 @@
|
|||||||
<w>plistname</w>
|
<w>plistname</w>
|
||||||
<w>plpt</w>
|
<w>plpt</w>
|
||||||
<w>plst</w>
|
<w>plst</w>
|
||||||
|
<w>pluginsettings</w>
|
||||||
<w>plugkey</w>
|
<w>plugkey</w>
|
||||||
<w>plugkeys</w>
|
<w>plugkeys</w>
|
||||||
<w>pluglist</w>
|
<w>pluglist</w>
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
### 1.7.19 (build 20993, api 7, 2023-01-17)
|
### 1.7.19 (build 20993, api 7, 2023-01-17)
|
||||||
|
- Fixes an issue where repeated curses could use incorrect countdown times (Thanks EraOSBeta!).
|
||||||
|
- Last manual party connect port is now saved. Previously, it always assumed the port to be 43210 (Thanks ritiek!).
|
||||||
|
- Added a plugin-settings window under the plugins UI for enabling/disabling, and setting whether plugins are auto-enabled (Thanks vishal332008!).
|
||||||
|
|
||||||
### 1.7.18 (build 20989, api 7, 2023-01-16)
|
### 1.7.18 (build 20989, api 7, 2023-01-16)
|
||||||
- Reworked some low level asynchronous messaging functionality in efro.message and efro.rpc. Previously these were a little *too* asynchronous which could lead to messages being received in a different order than they were sent, which is not desirable.
|
- Reworked some low level asynchronous messaging functionality in efro.message and efro.rpc. Previously these were a little *too* asynchronous which could lead to messages being received in a different order than they were sent, which is not desirable.
|
||||||
|
|||||||
@ -22,6 +22,9 @@ class PluginSubsystem:
|
|||||||
Access the single shared instance of this class at `ba.app.plugins`.
|
Access the single shared instance of this class at `ba.app.plugins`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
AUTO_ENABLE_NEW_PLUGINS_CONFIG_KEY = 'Auto Enable New Plugins'
|
||||||
|
AUTO_ENABLE_NEW_PLUGINS_DEFAULT = True
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.potential_plugins: list[ba.PotentialPlugin] = []
|
self.potential_plugins: list[ba.PotentialPlugin] = []
|
||||||
self.active_plugins: dict[str, ba.Plugin] = {}
|
self.active_plugins: dict[str, ba.Plugin] = {}
|
||||||
@ -48,7 +51,13 @@ class PluginSubsystem:
|
|||||||
available=True,
|
available=True,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if _ba.app.config['Auto Enable New Plugins'] is True:
|
if (
|
||||||
|
_ba.app.config.get(
|
||||||
|
self.AUTO_ENABLE_NEW_PLUGINS_CONFIG_KEY,
|
||||||
|
self.AUTO_ENABLE_NEW_PLUGINS_DEFAULT,
|
||||||
|
)
|
||||||
|
is True
|
||||||
|
):
|
||||||
if class_path not in plugstates:
|
if class_path not in plugstates:
|
||||||
# Go ahead and enable new plugins by default, but we'll
|
# Go ahead and enable new plugins by default, but we'll
|
||||||
# inform the user that they need to restart to pick them up.
|
# inform the user that they need to restart to pick them up.
|
||||||
|
|||||||
@ -1,166 +1,169 @@
|
|||||||
# Released under the MIT License. See LICENSE for details.
|
# Released under the MIT License. See LICENSE for details.
|
||||||
#
|
#
|
||||||
"""Plugin Settings UI."""
|
"""Plugin Settings UI."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
import ba
|
import ba
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class PluginSettingsWindow(ba.Window):
|
class PluginSettingsWindow(ba.Window):
|
||||||
"""Plugin Settings Window"""
|
"""Plugin Settings Window"""
|
||||||
|
|
||||||
def __init__(self, transition: str = 'in_right'):
|
def __init__(self, transition: str = 'in_right'):
|
||||||
|
|
||||||
scale_origin: tuple[float, float] | None
|
scale_origin: tuple[float, float] | None
|
||||||
self._transition_out = 'out_right'
|
self._transition_out = 'out_right'
|
||||||
scale_origin = None
|
scale_origin = None
|
||||||
|
|
||||||
uiscale = ba.app.ui.uiscale
|
uiscale = ba.app.ui.uiscale
|
||||||
width = 470.0 if uiscale is ba.UIScale.SMALL else 470.0
|
width = 470.0 if uiscale is ba.UIScale.SMALL else 470.0
|
||||||
height = (
|
height = (
|
||||||
365.0
|
365.0
|
||||||
if uiscale is ba.UIScale.SMALL
|
if uiscale is ba.UIScale.SMALL
|
||||||
else 300.0
|
else 300.0
|
||||||
if uiscale is ba.UIScale.MEDIUM
|
if uiscale is ba.UIScale.MEDIUM
|
||||||
else 370.0
|
else 370.0
|
||||||
)
|
)
|
||||||
top_extra = 10 if uiscale is ba.UIScale.SMALL else 0
|
top_extra = 10 if uiscale is ba.UIScale.SMALL else 0
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=ba.containerwidget(
|
root_widget=ba.containerwidget(
|
||||||
size=(width, height + top_extra),
|
size=(width, height + top_extra),
|
||||||
transition=transition,
|
transition=transition,
|
||||||
toolbar_visibility='menu_minimal',
|
toolbar_visibility='menu_minimal',
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
scale=(
|
scale=(
|
||||||
2.06
|
2.06
|
||||||
if uiscale is ba.UIScale.SMALL
|
if uiscale is ba.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4
|
||||||
if uiscale is ba.UIScale.MEDIUM
|
if uiscale is ba.UIScale.MEDIUM
|
||||||
else 1.0
|
else 1.0
|
||||||
),
|
),
|
||||||
stack_offset=(0, -25)
|
stack_offset=(0, -25)
|
||||||
if uiscale is ba.UIScale.SMALL
|
if uiscale is ba.UIScale.SMALL
|
||||||
else (0, 0),
|
else (0, 0),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
self._back_button = ba.buttonwidget(
|
self._back_button = ba.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(53, height - 60),
|
position=(53, height - 60),
|
||||||
size=(60, 60),
|
size=(60, 60),
|
||||||
scale=0.8,
|
scale=0.8,
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
label=ba.charstr(ba.SpecialChar.BACK),
|
label=ba.charstr(ba.SpecialChar.BACK),
|
||||||
button_type='backSmall',
|
button_type='backSmall',
|
||||||
on_activate_call=self._do_back,
|
on_activate_call=self._do_back,
|
||||||
)
|
)
|
||||||
ba.containerwidget(
|
ba.containerwidget(
|
||||||
edit=self._root_widget, cancel_button=self._back_button
|
edit=self._root_widget, cancel_button=self._back_button
|
||||||
)
|
)
|
||||||
|
|
||||||
self._title_text = ba.textwidget(
|
self._title_text = ba.textwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(0, height - 52),
|
position=(0, height - 52),
|
||||||
size=(width, 25),
|
size=(width, 25),
|
||||||
text=ba.Lstr(resource='pluginSettingsText'),
|
text=ba.Lstr(resource='pluginSettingsText'),
|
||||||
color=ba.app.ui.title_color,
|
color=ba.app.ui.title_color,
|
||||||
h_align='center',
|
h_align='center',
|
||||||
v_align='top',
|
v_align='top',
|
||||||
)
|
)
|
||||||
|
|
||||||
self._y_position = 170 if uiscale is ba.UIScale.MEDIUM else 205
|
self._y_position = 170 if uiscale is ba.UIScale.MEDIUM else 205
|
||||||
self._enable_plugins_button = ba.buttonwidget(
|
self._enable_plugins_button = ba.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(65, self._y_position),
|
position=(65, self._y_position),
|
||||||
size=(350, 60),
|
size=(350, 60),
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
label=ba.Lstr(resource='pluginsEnableAllText'),
|
label=ba.Lstr(resource='pluginsEnableAllText'),
|
||||||
text_scale=1.0,
|
text_scale=1.0,
|
||||||
on_activate_call=self._enable_all_plugins,
|
on_activate_call=self._enable_all_plugins,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._y_position -= 70
|
self._y_position -= 70
|
||||||
self._disable_plugins_button = ba.buttonwidget(
|
self._disable_plugins_button = ba.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(65, self._y_position),
|
position=(65, self._y_position),
|
||||||
size=(350, 60),
|
size=(350, 60),
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
label=ba.Lstr(resource='pluginsDisableAllText'),
|
label=ba.Lstr(resource='pluginsDisableAllText'),
|
||||||
text_scale=1.0,
|
text_scale=1.0,
|
||||||
on_activate_call=self._disable_all_plugins,
|
on_activate_call=self._disable_all_plugins,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._y_position -= 70
|
self._y_position -= 70
|
||||||
self._enable_new_plugins_check_box = ba.checkboxwidget(
|
self._enable_new_plugins_check_box = ba.checkboxwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(65, self._y_position),
|
position=(65, self._y_position),
|
||||||
size=(350, 60),
|
size=(350, 60),
|
||||||
value=ba.app.config['Auto Enable New Plugins'],
|
value=ba.app.config.get(
|
||||||
text=ba.Lstr(resource='AutoEnableNewPluginsText'),
|
ba.app.plugins.AUTO_ENABLE_NEW_PLUGINS_CONFIG_KEY,
|
||||||
scale=1.0,
|
ba.app.plugins.AUTO_ENABLE_NEW_PLUGINS_DEFAULT,
|
||||||
maxwidth=430,
|
),
|
||||||
on_value_change_call=self._update_value,
|
text=ba.Lstr(resource='pluginsAutoEnableNewText'),
|
||||||
)
|
scale=1.0,
|
||||||
|
maxwidth=430,
|
||||||
ba.widget(
|
on_value_change_call=self._update_value,
|
||||||
edit=self._back_button, down_widget=self._enable_plugins_button
|
)
|
||||||
)
|
|
||||||
|
ba.widget(
|
||||||
ba.widget(
|
edit=self._back_button, down_widget=self._enable_plugins_button
|
||||||
edit=self._disable_plugins_button,
|
)
|
||||||
left_widget=self._disable_plugins_button,
|
|
||||||
)
|
ba.widget(
|
||||||
|
edit=self._disable_plugins_button,
|
||||||
ba.widget(
|
left_widget=self._disable_plugins_button,
|
||||||
edit=self._enable_new_plugins_check_box,
|
)
|
||||||
left_widget=self._enable_new_plugins_check_box,
|
|
||||||
right_widget=self._enable_new_plugins_check_box,
|
ba.widget(
|
||||||
down_widget=self._enable_new_plugins_check_box,
|
edit=self._enable_new_plugins_check_box,
|
||||||
)
|
left_widget=self._enable_new_plugins_check_box,
|
||||||
|
right_widget=self._enable_new_plugins_check_box,
|
||||||
def _enable_all_plugins(self) -> None:
|
down_widget=self._enable_new_plugins_check_box,
|
||||||
cfg = ba.app.config
|
)
|
||||||
plugs = cfg['Plugins']
|
|
||||||
for plug in plugs:
|
def _enable_all_plugins(self) -> None:
|
||||||
plugs[plug]['enabled'] = True
|
cfg = ba.app.config
|
||||||
cfg.apply_and_commit()
|
plugs: dict[str, dict] = cfg.setdefault('Plugins', {})
|
||||||
|
for plug in plugs.values():
|
||||||
ba.screenmessage(
|
plug['enabled'] = True
|
||||||
ba.Lstr(resource='settingsWindowAdvanced.mustRestartText'),
|
cfg.apply_and_commit()
|
||||||
color=(1.0, 0.5, 0.0),
|
|
||||||
)
|
ba.screenmessage(
|
||||||
|
ba.Lstr(resource='settingsWindowAdvanced.mustRestartText'),
|
||||||
def _disable_all_plugins(self) -> None:
|
color=(1.0, 0.5, 0.0),
|
||||||
cfg = ba.app.config
|
)
|
||||||
plugs = cfg['Plugins']
|
|
||||||
for plug in plugs:
|
def _disable_all_plugins(self) -> None:
|
||||||
plugs[plug]['enabled'] = False
|
cfg = ba.app.config
|
||||||
cfg.apply_and_commit()
|
plugs: dict[str, dict] = cfg.setdefault('Plugins', {})
|
||||||
|
for plug in plugs.values():
|
||||||
ba.screenmessage(
|
plug['enabled'] = False
|
||||||
ba.Lstr(resource='settingsWindowAdvanced.mustRestartText'),
|
cfg.apply_and_commit()
|
||||||
color=(1.0, 0.5, 0.0),
|
|
||||||
)
|
ba.screenmessage(
|
||||||
|
ba.Lstr(resource='settingsWindowAdvanced.mustRestartText'),
|
||||||
def _update_value(self, val: bool) -> None:
|
color=(1.0, 0.5, 0.0),
|
||||||
cfg = ba.app.config
|
)
|
||||||
cfg['Auto Enable New Plugins'] = val
|
|
||||||
cfg.apply_and_commit()
|
def _update_value(self, val: bool) -> None:
|
||||||
|
cfg = ba.app.config
|
||||||
def _do_back(self) -> None:
|
cfg[ba.app.plugins.AUTO_ENABLE_NEW_PLUGINS_CONFIG_KEY] = val
|
||||||
# pylint: disable=cyclic-import
|
cfg.apply_and_commit()
|
||||||
from bastd.ui.settings.plugins import PluginWindow
|
|
||||||
|
def _do_back(self) -> None:
|
||||||
ba.containerwidget(
|
# pylint: disable=cyclic-import
|
||||||
edit=self._root_widget, transition=self._transition_out
|
from bastd.ui.settings.plugins import PluginWindow
|
||||||
)
|
|
||||||
ba.app.ui.set_main_menu_window(
|
ba.containerwidget(
|
||||||
PluginWindow(transition='in_left').get_root_widget()
|
edit=self._root_widget, transition=self._transition_out
|
||||||
)
|
)
|
||||||
|
ba.app.ui.set_main_menu_window(
|
||||||
|
PluginWindow(transition='in_left').get_root_widget()
|
||||||
|
)
|
||||||
|
|||||||
@ -1030,6 +1030,7 @@
|
|||||||
<w>playpause</w>
|
<w>playpause</w>
|
||||||
<w>playsound</w>
|
<w>playsound</w>
|
||||||
<w>plen</w>
|
<w>plen</w>
|
||||||
|
<w>pluginsettings</w>
|
||||||
<w>plugnames</w>
|
<w>plugnames</w>
|
||||||
<w>pname</w>
|
<w>pname</w>
|
||||||
<w>podcast</w>
|
<w>podcast</w>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user