mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Now drawing a controller for author text
This commit is contained in:
parent
83220e6b5d
commit
dc433ef4f1
2 changed files with 14 additions and 12 deletions
|
|
@ -1,12 +1,7 @@
|
||||||
{
|
{
|
||||||
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
||||||
"versions": {
|
"versions": {
|
||||||
"1.0.14": {
|
"1.0.14": null,
|
||||||
"api_version": 8,
|
|
||||||
"commit_sha": "0090a02",
|
|
||||||
"released_on": "21-04-2024",
|
|
||||||
"md5sum": "c152f1e515c1a43445038694599de2f3"
|
|
||||||
},
|
|
||||||
"1.0.13": {
|
"1.0.13": {
|
||||||
"api_version": 8,
|
"api_version": 8,
|
||||||
"commit_sha": "2a4cb47",
|
"commit_sha": "2a4cb47",
|
||||||
|
|
|
||||||
|
|
@ -1030,6 +1030,12 @@ class PluginWindow(popup.PopupWindow):
|
||||||
pos -= 25
|
pos -= 25
|
||||||
# Author
|
# Author
|
||||||
text = 'by ' + ', '.join([author["name"] for author in self.plugin.info["authors"]])
|
text = 'by ' + ', '.join([author["name"] for author in self.plugin.info["authors"]])
|
||||||
|
author_text_control_btn = bui.buttonwidget(parent=self._root_widget,
|
||||||
|
position=(width * 0.49 - (len(text)*14/2), pos - 10),
|
||||||
|
size=(len(text)*14, 20),
|
||||||
|
label='',
|
||||||
|
texture=bui.gettexture("empty"),
|
||||||
|
on_activate_call=lambda: AuthorsWindow(self.plugin.info["authors"], self._root_widget))
|
||||||
bui.textwidget(parent=self._root_widget,
|
bui.textwidget(parent=self._root_widget,
|
||||||
position=(width * 0.49 - (len(text)*14/2), pos - 10),
|
position=(width * 0.49 - (len(text)*14/2), pos - 10),
|
||||||
size=(len(text)*14, 20),
|
size=(len(text)*14, 20),
|
||||||
|
|
@ -1037,10 +1043,10 @@ class PluginWindow(popup.PopupWindow):
|
||||||
v_align='center',
|
v_align='center',
|
||||||
text=text,
|
text=text,
|
||||||
scale=text_scale * 0.8,
|
scale=text_scale * 0.8,
|
||||||
color=color,
|
color=(0.45, 0.36, 0.46),
|
||||||
maxwidth=width * 0.9,
|
maxwidth=width * 0.9,
|
||||||
selectable=True,
|
draw_controller=author_text_control_btn,
|
||||||
on_activate_call=lambda: AuthorsWindow(self.plugin.info["authors"], self._root_widget))
|
)
|
||||||
pos -= 35
|
pos -= 35
|
||||||
# status = bui.textwidget(parent=self._root_widget,
|
# status = bui.textwidget(parent=self._root_widget,
|
||||||
# position=(width * 0.49, pos), size=(0, 0),
|
# position=(width * 0.49, pos), size=(0, 0),
|
||||||
|
|
@ -1088,7 +1094,7 @@ class PluginWindow(popup.PopupWindow):
|
||||||
button1_action = self.install
|
button1_action = self.install
|
||||||
|
|
||||||
if to_draw_button1:
|
if to_draw_button1:
|
||||||
bui.buttonwidget(parent=self._root_widget,
|
button1 = bui.buttonwidget(parent=self._root_widget,
|
||||||
position=(
|
position=(
|
||||||
width * (
|
width * (
|
||||||
0.1 if self.plugin.is_installed and has_update else
|
0.1 if self.plugin.is_installed and has_update else
|
||||||
|
|
@ -1114,7 +1120,7 @@ class PluginWindow(popup.PopupWindow):
|
||||||
label=button2_label)
|
label=button2_label)
|
||||||
|
|
||||||
if has_update:
|
if has_update:
|
||||||
bui.buttonwidget(parent=self._root_widget,
|
button1 = bui.buttonwidget(parent=self._root_widget,
|
||||||
position=(width * 0.7, pos),
|
position=(width * 0.7, pos),
|
||||||
size=button_size,
|
size=button_size,
|
||||||
on_activate_call=button3_action,
|
on_activate_call=button3_action,
|
||||||
|
|
@ -1125,7 +1131,8 @@ class PluginWindow(popup.PopupWindow):
|
||||||
text_scale=1,
|
text_scale=1,
|
||||||
label=button3_label)
|
label=button3_label)
|
||||||
bui.containerwidget(edit=self._root_widget,
|
bui.containerwidget(edit=self._root_widget,
|
||||||
on_cancel_call=self._cancel)
|
on_cancel_call=self._cancel,
|
||||||
|
selected_child=button1)
|
||||||
|
|
||||||
open_pos_x = (390 if _uiscale is babase.UIScale.SMALL else
|
open_pos_x = (390 if _uiscale is babase.UIScale.SMALL else
|
||||||
450 if _uiscale is babase.UIScale.MEDIUM else 440)
|
450 if _uiscale is babase.UIScale.MEDIUM else 440)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue