From 527c99a16d6e170ac9626c251cf0f3125c30220a Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sat, 5 Apr 2025 01:27:18 +0200 Subject: [PATCH 01/32] Update advanced_party_window.py --- plugins/utilities/advanced_party_window.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/utilities/advanced_party_window.py b/plugins/utilities/advanced_party_window.py index 2ed089c..c765caf 100644 --- a/plugins/utilities/advanced_party_window.py +++ b/plugins/utilities/advanced_party_window.py @@ -78,9 +78,8 @@ def newconnect_to_party(address, port=43210, print_progress=False): global p_port bs.chatmessage(" Joined IP "+ip_add+" PORT "+str(p_port)) dd = bs.get_connection_to_host_info_2() - if dd != None and dd.get('name', '') != '': - title = dd['name'] - bs.chatmessage(title) + title = getattr(dd,'name','') + bs.chatmessage(title) if dd and title else None if (bool(dd)): bs.disconnect_from_host() From 637d83d6e113fd0b7bba678fa750222beecace31 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Fri, 4 Apr 2025 23:35:43 +0000 Subject: [PATCH 02/32] [ci] auto-format --- plugins/utilities/advanced_party_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/advanced_party_window.py b/plugins/utilities/advanced_party_window.py index c765caf..7f98975 100644 --- a/plugins/utilities/advanced_party_window.py +++ b/plugins/utilities/advanced_party_window.py @@ -78,7 +78,7 @@ def newconnect_to_party(address, port=43210, print_progress=False): global p_port bs.chatmessage(" Joined IP "+ip_add+" PORT "+str(p_port)) dd = bs.get_connection_to_host_info_2() - title = getattr(dd,'name','') + title = getattr(dd, 'name', '') bs.chatmessage(title) if dd and title else None if (bool(dd)): bs.disconnect_from_host() From 0defd8446b4482a54e8209fb3b07eb21c2edd07a Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sat, 5 Apr 2025 15:36:02 +0200 Subject: [PATCH 03/32] Update utilities.json --- plugins/utilities.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 04d3458..658abfa 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -753,6 +753,7 @@ } ], "versions": { + "2.1.3": null, "2.1.2": { "api_version": 9, "commit_sha": "c912759", @@ -1764,4 +1765,4 @@ } } } -} \ No newline at end of file +} From 0c6b4588ddd0f4eaa6d4d1b3b53ac14de7ae16a0 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sat, 5 Apr 2025 13:36:21 +0000 Subject: [PATCH 04/32] [ci] apply-version-metadata --- plugins/utilities.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 658abfa..3a33ff0 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -753,7 +753,12 @@ } ], "versions": { - "2.1.3": null, + "2.1.3": { + "api_version": 9, + "commit_sha": "0defd84", + "released_on": "05-04-2025", + "md5sum": "9d58abc6e5b9e6779e59a2e2f35f8a3d" + }, "2.1.2": { "api_version": 9, "commit_sha": "c912759", @@ -1765,4 +1770,4 @@ } } } -} +} \ No newline at end of file From 2f1346a64861b32073f2afa1dc2c6f0ccef3ebb3 Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sat, 5 Apr 2025 15:43:51 +0200 Subject: [PATCH 05/32] UI improvement for plugin_manager.py Fixed button scale origins being incorrect as it used the screen space center of the root widget instead of the source button. --- plugin_manager.py | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 2095dfe..8142bd4 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -29,7 +29,7 @@ from datetime import datetime # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.1.1" +PLUGIN_MANAGER_VERSION = "1.1.2" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. @@ -1637,7 +1637,7 @@ class PluginCategoryWindow(popup.PopupMenuWindow): self._asyncio_callback = asyncio_callback self.scale_origin = origin_widget.get_screen_space_center() super().__init__( - position=(200, 0), + position=self.scale_origin, scale=(2.3 if _uiscale is babase.UIScale.SMALL else 1.65 if _uiscale is babase.UIScale.MEDIUM else 1.23), choices=choices, @@ -1847,16 +1847,15 @@ class PluginManagerWindow(bui.MainWindow): label = f"Category: {post_label}" if self.category_selection_button is None: - self.category_selection_button = bui.buttonwidget(parent=self._root_widget, + self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, position=(category_pos_x, category_pos_y), size=b_size, - on_activate_call=( - self.show_categories_window), label=label, button_type="square", textcolor=b_textcolor, text_scale=0.6) + bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), else: self.category_selection_button = bui.buttonwidget(edit=self.category_selection_button, label=label) @@ -1944,10 +1943,15 @@ class PluginManagerWindow(bui.MainWindow): position=(settings_pos_x, settings_pos_y), size=(30, 30), button_type="square", - label="", - on_activate_call=babase.Call(PluginManagerSettingsWindow, - self.plugin_manager, - self._root_widget)) + label="") + bui.buttonwidget( + controller_button, + on_activate_call=babase.Call( + PluginManagerSettingsWindow, + self.plugin_manager, + controller_button + ) + ) bui.imagewidget(parent=self._root_widget, position=(settings_pos_x, settings_pos_y), size=(30, 30), @@ -2086,11 +2090,11 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self): + def show_categories_window(self,source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, - self._root_widget, + source, self.select_category, ) @@ -2177,15 +2181,14 @@ class PluginManagerSettingsWindow(popup.PopupWindow): maxwidth=width * 0.9) pos -= 20 - self._changelog_button = bui.buttonwidget(parent=self._root_widget, + self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2 - 5, pos), size=(80, 30), - on_activate_call=lambda: - ChangelogWindow(self._root_widget), textcolor=b_text_color, button_type='square', label='') + bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), From 559e65e55309c8e48437e25056465e8899f0402c Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sat, 5 Apr 2025 13:44:11 +0000 Subject: [PATCH 06/32] [ci] auto-format --- plugin_manager.py | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 8142bd4..aae46ec 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1848,14 +1848,14 @@ class PluginManagerWindow(bui.MainWindow): if self.category_selection_button is None: self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, - position=(category_pos_x, - category_pos_y), - size=b_size, - label=label, - button_type="square", - textcolor=b_textcolor, - text_scale=0.6) - bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), + position=(category_pos_x, + category_pos_y), + size=b_size, + label=label, + button_type="square", + textcolor=b_textcolor, + text_scale=0.6) + bui.buttonwidget(b, on_activate_call=lambda: self.show_categories_window(source=b)), else: self.category_selection_button = bui.buttonwidget(edit=self.category_selection_button, label=label) @@ -2090,7 +2090,7 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self,source): + def show_categories_window(self, source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, @@ -2182,13 +2182,13 @@ class PluginManagerSettingsWindow(popup.PopupWindow): pos -= 20 self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, - position=((width * 0.2) - button_size[0] / 2 - 5, - pos), - size=(80, 30), - textcolor=b_text_color, - button_type='square', - label='') - bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) + position=((width * 0.2) - button_size[0] / 2 - 5, + pos), + size=(80, 30), + textcolor=b_text_color, + button_type='square', + label='') + bui.buttonwidget(b, on_activate_call=lambda: ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), From 35c2eeec49ae7f3e39e6ef8875c112b761cb2e6a Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sat, 5 Apr 2025 16:18:08 +0200 Subject: [PATCH 07/32] Update index.json --- index.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index 53956e5..2666028 100644 --- a/index.json +++ b/index.json @@ -1,6 +1,7 @@ { "plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py", "versions": { + "1.1.2": null, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -260,4 +261,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From 3f5ff7277396c8c950642894737a04ba52545d07 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sat, 5 Apr 2025 14:18:35 +0000 Subject: [PATCH 08/32] [ci] apply-version-metadata --- index.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index 2666028..13c54a4 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.1.2": null, + "1.1.2": { + "api_version": 9, + "commit_sha": "35c2eee", + "released_on": "05-04-2025", + "md5sum": "8f3e97220b71076fe8c20a19b7191318" + }, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -261,4 +266,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From f07405b70eb7e94892bc8aff03940e973f9f3360 Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sun, 6 Apr 2025 16:07:20 +0200 Subject: [PATCH 09/32] Update index.json --- index.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index 13c54a4..6042016 100644 --- a/index.json +++ b/index.json @@ -5,7 +5,8 @@ "api_version": 9, "commit_sha": "35c2eee", "released_on": "05-04-2025", - "md5sum": "8f3e97220b71076fe8c20a19b7191318" + "md5sum": "8f3e97220b71076fe8c20a19b7191318", + "changelog": "Small UI fixes." }, "1.1.1": { "api_version": 9, @@ -266,4 +267,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From ffc2583680249b6c97c1b339b175d501645d379b Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:07:39 +0000 Subject: [PATCH 10/32] [ci] apply-version-metadata --- index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.json b/index.json index 6042016..abdd4ff 100644 --- a/index.json +++ b/index.json @@ -267,4 +267,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From adc88a500f6024e42700ac84f31c3431040899bd Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sun, 6 Apr 2025 16:20:08 +0200 Subject: [PATCH 11/32] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c3dd71..8f554e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## Plugin Manager (dd-mm-yyyy) +### 1.1.2 (06-04-2025) + +- Small UI fixes. + ### 1.1.1 (09-02-2025) - Added bomb spinner widget for loading animation. From 4ffb65e74d2b735a9b31cf1c5defb3c85cd21a3a Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sun, 6 Apr 2025 16:20:39 +0200 Subject: [PATCH 12/32] Wiped the shame --- index.json | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/index.json b/index.json index abdd4ff..0962825 100644 --- a/index.json +++ b/index.json @@ -5,8 +5,7 @@ "api_version": 9, "commit_sha": "35c2eee", "released_on": "05-04-2025", - "md5sum": "8f3e97220b71076fe8c20a19b7191318", - "changelog": "Small UI fixes." + "md5sum": "8f3e97220b71076fe8c20a19b7191318" }, "1.1.1": { "api_version": 9, @@ -267,4 +266,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From 1c8e92d826659859dee0d0ab449b2d54f2843cd9 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:20:58 +0000 Subject: [PATCH 13/32] [ci] apply-version-metadata --- index.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.json b/index.json index 0962825..13c54a4 100644 --- a/index.json +++ b/index.json @@ -266,4 +266,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From 67f39343322cac5e9f27c2680f0cc4891173d739 Mon Sep 17 00:00:00 2001 From: BroBordd Date: Sun, 6 Apr 2025 16:23:25 +0200 Subject: [PATCH 14/32] Null again --- index.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.json b/index.json index 13c54a4..2666028 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.1.2": { - "api_version": 9, - "commit_sha": "35c2eee", - "released_on": "05-04-2025", - "md5sum": "8f3e97220b71076fe8c20a19b7191318" - }, + "1.1.2": null, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -266,4 +261,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From c8c274aa80ede0722c9e6c87ce17404b998fd990 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Sun, 6 Apr 2025 14:23:47 +0000 Subject: [PATCH 15/32] [ci] apply-version-metadata --- index.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index 2666028..1b31139 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.1.2": null, + "1.1.2": { + "api_version": 9, + "commit_sha": "67f3934", + "released_on": "06-04-2025", + "md5sum": "8f3e97220b71076fe8c20a19b7191318" + }, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -261,4 +266,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From 2a0604fab60b155493260bde931b052f610911ec Mon Sep 17 00:00:00 2001 From: BroBordd Date: Mon, 7 Apr 2025 02:14:35 +0200 Subject: [PATCH 16/32] Updated sandbox for API9 yes --- plugins/utilities/sandbox.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/plugins/utilities/sandbox.py b/plugins/utilities/sandbox.py index afd4f7c..f724595 100644 --- a/plugins/utilities/sandbox.py +++ b/plugins/utilities/sandbox.py @@ -1,6 +1,6 @@ import babase as ba import _babase as _ba # music control -import bauiv1lib.mainmenu as mm +from bauiv1lib.ingamemenu import InGameMenuWindow as igm import bauiv1 as bui import bascenev1 as bs from bascenev1 import broadcastmessage as push, get_foreground_host_activity as ga @@ -20,7 +20,6 @@ from bascenev1lib.actor.powerupbox import PowerupBox from bascenev1lib.actor.bomb import TNTSpawner from os import listdir as ls - def error(real): # not fake bui.getsound('error').play() with ga().context: @@ -48,7 +47,7 @@ def var(s, v=None): cfg.commit() -class Nice(mm.MainMenuWindow): +class Nice(igm): # config, trash code ik def_attrs = [False, "Spaz", 2.0, 0.0, 1.0, 0.4, (1, 1, 1), 3, "normal", False, False, (1, 1, 1), 0.5, False, 0.0, False, False, 9.0, 5.0, 1.0, 0.7, True, False, @@ -1559,8 +1558,7 @@ class Nice(mm.MainMenuWindow): tn.append(i) try: attr = getattr(blex, i) if i not in [ - # gay - "punch_position", "punch_velocity", "punch_momentum_linear"] else (0, 0, 0) + "punch_position", "punch_velocity", "punch_momentum_linear"] else (0, 0, 0) # gay except: attr = None typez.append(str(type(attr).__name__)) @@ -2415,7 +2413,7 @@ class Nice(mm.MainMenuWindow): if self.sbox.exists(): bui.buttonwidget(edit=self.sbox, icon=bui.gettexture('chestIcon')) - def wrap(self=mm.MainMenuWindow._refresh_in_game, *args, **kwargs): + def wrap(self=igm._refresh_in_game, *args, **kwargs): r = s(self, *args, **kwargs) h = 125 v = self._height - 60.0 @@ -3108,7 +3106,7 @@ class Nice(mm.MainMenuWindow): bui.textwidget(edit=preview_text4, text=currently_txt) s.hl2(lmao_bots[currently_dux].node, True) - # start colntrol from here + # start control from here i.assigninput(ba.InputType.UP_DOWN, bs.Call(s.set_x)) i.assigninput(ba.InputType.LEFT_RIGHT, bs.Call(s.set_y)) i.assigninput(ba.InputType.PICK_UP_PRESS, bs.Call(s.key, 0)) @@ -3983,7 +3981,7 @@ class Nice(mm.MainMenuWindow): s.preview(i, (bot.node.hurt < 1), 1) def listen_window(s): - global listen_widget, music_preview_image, music_preview_text, music_preview_text2, music_dux + global listen_widget, music_preview_image, wmusic_preview_text, music_preview_text2, music_dux music_dux = 8 listen_widget = bui.containerwidget(parent=bui.get_special_widget('overlay_stack'), size=(500, 300), @@ -5925,7 +5923,7 @@ class CustomBotSet(SpazBotSet): except: pass -# ba_meta require api 8 +# ba_meta require api 9 # BroBordd touch grass # Copyright 2024, solely by BroBordd. All rights reserved. # ba_meta export plugin @@ -5933,7 +5931,7 @@ class CustomBotSet(SpazBotSet): class byBordd(ba.Plugin): def __init__(s): - mm.MainMenuWindow._refresh_in_game = Nice.Button(mm.MainMenuWindow._refresh_in_game) + igm._refresh_in_game = Nice.Button(igm._refresh_in_game) # All Textures (generated) From 2662e37aac81f63a03b70fb1d20e55017c3ca730 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Mon, 7 Apr 2025 00:14:58 +0000 Subject: [PATCH 17/32] [ci] auto-format --- plugins/utilities/sandbox.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/utilities/sandbox.py b/plugins/utilities/sandbox.py index f724595..c7437f4 100644 --- a/plugins/utilities/sandbox.py +++ b/plugins/utilities/sandbox.py @@ -20,6 +20,7 @@ from bascenev1lib.actor.powerupbox import PowerupBox from bascenev1lib.actor.bomb import TNTSpawner from os import listdir as ls + def error(real): # not fake bui.getsound('error').play() with ga().context: @@ -1558,7 +1559,8 @@ class Nice(igm): tn.append(i) try: attr = getattr(blex, i) if i not in [ - "punch_position", "punch_velocity", "punch_momentum_linear"] else (0, 0, 0) # gay + # gay + "punch_position", "punch_velocity", "punch_momentum_linear"] else (0, 0, 0) except: attr = None typez.append(str(type(attr).__name__)) From 8551a1e0c12569b1347f5f6bfd605c37f3484acc Mon Sep 17 00:00:00 2001 From: BroBordd Date: Mon, 7 Apr 2025 02:16:15 +0200 Subject: [PATCH 18/32] Refactored and fixed updown Fixed a bug where chat messages were to double because s._chat_texts stopped having the widgets for some reason so i just nuked all s._columnwidget's children. --- plugins/utilities/updown.py | 94 ++++++++++++++++++++----------------- 1 file changed, 52 insertions(+), 42 deletions(-) diff --git a/plugins/utilities/updown.py b/plugins/utilities/updown.py index 0e91483..9910dde 100644 --- a/plugins/utilities/updown.py +++ b/plugins/utilities/updown.py @@ -1,32 +1,45 @@ -import babase as ba -import bauiv1 as bui -import bauiv1lib.party -from bascenev1 import get_chat_messages as gcm, screenmessage as push +from bauiv1lib import party +from babase import ( + SpecialChar as sc, + charstr as cs, + Plugin, + Call +) +from bauiv1 import ( + containerwidget as cw, + buttonwidget as bw, + textwidget as tw, + getsound as gs +) +from bascenev1 import ( + get_chat_messages as gcm, + screenmessage as push +) - -class VeryPW(bauiv1lib.party.PartyWindow): +class VeryPW(party.PartyWindow): def __init__(s, *args, **kwargs): super().__init__(*args, **kwargs) s._n = 0 s._o = "" s._f = True - s._chat_texts_haxx = [] for i in range(2): - bui.buttonwidget( + bw( parent=s._root_widget, size=(30, 30), - label=ba.charstr(ba.SpecialChar.DOWN_ARROW if i else ba.SpecialChar.UP_ARROW), + label=cs(getattr(sc,f"{['UP','DOWN'][i]}_ARROW")), button_type='square', - position=(-15, 70 - (i * 40)), - on_activate_call=(s._d if i else s._p) + enable_sound=False, + position=(-15,70-(i*40)), + on_activate_call=[s._p,s._d][i] ) - def _c(s, t=""): bui.textwidget(edit=s._text_field, text=t) + def _c(s, t=""): tw(edit=s._text_field, text=t) def _d(s): s._p(1) def _p(s, i=0): + print (s._chat_texts) if s._f: - s._o = bui.textwidget(query=s._text_field) + s._o = tw(query=s._text_field) s._f = False s._n = -1 s._n = s._n + (1 if i else -1) @@ -36,42 +49,39 @@ class VeryPW(bauiv1lib.party.PartyWindow): except IndexError: if not s._w1: push("Empty chat") + gs('block').play() s._n = 0 return s._n = -1 s._c(s._o) + gs('deek').play() - for msg in s._chat_texts: - msg.delete() - for msg in s._chat_texts_haxx: - msg.delete() + [z.delete() for z in s._columnwidget.get_children()] for z in range(len(s._w1)): - txt = bui.textwidget(parent=s._columnwidget, - text=s._w1[z], - h_align='left', - v_align='center', - size=(900, 13), - scale=0.55, - color=(1, 1, 1) if z != (s._n if s._n > - - 1 else s._n + len(s._w1) + 1) else (0, 0.7, 0), - position=(-0.6, 0), - selectable=True, - autoselect=True, - click_activate=True, - maxwidth=s._scroll_width * 0.94, - shadow=0.3, - flatness=1.0) - bui.textwidget(edit=txt, - on_activate_call=ba.Call( - s._copy_msg, - s._w1[z])) - s._chat_texts_haxx.append(txt) - bui.containerwidget(edit=s._columnwidget, visible_child=txt) + txt = tw( + parent=s._columnwidget, + text=s._w1[z], + h_align='left', + v_align='center', + size=(900, 13), + scale=0.55, + color=(1, 1, 1) if z != (s._n if s._n > -1 else s._n + len(s._w1) + 1) else (0, 0.7, 0), + position=(-0.6, 0), + selectable=True, + autoselect=True, + click_activate=True, + maxwidth=s._scroll_width * 0.94, + shadow=0.3, + flatness=1.0 + ) + tw( + txt, + on_activate_call=Call(s._copy_msg,s._w1[z]) + ) + cw(edit=s._columnwidget, visible_child=txt) # ba_meta require api 9 # ba_meta export plugin - - -class byBordd(ba.Plugin): +class byBordd(Plugin): def __init__(s): - bauiv1lib.party.PartyWindow = VeryPW + party.PartyWindow = VeryPW From 092fe04f6226d7a50efe129cb29311d708f28f2a Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Mon, 7 Apr 2025 00:16:33 +0000 Subject: [PATCH 19/32] [ci] auto-format --- plugins/utilities/updown.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/utilities/updown.py b/plugins/utilities/updown.py index 9910dde..b896815 100644 --- a/plugins/utilities/updown.py +++ b/plugins/utilities/updown.py @@ -16,6 +16,7 @@ from bascenev1 import ( screenmessage as push ) + class VeryPW(party.PartyWindow): def __init__(s, *args, **kwargs): super().__init__(*args, **kwargs) @@ -26,18 +27,18 @@ class VeryPW(party.PartyWindow): bw( parent=s._root_widget, size=(30, 30), - label=cs(getattr(sc,f"{['UP','DOWN'][i]}_ARROW")), + label=cs(getattr(sc, f"{['UP', 'DOWN'][i]}_ARROW")), button_type='square', enable_sound=False, - position=(-15,70-(i*40)), - on_activate_call=[s._p,s._d][i] + position=(-15, 70-(i*40)), + on_activate_call=[s._p, s._d][i] ) def _c(s, t=""): tw(edit=s._text_field, text=t) def _d(s): s._p(1) def _p(s, i=0): - print (s._chat_texts) + print(s._chat_texts) if s._f: s._o = tw(query=s._text_field) s._f = False @@ -65,7 +66,8 @@ class VeryPW(party.PartyWindow): v_align='center', size=(900, 13), scale=0.55, - color=(1, 1, 1) if z != (s._n if s._n > -1 else s._n + len(s._w1) + 1) else (0, 0.7, 0), + color=(1, 1, 1) if z != (s._n if s._n > - + 1 else s._n + len(s._w1) + 1) else (0, 0.7, 0), position=(-0.6, 0), selectable=True, autoselect=True, @@ -76,12 +78,14 @@ class VeryPW(party.PartyWindow): ) tw( txt, - on_activate_call=Call(s._copy_msg,s._w1[z]) + on_activate_call=Call(s._copy_msg, s._w1[z]) ) cw(edit=s._columnwidget, visible_child=txt) # ba_meta require api 9 # ba_meta export plugin + + class byBordd(Plugin): def __init__(s): party.PartyWindow = VeryPW From c711dd964dba18896013282737203ac6395441d3 Mon Sep 17 00:00:00 2001 From: BroBordd Date: Mon, 7 Apr 2025 02:18:05 +0200 Subject: [PATCH 20/32] Updated sandbox and updown in utilities.json --- plugins/utilities.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 3a33ff0..a450bc9 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -58,6 +58,7 @@ } ], "versions": { + "1.2.1": null, "1.2.0": { "api_version": 8, "commit_sha": "3a62e48", @@ -77,6 +78,7 @@ } ], "versions": { + "1.1.1": null, "1.1.0": { "api_version": 9, "commit_sha": "90cbaf7", @@ -1770,4 +1772,4 @@ } } } -} \ No newline at end of file +} From b35302e0f80a0032bd59ab8c17bd35bcd3fb7f21 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Mon, 7 Apr 2025 00:18:22 +0000 Subject: [PATCH 21/32] [ci] apply-version-metadata --- plugins/utilities.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index a450bc9..02cc057 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -58,7 +58,12 @@ } ], "versions": { - "1.2.1": null, + "1.2.1": { + "api_version": 9, + "commit_sha": "c711dd9", + "released_on": "07-04-2025", + "md5sum": "e523a7a40024c01e6a7595836237ee8b" + }, "1.2.0": { "api_version": 8, "commit_sha": "3a62e48", @@ -78,7 +83,12 @@ } ], "versions": { - "1.1.1": null, + "1.1.1": { + "api_version": 9, + "commit_sha": "c711dd9", + "released_on": "07-04-2025", + "md5sum": "45925247145c0126f73f895932202822" + }, "1.1.0": { "api_version": 9, "commit_sha": "90cbaf7", @@ -1772,4 +1782,4 @@ } } } -} +} \ No newline at end of file From f1917f71d82ce485306b115d187ac7dcebbd60b7 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 8 Apr 2025 21:21:21 +0530 Subject: [PATCH 22/32] ci fix? --- plugins/utilities.json | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 02cc057..46988e2 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -58,12 +58,7 @@ } ], "versions": { - "1.2.1": { - "api_version": 9, - "commit_sha": "c711dd9", - "released_on": "07-04-2025", - "md5sum": "e523a7a40024c01e6a7595836237ee8b" - }, + "1.2.1": null, "1.2.0": { "api_version": 8, "commit_sha": "3a62e48", @@ -83,12 +78,7 @@ } ], "versions": { - "1.1.1": { - "api_version": 9, - "commit_sha": "c711dd9", - "released_on": "07-04-2025", - "md5sum": "45925247145c0126f73f895932202822" - }, + "1.1.1": null, "1.1.0": { "api_version": 9, "commit_sha": "90cbaf7", @@ -771,12 +761,7 @@ "released_on": "05-04-2025", "md5sum": "9d58abc6e5b9e6779e59a2e2f35f8a3d" }, - "2.1.2": { - "api_version": 9, - "commit_sha": "c912759", - "released_on": "25-03-2025", - "md5sum": "1d732670a4e8b71fc0e5d9ea9b4a31b4" - }, + "2.1.2": null, "2.1.1": { "api_version": 9, "commit_sha": "a93fda3", From 656e59ab0b8b8780b216ebf24217baa56e263db5 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Tue, 8 Apr 2025 15:51:50 +0000 Subject: [PATCH 23/32] [ci] apply-version-metadata --- plugins/utilities.json | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 46988e2..33c8924 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -58,7 +58,12 @@ } ], "versions": { - "1.2.1": null, + "1.2.1": { + "api_version": 9, + "commit_sha": "f1917f7", + "released_on": "08-04-2025", + "md5sum": "e523a7a40024c01e6a7595836237ee8b" + }, "1.2.0": { "api_version": 8, "commit_sha": "3a62e48", @@ -78,7 +83,12 @@ } ], "versions": { - "1.1.1": null, + "1.1.1": { + "api_version": 9, + "commit_sha": "f1917f7", + "released_on": "08-04-2025", + "md5sum": "45925247145c0126f73f895932202822" + }, "1.1.0": { "api_version": 9, "commit_sha": "90cbaf7", @@ -761,7 +771,12 @@ "released_on": "05-04-2025", "md5sum": "9d58abc6e5b9e6779e59a2e2f35f8a3d" }, - "2.1.2": null, + "2.1.2": { + "api_version": 9, + "commit_sha": "f1917f7", + "released_on": "08-04-2025", + "md5sum": "9d58abc6e5b9e6779e59a2e2f35f8a3d" + }, "2.1.1": { "api_version": 9, "commit_sha": "a93fda3", From 4eea3ca298b6dcc9cc7e5a010ac87d4ae4123a0f Mon Sep 17 00:00:00 2001 From: BroBordd Date: Tue, 8 Apr 2025 18:24:09 +0200 Subject: [PATCH 24/32] Add files via upload --- plugin_manager.py | 134 ++++++++++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 58 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index aae46ec..26a4b46 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -29,7 +29,7 @@ from datetime import datetime # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.1.2" +PLUGIN_MANAGER_VERSION = "1.1.1" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. @@ -1760,12 +1760,17 @@ class PluginManagerWindow(bui.MainWindow): size=48, ) + def spin(self,show=False): + w = self._loading_spinner + p = self._root_widget + bui.spinnerwidget(w,visible=show) if w.exists() and p.exists() and not p.transitioning_out else None + @contextlib.contextmanager def exception_handler(self): try: yield except urllib.error.URLError: - bui.spinnerwidget(edit=self._loading_spinner, visible=False) + self.spin() try: bui.textwidget( edit=self._plugin_manager_status_text, @@ -1778,7 +1783,7 @@ class PluginManagerWindow(bui.MainWindow): # User probably went back before a bui.Window could finish loading. pass except Exception as e: - bui.spinnerwidget(edit=self._loading_spinner, visible=False) + self.spin() try: bui.textwidget(edit=self._plugin_manager_status_text, text=str(e)) except: @@ -1794,7 +1799,7 @@ class PluginManagerWindow(bui.MainWindow): with self.exception_handler(): await self.plugin_manager.setup_changelog() await self.plugin_manager.setup_index() - bui.spinnerwidget(edit=self._loading_spinner, visible=False) + self.spin() try: bui.textwidget(edit=self._plugin_manager_status_text, text="") except: @@ -1840,25 +1845,30 @@ class PluginManagerWindow(bui.MainWindow): textcolor=b_textcolor, text_scale=0.6) else: - bui.buttonwidget(edit=self.alphabet_order_selection_button, - label=('Z - A' if self.selected_alphabet_order == 'z_a' else 'A - Z') - ) + b = self.alphabet_order_selection_button + bui.buttonwidget( + edit=b, + label=('Z - A' if self.selected_alphabet_order == 'z_a' else 'A - Z') + ) if b.exists() else None label = f"Category: {post_label}" if self.category_selection_button is None: self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, - position=(category_pos_x, - category_pos_y), - size=b_size, - label=label, - button_type="square", - textcolor=b_textcolor, - text_scale=0.6) - bui.buttonwidget(b, on_activate_call=lambda: self.show_categories_window(source=b)), + position=(category_pos_x, + category_pos_y), + size=b_size, + label=label, + button_type="square", + textcolor=b_textcolor, + text_scale=0.6) + bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), else: - self.category_selection_button = bui.buttonwidget(edit=self.category_selection_button, - label=label) + b = self.category_selection_button + bui.buttonwidget( + edit=b, + label=label + ) if b.exists() else None async def _on_order_button_press(self) -> None: self.selected_alphabet_order = ('a_z' if self.selected_alphabet_order == 'z_a' else 'z_a') @@ -1965,19 +1975,22 @@ class PluginManagerWindow(bui.MainWindow): refresh_pos_y = (180 if _uiscale is babase.UIScale.SMALL else 108 if _uiscale is babase.UIScale.MEDIUM else 120) - controller_button = bui.buttonwidget(parent=self._root_widget, - position=(refresh_pos_x, refresh_pos_y), - size=(30, 30), - button_type="square", - label="", - on_activate_call=lambda: - loop.create_task(self.refresh())) - bui.imagewidget(parent=self._root_widget, - position=(refresh_pos_x, refresh_pos_y), - size=(30, 30), - color=(0.8, 0.95, 1), - texture=bui.gettexture("replayIcon"), - draw_controller=controller_button) + controller_button = bui.buttonwidget( + parent=self._root_widget, + position=(refresh_pos_x, refresh_pos_y), + size=(30, 30), + button_type="square", + label="", + on_activate_call=lambda: loop.create_task(self.refresh()) + ) + bui.imagewidget( + parent=self._root_widget, + position=(refresh_pos_x, refresh_pos_y), + size=(30, 30), + color=(0.8, 0.95, 1), + texture=bui.gettexture("replayIcon"), + draw_controller=controller_button + ) def search_term_filterer(self, plugin, search_term): # This helps resolve "plugin name" to "plugin_name". @@ -2033,17 +2046,18 @@ class PluginManagerWindow(bui.MainWindow): self._last_filter_text = search_term self._last_filter_plugins = plugins + if not self._columnwidget.exists(): return + if category == 'Installed': - plugin_names_to_draw = tuple(self.draw_plugin_name(plugin) - for plugin in plugins if plugin.is_installed) + plugin_names_to_draw = tuple( + self.draw_plugin_name(plugin) for plugin in plugins if plugin.is_installed + ) else: plugin_names_to_draw = tuple(self.draw_plugin_name(plugin) for plugin in plugins) - for plugin in self._columnwidget.get_children(): - plugin.delete() + [plugin.delete() for plugin in self._columnwidget.get_children()] text_widget = bui.textwidget(parent=self._columnwidget) text_widget.delete() - await asyncio.gather(*plugin_names_to_draw) async def draw_plugin_name(self, plugin): @@ -2069,20 +2083,24 @@ class PluginManagerWindow(bui.MainWindow): plugin_name_widget_to_update = self.plugins_in_current_view.get(plugin.name) if plugin_name_widget_to_update: - bui.textwidget(edit=plugin_name_widget_to_update, - color=color) + bui.textwidget( + edit=plugin_name_widget_to_update, + color=color + ) else: - text_widget = bui.textwidget(parent=self._columnwidget, - size=(410, 30), - selectable=True, - always_highlight=True, - color=color, - text=plugin.name.replace('_', ' ').title(), - click_activate=True, - on_activate_call=lambda: self.show_plugin_window(plugin), - h_align='left', - v_align='center', - maxwidth=420) + text_widget = bui.textwidget( + parent=self._columnwidget, + size=(410, 30), + selectable=True, + always_highlight=True, + color=color, + text=plugin.name.replace('_', ' ').title(), + click_activate=True, + on_activate_call=lambda: self.show_plugin_window(plugin), + h_align='left', + v_align='center', + maxwidth=420 + ) self.plugins_in_current_view[plugin.name] = text_widget # XXX: This seems nicer. Might wanna use this in future. # text_widget.add_delete_callback(lambda: self.plugins_in_current_view.pop(plugin.name)) @@ -2090,7 +2108,7 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self, source): + def show_categories_window(self,source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, @@ -2120,13 +2138,13 @@ class PluginManagerWindow(bui.MainWindow): # except: # pass - bui.spinnerwidget(edit=self._loading_spinner, visible=True) + self.spin(True) with self.exception_handler(): await self.plugin_manager.refresh() await self.plugin_manager.setup_changelog() await self.plugin_manager.setup_index() - bui.spinnerwidget(edit=self._loading_spinner, visible=False) + self.spin() try: bui.textwidget(edit=self._plugin_manager_status_text, text="") except: @@ -2182,13 +2200,13 @@ class PluginManagerSettingsWindow(popup.PopupWindow): pos -= 20 self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, - position=((width * 0.2) - button_size[0] / 2 - 5, - pos), - size=(80, 30), - textcolor=b_text_color, - button_type='square', - label='') - bui.buttonwidget(b, on_activate_call=lambda: ChangelogWindow(b)) + position=((width * 0.2) - button_size[0] / 2 - 5, + pos), + size=(80, 30), + textcolor=b_text_color, + button_type='square', + label='') + bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), From 6e3f11db25709976c2d014af336d050330895111 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:24:27 +0000 Subject: [PATCH 25/32] [ci] auto-format --- plugin_manager.py | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 26a4b46..79ce189 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1760,10 +1760,11 @@ class PluginManagerWindow(bui.MainWindow): size=48, ) - def spin(self,show=False): + def spin(self, show=False): w = self._loading_spinner p = self._root_widget - bui.spinnerwidget(w,visible=show) if w.exists() and p.exists() and not p.transitioning_out else None + bui.spinnerwidget(w, visible=show) if w.exists( + ) and p.exists() and not p.transitioning_out else None @contextlib.contextmanager def exception_handler(self): @@ -1855,14 +1856,14 @@ class PluginManagerWindow(bui.MainWindow): if self.category_selection_button is None: self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, - position=(category_pos_x, - category_pos_y), - size=b_size, - label=label, - button_type="square", - textcolor=b_textcolor, - text_scale=0.6) - bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), + position=(category_pos_x, + category_pos_y), + size=b_size, + label=label, + button_type="square", + textcolor=b_textcolor, + text_scale=0.6) + bui.buttonwidget(b, on_activate_call=lambda: self.show_categories_window(source=b)), else: b = self.category_selection_button bui.buttonwidget( @@ -2046,7 +2047,8 @@ class PluginManagerWindow(bui.MainWindow): self._last_filter_text = search_term self._last_filter_plugins = plugins - if not self._columnwidget.exists(): return + if not self._columnwidget.exists(): + return if category == 'Installed': plugin_names_to_draw = tuple( @@ -2108,7 +2110,7 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self,source): + def show_categories_window(self, source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, @@ -2200,13 +2202,13 @@ class PluginManagerSettingsWindow(popup.PopupWindow): pos -= 20 self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, - position=((width * 0.2) - button_size[0] / 2 - 5, - pos), - size=(80, 30), - textcolor=b_text_color, - button_type='square', - label='') - bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) + position=((width * 0.2) - button_size[0] / 2 - 5, + pos), + size=(80, 30), + textcolor=b_text_color, + button_type='square', + label='') + bui.buttonwidget(b, on_activate_call=lambda: ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), From f2f14563d4a53d5d0107736c8844b899d49c7b1b Mon Sep 17 00:00:00 2001 From: BroBordd Date: Tue, 8 Apr 2025 18:31:48 +0200 Subject: [PATCH 26/32] Fixed some UI tracebacks and code Regarding the plugin manager being closed before loading completely. Had to check widget.exists() before performing any action. And about the spinners, I made a function to safely control it because it was also tracebacking if you delete it before it tries to hide itself. And for the code, I cleaned some indents. --- plugin_manager.py | 147 +++++++++++++++++++++++++--------------------- 1 file changed, 79 insertions(+), 68 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index 79ce189..e9693bf 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -850,12 +850,13 @@ class ChangelogWindow(popup.PopupWindow): self._transition_out = 'out_scale' transition = 'in_scale' - self._root_widget = bui.containerwidget(size=(width, height), - on_outside_click_call=self._back, - transition=transition, - scale=(1.5 if _uiscale is babase.UIScale.SMALL else 1.5 - if _uiscale is babase.UIScale.MEDIUM else 1.0), - scale_origin_stack_offset=self.scale_origin) + self._root_widget = bui.containerwidget( + size=(width, height), + on_outside_click_call=self._back, + transition=transition, + scale=(1.5 if _uiscale is babase.UIScale.SMALL else 1.5 if _uiscale is babase.UIScale.MEDIUM else 1.0), + scale_origin_stack_offset=self.scale_origin + ) bui.textwidget(parent=self._root_widget, position=(width * 0.49, height * 0.87), size=(0, 0), @@ -928,12 +929,14 @@ class AuthorsWindow(popup.PopupWindow): self._transition_out = 'out_scale' transition = 'in_scale' - self._root_widget = bui.containerwidget(size=(width, height), - on_outside_click_call=self._back, - transition=transition, - scale=(1.5 if _uiscale is babase.UIScale.SMALL else 1.5 - if _uiscale is babase.UIScale.MEDIUM else 1.0), - scale_origin_stack_offset=self.scale_origin) + self._root_widget = bui.containerwidget( + size=(width, height), + on_outside_click_call=self._back, + transition=transition, + scale=(1.5 if _uiscale is babase.UIScale.SMALL else 1.5 + if _uiscale is babase.UIScale.MEDIUM else 1.0), + scale_origin_stack_offset=self.scale_origin + ) pos = height * 0.9 bui.textwidget(parent=self._root_widget, @@ -1030,12 +1033,14 @@ class PluginWindow(popup.PopupWindow): self._transition_out = 'out_scale' transition = 'in_scale' - self._root_widget = bui.containerwidget(size=(width, height), - on_outside_click_call=self._cancel, - transition=transition, - scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 - if _uiscale is babase.UIScale.MEDIUM else 1.0), - scale_origin_stack_offset=self.scale_origin) + self._root_widget = bui.containerwidget( + size=(width, height), + on_outside_click_call=self._cancel, + transition=transition, + scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 + if _uiscale is babase.UIScale.MEDIUM else 1.0), + scale_origin_stack_offset=self.scale_origin + ) pos = height * 0.8 plug_name = self.plugin.name.replace('_', ' ').title() @@ -1146,9 +1151,11 @@ class PluginWindow(popup.PopupWindow): text_scale=1, label=button3_label) - bui.containerwidget(edit=self._root_widget, - on_cancel_call=self._cancel, - selected_child=selected_btn) + bui.containerwidget( + edit=self._root_widget, + on_cancel_call=self._cancel, + selected_child=selected_btn + ) open_pos_x = (390 if _uiscale is babase.UIScale.SMALL else 450 if _uiscale is babase.UIScale.MEDIUM else 440) @@ -1474,13 +1481,15 @@ class PluginSourcesWindow(popup.PopupWindow): b_textcolor = (0.75, 0.7, 0.8) self._transition_out = 'out_scale' transition = 'in_scale' - self._root_widget = bui.containerwidget(size=(400, 340), - on_outside_click_call=self._ok, - transition=transition, - scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 - if _uiscale is babase.UIScale.MEDIUM else 1.0), - scale_origin_stack_offset=self.scale_origin, - on_cancel_call=self._ok) + self._root_widget = bui.containerwidget( + size=(400, 340), + on_outside_click_call=self._ok, + transition=transition, + scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 + if _uiscale is babase.UIScale.MEDIUM else 1.0), + scale_origin_stack_offset=self.scale_origin, + on_cancel_call=self._ok + ) bui.textwidget( parent=self._root_widget, @@ -1667,7 +1676,7 @@ class PluginCategoryWindow(popup.PopupMenuWindow): class PluginManagerWindow(bui.MainWindow): - def __init__(self, transition: str = "in_right", origin_widget: bui.Widget = None): + def __init__(self, transition: str = "in_right", origin_widget: bui.widget = None): self.plugin_manager = PluginManager() self.category_selection_button = None self.selected_category = 'All' @@ -1760,11 +1769,10 @@ class PluginManagerWindow(bui.MainWindow): size=48, ) - def spin(self, show=False): + def spin(self,show=False): w = self._loading_spinner p = self._root_widget - bui.spinnerwidget(w, visible=show) if w.exists( - ) and p.exists() and not p.transitioning_out else None + bui.spinnerwidget(w,visible=show) if w.exists() and p.exists() and not p.transitioning_out else None @contextlib.contextmanager def exception_handler(self): @@ -1856,14 +1864,14 @@ class PluginManagerWindow(bui.MainWindow): if self.category_selection_button is None: self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, - position=(category_pos_x, - category_pos_y), - size=b_size, - label=label, - button_type="square", - textcolor=b_textcolor, - text_scale=0.6) - bui.buttonwidget(b, on_activate_call=lambda: self.show_categories_window(source=b)), + position=(category_pos_x, + category_pos_y), + size=b_size, + label=label, + button_type="square", + textcolor=b_textcolor, + text_scale=0.6) + bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), else: b = self.category_selection_button bui.buttonwidget( @@ -2047,8 +2055,7 @@ class PluginManagerWindow(bui.MainWindow): self._last_filter_text = search_term self._last_filter_plugins = plugins - if not self._columnwidget.exists(): - return + if not self._columnwidget.exists(): return if category == 'Installed': plugin_names_to_draw = tuple( @@ -2110,7 +2117,7 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self, source): + def show_categories_window(self,source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, @@ -2182,33 +2189,37 @@ class PluginManagerSettingsWindow(popup.PopupWindow): transition = 'in_scale' button_size = (32 * s, 32 * s) # index = await self._plugin_manager.get_index() - self._root_widget = bui.containerwidget(size=(width, height), - on_outside_click_call=self._ok, - transition=transition, - scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 - if _uiscale is babase.UIScale.MEDIUM else 1.0), - scale_origin_stack_offset=self.scale_origin) + self._root_widget = bui.containerwidget( + size=(width, height), + on_outside_click_call=self._ok, + transition=transition, + scale=(2.1 if _uiscale is babase.UIScale.SMALL else 1.5 + if _uiscale is babase.UIScale.MEDIUM else 1.0), + scale_origin_stack_offset=self.scale_origin + ) pos = height * 0.9 setting_title = "Settings" - bui.textwidget(parent=self._root_widget, - position=(width * 0.49, pos), - size=(0, 0), - h_align='center', - v_align='center', - text=setting_title, - scale=text_scale, - color=bui.app.ui_v1.title_color, - maxwidth=width * 0.9) + bui.textwidget( + parent=self._root_widget, + position=(width * 0.49, pos), + size=(0, 0), + h_align='center', + v_align='center', + text=setting_title, + scale=text_scale, + color=bui.app.ui_v1.title_color, + maxwidth=width * 0.9 + ) pos -= 20 self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, - position=((width * 0.2) - button_size[0] / 2 - 5, - pos), - size=(80, 30), - textcolor=b_text_color, - button_type='square', - label='') - bui.buttonwidget(b, on_activate_call=lambda: ChangelogWindow(b)) + position=((width * 0.2) - button_size[0] / 2 - 5, + pos), + size=(80, 30), + textcolor=b_text_color, + button_type='square', + label='') + bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), @@ -2392,7 +2403,7 @@ class NewAllSettingsWindow(AllSettingsWindow): def __init__( self, transition: str | None = 'in_right', - origin_widget: bui.Widget | None = None, + origin_widget: bui.widget | None = None, ): # pylint: disable=too-many-statements # pylint: disable=too-many-locals @@ -2468,7 +2479,7 @@ class NewAllSettingsWindow(AllSettingsWindow): x_offs4 -= x_dif def _b_title( - x: float, y: float, button: bui.Widget, text: str | bui.Lstr + x: float, y: float, button: bui.widget, text: str | bui.Lstr ) -> None: bui.textwidget( parent=self._root_widget, @@ -2627,7 +2638,7 @@ class NewAllSettingsWindow(AllSettingsWindow): sel_name = bui.app.ui_v1.window_states.get(type(self), {}).get( 'sel_name' ) - sel: bui.Widget | None + sel: bui.widget | None if sel_name == 'Controllers': sel = self._controllers_button elif sel_name == 'Graphics': From 65a75f3fc87e12f2da9ea48fe120a06b55dfe259 Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:32:09 +0000 Subject: [PATCH 27/32] [ci] auto-format --- plugin_manager.py | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/plugin_manager.py b/plugin_manager.py index e9693bf..1f0dc04 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1769,10 +1769,11 @@ class PluginManagerWindow(bui.MainWindow): size=48, ) - def spin(self,show=False): + def spin(self, show=False): w = self._loading_spinner p = self._root_widget - bui.spinnerwidget(w,visible=show) if w.exists() and p.exists() and not p.transitioning_out else None + bui.spinnerwidget(w, visible=show) if w.exists( + ) and p.exists() and not p.transitioning_out else None @contextlib.contextmanager def exception_handler(self): @@ -1864,14 +1865,14 @@ class PluginManagerWindow(bui.MainWindow): if self.category_selection_button is None: self.category_selection_button = b = bui.buttonwidget(parent=self._root_widget, - position=(category_pos_x, - category_pos_y), - size=b_size, - label=label, - button_type="square", - textcolor=b_textcolor, - text_scale=0.6) - bui.buttonwidget(b,on_activate_call=lambda: self.show_categories_window(source=b)), + position=(category_pos_x, + category_pos_y), + size=b_size, + label=label, + button_type="square", + textcolor=b_textcolor, + text_scale=0.6) + bui.buttonwidget(b, on_activate_call=lambda: self.show_categories_window(source=b)), else: b = self.category_selection_button bui.buttonwidget( @@ -2055,7 +2056,8 @@ class PluginManagerWindow(bui.MainWindow): self._last_filter_text = search_term self._last_filter_plugins = plugins - if not self._columnwidget.exists(): return + if not self._columnwidget.exists(): + return if category == 'Installed': plugin_names_to_draw = tuple( @@ -2117,7 +2119,7 @@ class PluginManagerWindow(bui.MainWindow): def show_plugin_window(self, plugin): PluginWindow(plugin, self._root_widget, lambda: self.draw_plugin_name(plugin)) - def show_categories_window(self,source): + def show_categories_window(self, source): PluginCategoryWindow( self.plugin_manager.categories.keys(), self.selected_category, @@ -2213,13 +2215,13 @@ class PluginManagerSettingsWindow(popup.PopupWindow): pos -= 20 self._changelog_button = b = bui.buttonwidget(parent=self._root_widget, - position=((width * 0.2) - button_size[0] / 2 - 5, - pos), - size=(80, 30), - textcolor=b_text_color, - button_type='square', - label='') - bui.buttonwidget(b,on_activate_call=lambda:ChangelogWindow(b)) + position=((width * 0.2) - button_size[0] / 2 - 5, + pos), + size=(80, 30), + textcolor=b_text_color, + button_type='square', + label='') + bui.buttonwidget(b, on_activate_call=lambda: ChangelogWindow(b)) bui.textwidget(parent=self._root_widget, position=((width * 0.2) - button_size[0] / 2, pos), size=(70, 30), From 8c50563a096388f5f7d0d78dd21aa234363327de Mon Sep 17 00:00:00 2001 From: BroBordd Date: Tue, 8 Apr 2025 18:34:48 +0200 Subject: [PATCH 28/32] Null again Since I changed plugin_manager.py Updated index.json to null for ci. --- index.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/index.json b/index.json index 1b31139..2666028 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.1.2": { - "api_version": 9, - "commit_sha": "67f3934", - "released_on": "06-04-2025", - "md5sum": "8f3e97220b71076fe8c20a19b7191318" - }, + "1.1.2": null, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -266,4 +261,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} \ No newline at end of file +} From dd023138aa34048cacf04d1a82de96378802718c Mon Sep 17 00:00:00 2001 From: BroBordd <192699453+BroBordd@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:35:09 +0000 Subject: [PATCH 29/32] [ci] apply-version-metadata --- index.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/index.json b/index.json index 2666028..86f9950 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.1.2": null, + "1.1.2": { + "api_version": 9, + "commit_sha": "8c50563", + "released_on": "08-04-2025", + "md5sum": "679fde6f794518abfc0fe4dd70a2f037" + }, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", @@ -261,4 +266,4 @@ "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugins/maps.json" ], "external_source_url": "https://github.com/{repository}/{content_type}/{tag}/category.json" -} +} \ No newline at end of file From 8f484fc0cfdfa909ac7e5e20fbec6a33395db0d0 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 8 Apr 2025 22:11:35 +0530 Subject: [PATCH 30/32] updated version string --- index.json | 7 +------ plugin_manager.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/index.json b/index.json index 86f9950..0836b60 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.1.2": { - "api_version": 9, - "commit_sha": "8c50563", - "released_on": "08-04-2025", - "md5sum": "679fde6f794518abfc0fe4dd70a2f037" - }, + "1.1.2": null, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", diff --git a/plugin_manager.py b/plugin_manager.py index 1f0dc04..2ae85c4 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -29,7 +29,7 @@ from datetime import datetime # Modules used for overriding AllSettingsWindow import logging -PLUGIN_MANAGER_VERSION = "1.1.1" +PLUGIN_MANAGER_VERSION = "1.1.2" REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager" # Current tag can be changed to "staging" or any other branch in # plugin manager repo for testing purpose. From 793f7b93e053d1ed04c9905868ee78f278d35b2b Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD <90267658+Loup-Garou911XD@users.noreply.github.com> Date: Tue, 8 Apr 2025 16:42:12 +0000 Subject: [PATCH 31/32] [ci] apply-version-metadata --- index.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/index.json b/index.json index 0836b60..f57b65b 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.1.2": null, + "1.1.2": { + "api_version": 9, + "commit_sha": "8f484fc", + "released_on": "08-04-2025", + "md5sum": "a6dd38d92c6c850cd1bab866870e48b5" + }, "1.1.1": { "api_version": 9, "commit_sha": "93106f2", From 94de19d832e129dda42e782d4bf134abfd5da4b8 Mon Sep 17 00:00:00 2001 From: Loup-Garou911XD Date: Tue, 8 Apr 2025 22:15:11 +0530 Subject: [PATCH 32/32] Fix --- plugins/utilities.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 33c8924..883e1fc 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -773,9 +773,9 @@ }, "2.1.2": { "api_version": 9, - "commit_sha": "f1917f7", - "released_on": "08-04-2025", - "md5sum": "9d58abc6e5b9e6779e59a2e2f35f8a3d" + "commit_sha": "c912759", + "released_on": "25-03-2025", + "md5sum": "1d732670a4e8b71fc0e5d9ea9b4a31b4" }, "2.1.1": { "api_version": 9,