From dc433ef4f1186ddfe8bf66b196d020135ea73ddf Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Sun, 21 Apr 2024 17:58:45 +0530 Subject: [PATCH 1/3] Now drawing a controller for author text --- index.json | 7 +------ plugin_manager.py | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/index.json b/index.json index f92ef94..35dcae8 100644 --- a/index.json +++ b/index.json @@ -1,12 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.0.14": { - "api_version": 8, - "commit_sha": "0090a02", - "released_on": "21-04-2024", - "md5sum": "c152f1e515c1a43445038694599de2f3" - }, + "1.0.14": null, "1.0.13": { "api_version": 8, "commit_sha": "2a4cb47", diff --git a/plugin_manager.py b/plugin_manager.py index a95f678..d87f3be 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1030,6 +1030,12 @@ class PluginWindow(popup.PopupWindow): pos -= 25 # Author 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, position=(width * 0.49 - (len(text)*14/2), pos - 10), size=(len(text)*14, 20), @@ -1037,10 +1043,10 @@ class PluginWindow(popup.PopupWindow): v_align='center', text=text, scale=text_scale * 0.8, - color=color, + color=(0.45, 0.36, 0.46), maxwidth=width * 0.9, - selectable=True, - on_activate_call=lambda: AuthorsWindow(self.plugin.info["authors"], self._root_widget)) + draw_controller=author_text_control_btn, + ) pos -= 35 # status = bui.textwidget(parent=self._root_widget, # position=(width * 0.49, pos), size=(0, 0), @@ -1088,7 +1094,7 @@ class PluginWindow(popup.PopupWindow): button1_action = self.install if to_draw_button1: - bui.buttonwidget(parent=self._root_widget, + button1 = bui.buttonwidget(parent=self._root_widget, position=( width * ( 0.1 if self.plugin.is_installed and has_update else @@ -1114,7 +1120,7 @@ class PluginWindow(popup.PopupWindow): label=button2_label) if has_update: - bui.buttonwidget(parent=self._root_widget, + button1 = bui.buttonwidget(parent=self._root_widget, position=(width * 0.7, pos), size=button_size, on_activate_call=button3_action, @@ -1125,7 +1131,8 @@ class PluginWindow(popup.PopupWindow): text_scale=1, label=button3_label) 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 450 if _uiscale is babase.UIScale.MEDIUM else 440) From fc5a7f1c899e03726daac7f7b553cb272d245bf8 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Sun, 21 Apr 2024 12:31:31 +0000 Subject: [PATCH 2/3] [ci] auto-format --- plugin_manager.py | 55 ++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index d87f3be..8d7e528 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1031,11 +1031,12 @@ class PluginWindow(popup.PopupWindow): # Author 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)) + 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, position=(width * 0.49 - (len(text)*14/2), pos - 10), size=(len(text)*14, 20), @@ -1046,7 +1047,7 @@ class PluginWindow(popup.PopupWindow): color=(0.45, 0.36, 0.46), maxwidth=width * 0.9, draw_controller=author_text_control_btn, - ) + ) pos -= 35 # status = bui.textwidget(parent=self._root_widget, # position=(width * 0.49, pos), size=(0, 0), @@ -1095,18 +1096,18 @@ class PluginWindow(popup.PopupWindow): if to_draw_button1: button1 = bui.buttonwidget(parent=self._root_widget, - position=( - width * ( - 0.1 if self.plugin.is_installed and has_update else - 0.25 if self.plugin.is_installed else - 0.4), pos), - size=button_size, - on_activate_call=button1_action, - color=b1_color, - textcolor=b_text_color, - button_type='square', - text_scale=1, - label=button1_label) + position=( + width * ( + 0.1 if self.plugin.is_installed and has_update else + 0.25 if self.plugin.is_installed else + 0.4), pos), + size=button_size, + on_activate_call=button1_action, + color=b1_color, + textcolor=b_text_color, + button_type='square', + text_scale=1, + label=button1_label) if self.plugin.is_installed: bui.buttonwidget(parent=self._root_widget, @@ -1121,15 +1122,15 @@ class PluginWindow(popup.PopupWindow): if has_update: button1 = bui.buttonwidget(parent=self._root_widget, - position=(width * 0.7, pos), - size=button_size, - on_activate_call=button3_action, - color=b3_color, - textcolor=b_text_color, - autoselect=True, - button_type='square', - text_scale=1, - label=button3_label) + position=(width * 0.7, pos), + size=button_size, + on_activate_call=button3_action, + color=b3_color, + textcolor=b_text_color, + autoselect=True, + button_type='square', + text_scale=1, + label=button3_label) bui.containerwidget(edit=self._root_widget, on_cancel_call=self._cancel, selected_child=button1) From c18052bfe5da6c5e9cae8ebed0f0acf2240a95c3 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Sun, 21 Apr 2024 12:31:32 +0000 Subject: [PATCH 3/3] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index 35dcae8..4996de1 100644 --- a/index.json +++ b/index.json @@ -1,7 +1,12 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { - "1.0.14": null, + "1.0.14": { + "api_version": 8, + "commit_sha": "fc5a7f1", + "released_on": "21-04-2024", + "md5sum": "d25f8b80387d532d1d8aa3b84b35b696" + }, "1.0.13": { "api_version": 8, "commit_sha": "2a4cb47",