mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2026-08-15 13:03:08 +00:00
Merge pull request #398 from Freaku17/main
Fix APW/Translate for 1.7.53
This commit is contained in:
commit
49a871289e
3 changed files with 30 additions and 16 deletions
|
|
@ -382,6 +382,12 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versions": {
|
"versions": {
|
||||||
|
"1.1.3": {
|
||||||
|
"api_version": 9,
|
||||||
|
"commit_sha": "23f90dc",
|
||||||
|
"released_on": "27-10-2025",
|
||||||
|
"md5sum": "41f8d6185eda5571fd4c48f634e8d59d"
|
||||||
|
},
|
||||||
"1.1.2": {
|
"1.1.2": {
|
||||||
"api_version": 9,
|
"api_version": 9,
|
||||||
"commit_sha": "e604a3c",
|
"commit_sha": "e604a3c",
|
||||||
|
|
@ -1036,6 +1042,12 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versions": {
|
"versions": {
|
||||||
|
"2.1.5": {
|
||||||
|
"api_version": 9,
|
||||||
|
"commit_sha": "a36e3c2",
|
||||||
|
"released_on": "28-10-2025",
|
||||||
|
"md5sum": "3709d73385137f6ae47ee1481213a014"
|
||||||
|
},
|
||||||
"2.1.4": {
|
"2.1.4": {
|
||||||
"api_version": 9,
|
"api_version": 9,
|
||||||
"commit_sha": "e604a3c",
|
"commit_sha": "e604a3c",
|
||||||
|
|
|
||||||
|
|
@ -393,7 +393,10 @@ customchatThread().run()
|
||||||
|
|
||||||
class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
def __init__(self, origin: Sequence[float] = (0, 0)):
|
def __init__(self, origin: Sequence[float] = (0, 0)):
|
||||||
bui.set_party_window_open(True)
|
if _babase.env().get("build_number") >= 22597:
|
||||||
|
self._uiopenstate = bui.UIOpenState('classicparty')
|
||||||
|
else:
|
||||||
|
bui.set_party_window_open(True)
|
||||||
self._r = 'partyWindow'
|
self._r = 'partyWindow'
|
||||||
self.msg_user_selected = ''
|
self.msg_user_selected = ''
|
||||||
self._popup_type: Optional[str] = None
|
self._popup_type: Optional[str] = None
|
||||||
|
|
@ -454,7 +457,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
label="\xee\x80\x90",
|
label="\xee\x80\x90",
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
button_type='square',
|
button_type='square',
|
||||||
on_activate_call=bs.WeakCall(self._on_menu_button_press),
|
on_activate_call=bs.WeakCallStrict(self._on_menu_button_press),
|
||||||
color=(0.55, 0.73, 0.25),
|
color=(0.55, 0.73, 0.25),
|
||||||
icon=bui.gettexture('menuButton'),
|
icon=bui.gettexture('menuButton'),
|
||||||
iconscale=1.2)
|
iconscale=1.2)
|
||||||
|
|
@ -633,7 +636,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
self.smoothy_mode = 1
|
self.smoothy_mode = 1
|
||||||
self.full_chat_mode = False
|
self.full_chat_mode = False
|
||||||
self._update_timer = babase.AppTimer(1.0,
|
self._update_timer = babase.AppTimer(1.0,
|
||||||
bs.WeakCall(self._update),
|
bs.WeakCallStrict(self._update),
|
||||||
repeat=True)
|
repeat=True)
|
||||||
|
|
||||||
self._update()
|
self._update()
|
||||||
|
|
@ -703,7 +706,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
shadow=0.3,
|
shadow=0.3,
|
||||||
flatness=1.0)
|
flatness=1.0)
|
||||||
bui.textwidget(edit=txt,
|
bui.textwidget(edit=txt,
|
||||||
on_activate_call=babase.Call(
|
on_activate_call=babase.CallPartial(
|
||||||
self._on_chat_press,
|
self._on_chat_press,
|
||||||
msg, txt, showMute))
|
msg, txt, showMute))
|
||||||
|
|
||||||
|
|
@ -784,7 +787,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
cbtn = bui.buttonwidget(
|
cbtn = bui.buttonwidget(
|
||||||
parent=cnt,
|
parent=cnt,
|
||||||
label=babase.Lstr(resource='cancelText'),
|
label=babase.Lstr(resource='cancelText'),
|
||||||
on_activate_call=babase.Call(
|
on_activate_call=babase.CallPartial(
|
||||||
lambda c: bui.containerwidget(edit=c, transition='out_scale'),
|
lambda c: bui.containerwidget(edit=c, transition='out_scale'),
|
||||||
cnt),
|
cnt),
|
||||||
size=(180, 60),
|
size=(180, 60),
|
||||||
|
|
@ -794,7 +797,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
label='Rename',
|
label='Rename',
|
||||||
size=(180, 60),
|
size=(180, 60),
|
||||||
position=(c_width - 230, 30),
|
position=(c_width - 230, 30),
|
||||||
on_activate_call=babase.Call(
|
on_activate_call=babase.CallPartial(
|
||||||
self._add_nick, arg),
|
self._add_nick, arg),
|
||||||
autoselect=True)
|
autoselect=True)
|
||||||
bui.widget(edit=cbtn, right_widget=okb)
|
bui.widget(edit=cbtn, right_widget=okb)
|
||||||
|
|
@ -1317,7 +1320,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
# client_id is more readily available though).
|
# client_id is more readily available though).
|
||||||
try:
|
try:
|
||||||
bui.textwidget(edit=widget,
|
bui.textwidget(edit=widget,
|
||||||
on_activate_call=babase.Call(
|
on_activate_call=babase.CallPartial(
|
||||||
self._on_party_member_press,
|
self._on_party_member_press,
|
||||||
self._roster[index]['client_id'],
|
self._roster[index]['client_id'],
|
||||||
is_host, widget))
|
is_host, widget))
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ def translate(text, _callback, source='auto', target='en'):
|
||||||
for i in replace_list:
|
for i in replace_list:
|
||||||
result = result.replace(i[0], i[1])
|
result = result.replace(i[0], i[1])
|
||||||
if show_translate_result:
|
if show_translate_result:
|
||||||
bui.pushcall(bui.Call(_callback, result), from_other_thread=True)
|
bui.pushcall(bui.CallPartial(_callback, result), from_other_thread=True)
|
||||||
|
|
||||||
|
|
||||||
class NewPW(bauiv1lib.party.PartyWindow):
|
class NewPW(bauiv1lib.party.PartyWindow):
|
||||||
|
|
@ -103,7 +103,7 @@ class NewPW(bauiv1lib.party.PartyWindow):
|
||||||
maxwidth=self._scroll_width * 0.94,
|
maxwidth=self._scroll_width * 0.94,
|
||||||
shadow=0.3,
|
shadow=0.3,
|
||||||
flatness=1.0,
|
flatness=1.0,
|
||||||
on_activate_call=bui.Call(self._copy_msg, msg),
|
on_activate_call=bui.CallPartial(self._copy_msg, msg),
|
||||||
selectable=True,
|
selectable=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -113,7 +113,7 @@ class NewPW(bauiv1lib.party.PartyWindow):
|
||||||
bui.containerwidget(edit=self._columnwidget, visible_child=txt)
|
bui.containerwidget(edit=self._columnwidget, visible_child=txt)
|
||||||
|
|
||||||
bui.textwidget(edit=txt,
|
bui.textwidget(edit=txt,
|
||||||
on_activate_call=bui.Call(self._translate_other, msg),
|
on_activate_call=bui.CallPartial(self._translate_other, msg),
|
||||||
click_activate=True)
|
click_activate=True)
|
||||||
|
|
||||||
def _translate_other(self, msg: str):
|
def _translate_other(self, msg: str):
|
||||||
|
|
@ -155,7 +155,7 @@ class TranslateWindow:
|
||||||
transition='in_scale',
|
transition='in_scale',
|
||||||
scale=(2 if self._uiscale is babase.UIScale.SMALL else
|
scale=(2 if self._uiscale is babase.UIScale.SMALL else
|
||||||
1.4 if self._uiscale is babase.UIScale.MEDIUM else 1.3),
|
1.4 if self._uiscale is babase.UIScale.MEDIUM else 1.3),
|
||||||
on_outside_click_call=babase.Call(self._back, sound=True))
|
on_outside_click_call=babase.CallPartial(self._back, sound=True))
|
||||||
|
|
||||||
self._tips_text = bui.textwidget(parent=self._root_widget,
|
self._tips_text = bui.textwidget(parent=self._root_widget,
|
||||||
color=(0, 1, 1),
|
color=(0, 1, 1),
|
||||||
|
|
@ -200,7 +200,7 @@ class TranslateWindow:
|
||||||
self.other_source_button = PopupMenu(parent=self._root_widget,
|
self.other_source_button = PopupMenu(parent=self._root_widget,
|
||||||
position=(54, 140),
|
position=(54, 140),
|
||||||
autoselect=False,
|
autoselect=False,
|
||||||
on_value_change_call=babase.Call(
|
on_value_change_call=babase.CallStrict(
|
||||||
self._set_translate_language, 'O Source Trans Lang'),
|
self._set_translate_language, 'O Source Trans Lang'),
|
||||||
choices=available_translate_languages,
|
choices=available_translate_languages,
|
||||||
button_size=(150, 30),
|
button_size=(150, 30),
|
||||||
|
|
@ -209,7 +209,7 @@ class TranslateWindow:
|
||||||
self.other_target_button = PopupMenu(parent=self._root_widget,
|
self.other_target_button = PopupMenu(parent=self._root_widget,
|
||||||
position=(243, 140),
|
position=(243, 140),
|
||||||
autoselect=False,
|
autoselect=False,
|
||||||
on_value_change_call=babase.Call(
|
on_value_change_call=babase.CallStrict(
|
||||||
self._set_translate_language, 'O Target Trans Lang'),
|
self._set_translate_language, 'O Target Trans Lang'),
|
||||||
choices=available_translate_languages[1:],
|
choices=available_translate_languages[1:],
|
||||||
button_size=(150, 30),
|
button_size=(150, 30),
|
||||||
|
|
@ -218,7 +218,7 @@ class TranslateWindow:
|
||||||
self.your_source_button = PopupMenu(parent=self._root_widget,
|
self.your_source_button = PopupMenu(parent=self._root_widget,
|
||||||
position=(54, 55),
|
position=(54, 55),
|
||||||
autoselect=False,
|
autoselect=False,
|
||||||
on_value_change_call=babase.Call(
|
on_value_change_call=babase.CallStrict(
|
||||||
self._set_translate_language, 'Y Source Trans Lang'),
|
self._set_translate_language, 'Y Source Trans Lang'),
|
||||||
choices=available_translate_languages,
|
choices=available_translate_languages,
|
||||||
button_size=(150, 30),
|
button_size=(150, 30),
|
||||||
|
|
@ -227,7 +227,7 @@ class TranslateWindow:
|
||||||
self.your_target_button = PopupMenu(parent=self._root_widget,
|
self.your_target_button = PopupMenu(parent=self._root_widget,
|
||||||
position=(243, 55),
|
position=(243, 55),
|
||||||
autoselect=False,
|
autoselect=False,
|
||||||
on_value_change_call=babase.Call(
|
on_value_change_call=babase.CallStrict(
|
||||||
self._set_translate_language, 'Y Target Trans Lang'),
|
self._set_translate_language, 'Y Target Trans Lang'),
|
||||||
choices=available_translate_languages[1:],
|
choices=available_translate_languages[1:],
|
||||||
button_size=(150, 30),
|
button_size=(150, 30),
|
||||||
|
|
@ -247,7 +247,6 @@ class TranslateWindow:
|
||||||
|
|
||||||
|
|
||||||
# ba_meta require api 9
|
# ba_meta require api 9
|
||||||
|
|
||||||
# ba_meta export babase.Plugin
|
# ba_meta export babase.Plugin
|
||||||
class byFreaku(babase.Plugin):
|
class byFreaku(babase.Plugin):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue