mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
update apw
This commit is contained in:
parent
2541ed6473
commit
bc4780d461
2 changed files with 38 additions and 31 deletions
|
|
@ -415,6 +415,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"versions": {
|
"versions": {
|
||||||
|
"2.0.2": null,
|
||||||
"2.0.1": {
|
"2.0.1": {
|
||||||
"api_version": 8,
|
"api_version": 8,
|
||||||
"commit_sha": "d511c15",
|
"commit_sha": "d511c15",
|
||||||
|
|
|
||||||
|
|
@ -76,8 +76,11 @@ ssl._create_default_https_context = ssl._create_unverified_context
|
||||||
def newconnect_to_party(address, port=43210, print_progress=False):
|
def newconnect_to_party(address, port=43210, print_progress=False):
|
||||||
global ip_add
|
global ip_add
|
||||||
global p_port
|
global p_port
|
||||||
|
bs.chatmessage(" Joined IP "+ip_add+" PORT "+str(p_port))
|
||||||
dd = bs.get_connection_to_host_info()
|
dd = bs.get_connection_to_host_info()
|
||||||
|
if dd.get('name', '') != '':
|
||||||
|
title = dd['name']
|
||||||
|
bs.chatmessage(title)
|
||||||
if (dd != {}):
|
if (dd != {}):
|
||||||
bs.disconnect_from_host()
|
bs.disconnect_from_host()
|
||||||
|
|
||||||
|
|
@ -356,7 +359,8 @@ command to kick %s?",
|
||||||
"unmutethisguy": "unmute this guy",
|
"unmutethisguy": "unmute this guy",
|
||||||
"mutethisguy": "mute this guy",
|
"mutethisguy": "mute this guy",
|
||||||
"muteall": "Mute all",
|
"muteall": "Mute all",
|
||||||
"unmuteall": "Unmute all"
|
"unmuteall": "Unmute all",
|
||||||
|
"copymsg":"copy"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -493,6 +497,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
color=(0.4, 0.6, 0.3))
|
color=(0.4, 0.6, 0.3))
|
||||||
self._columnwidget = bui.columnwidget(parent=self._scrollwidget,
|
self._columnwidget = bui.columnwidget(parent=self._scrollwidget,
|
||||||
border=2,
|
border=2,
|
||||||
|
left_border=-200,
|
||||||
margin=0)
|
margin=0)
|
||||||
bui.widget(edit=self._menu_button, down_widget=self._columnwidget)
|
bui.widget(edit=self._menu_button, down_widget=self._columnwidget)
|
||||||
|
|
||||||
|
|
@ -651,38 +656,49 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
if True:
|
if True:
|
||||||
self._add_msg(msg)
|
self._add_msg(msg)
|
||||||
|
|
||||||
def _on_chat_press(self, msg, widget):
|
def _copy_msg(self, msg: str) -> None:
|
||||||
global unmuted_names
|
if bui.clipboard_is_supported():
|
||||||
if msg.split(":")[0] in unmuted_names:
|
bui.clipboard_set_text(msg)
|
||||||
|
bui.screenmessage(
|
||||||
|
bui.Lstr(resource='copyConfirmText'),
|
||||||
|
color=(0, 1, 0)
|
||||||
|
)
|
||||||
|
|
||||||
choices = ['mute']
|
def _on_chat_press(self, msg, widget, showMute):
|
||||||
choices_display = [_getTransText("mutethisguy", isBaLstr=True)]
|
global unmuted_names
|
||||||
|
choices = ['copy']
|
||||||
|
choices_display = [_getTransText("copymsg", isBaLstr=True)]
|
||||||
|
if showMute:
|
||||||
|
if msg.split(":")[0].encode('utf-8') in unmuted_names:
|
||||||
|
choices.append('mute')
|
||||||
|
choices_display.append(_getTransText("mutethisguy", isBaLstr=True))
|
||||||
else:
|
else:
|
||||||
choices = ['unmute']
|
choices.append('unmute')
|
||||||
choices_display = [_getTransText("unmutethisguy", isBaLstr=True)]
|
choices_display.append(_getTransText("unmutethisguy", isBaLstr=True))
|
||||||
PopupMenuWindow(position=widget.get_screen_space_center(),
|
PopupMenuWindow(position=widget.get_screen_space_center(),
|
||||||
scale=_get_popup_window_scale(),
|
scale=_get_popup_window_scale(),
|
||||||
choices=choices,
|
choices=choices,
|
||||||
choices_display=choices_display,
|
choices_display=choices_display,
|
||||||
current_choice="@ this guy",
|
current_choice="@ this guy",
|
||||||
delegate=self)
|
delegate=self)
|
||||||
self.msg_user_selected = msg.split(":")[0]
|
self.msg_user_selected = msg
|
||||||
self._popup_type = "chatmessagepress"
|
self._popup_type = "chatmessagepress"
|
||||||
|
|
||||||
# bs.chatmessage("pressed")
|
# bs.chatmessage("pressed")
|
||||||
|
|
||||||
def _add_msg(self, msg: str) -> None:
|
def _add_msg(self, msg: str) -> None:
|
||||||
try:
|
try:
|
||||||
if babase.app.config.resolve('Chat Muted'):
|
showMute = babase.app.config.resolve('Chat Muted')
|
||||||
|
if True:
|
||||||
txt = bui.textwidget(parent=self._columnwidget,
|
txt = bui.textwidget(parent=self._columnwidget,
|
||||||
text=msg,
|
text=msg,
|
||||||
h_align='left',
|
h_align='left',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
size=(130, 13),
|
size=(900, 13),
|
||||||
scale=0.55,
|
scale=0.55,
|
||||||
position=(-0.6, 0),
|
position=(-0.6, 0),
|
||||||
selectable=True,
|
selectable=True,
|
||||||
|
autoselect=True,
|
||||||
click_activate=True,
|
click_activate=True,
|
||||||
maxwidth=self._scroll_width * 0.94,
|
maxwidth=self._scroll_width * 0.94,
|
||||||
shadow=0.3,
|
shadow=0.3,
|
||||||
|
|
@ -690,21 +706,9 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
bui.textwidget(edit=txt,
|
bui.textwidget(edit=txt,
|
||||||
on_activate_call=babase.Call(
|
on_activate_call=babase.Call(
|
||||||
self._on_chat_press,
|
self._on_chat_press,
|
||||||
msg, txt))
|
msg, txt, showMute))
|
||||||
else:
|
|
||||||
txt = bui.textwidget(parent=self._columnwidget,
|
|
||||||
text=msg,
|
|
||||||
h_align='left',
|
|
||||||
v_align='center',
|
|
||||||
size=(0, 13),
|
|
||||||
scale=0.55,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
maxwidth=self._scroll_width * 0.94,
|
|
||||||
shadow=0.3,
|
|
||||||
flatness=1.0)
|
|
||||||
|
|
||||||
# btn = bui.buttonwidget(parent=self._columnwidget,
|
# btn = bui.buttonwidget(parent=self._columnwidget,
|
||||||
# scale=0.7,
|
# scale=0.7,
|
||||||
# size=(100,20),
|
# size=(100,20),
|
||||||
|
|
@ -720,6 +724,7 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def _add_msg_when_muted(self, msg: str) -> None:
|
def _add_msg_when_muted(self, msg: str) -> None:
|
||||||
|
|
||||||
txt = bui.textwidget(parent=self._columnwidget,
|
txt = bui.textwidget(parent=self._columnwidget,
|
||||||
|
|
@ -1421,10 +1426,11 @@ class ModifiedPartyWindow(bascenev1lib_party.PartyWindow):
|
||||||
|
|
||||||
elif self._popup_type == "chatmessagepress":
|
elif self._popup_type == "chatmessagepress":
|
||||||
if choice == "mute":
|
if choice == "mute":
|
||||||
|
unmuted_names.remove(self.msg_user_selected.split(":")[0].encode('utf-8'))
|
||||||
unmuted_names.remove(self.msg_user_selected)
|
|
||||||
if choice == "unmute":
|
if choice == "unmute":
|
||||||
unmuted_names.append(self.msg_user_selected)
|
unmuted_names.append(self.msg_user_selected.split(":")[0].encode('utf-8'))
|
||||||
|
if choice == "copy":
|
||||||
|
self._copy_msg(self.msg_user_selected)
|
||||||
|
|
||||||
elif self._popup_type == "partyMemberPress":
|
elif self._popup_type == "partyMemberPress":
|
||||||
if choice == "kick":
|
if choice == "kick":
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue