diff --git a/index.json b/index.json index 7ed3695..c2ba40e 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": { + "0.2.3": null, "0.2.2": { "api_version": 7, "commit_sha": "2672a5a", diff --git a/plugin_manager.py b/plugin_manager.py index 5fdcbe7..fde5299 100644 --- a/plugin_manager.py +++ b/plugin_manager.py @@ -1,7 +1,7 @@ # ba_meta require api 7 import ba import _ba -from bastd.ui import popup +from bastd.ui import popup, confirm import urllib.request import http.client @@ -961,9 +961,16 @@ class PluginWindow(popup.PopupWindow): rotate=25, scale=0.45) - # Below snippet handles the tutorial button in the plugin window + + # Below snippet handles the tutorial button in the plugin window tutorial_url = self.plugin.info["external_url"] if tutorial_url: + def tutorial_confirm_window(): + text="This will take you to \n\""+self.plugin.info["external_url"] + "\"" + tutorial_confirm_window = confirm.ConfirmWindow( + text=text, + action=lambda: ba.open_url(self.plugin.info["external_url"]), + ) open_pos_x = (350 if _uiscale is ba.UIScale.SMALL else 410 if _uiscale is ba.UIScale.MEDIUM else 400) open_pos_y = (100 if _uiscale is ba.UIScale.SMALL else @@ -976,7 +983,9 @@ class PluginWindow(popup.PopupWindow): label="", # color=ba.app.ui.title_color, color=(0.6, 0.53, 0.63), - on_activate_call=lambda: ba.open_url(self.plugin.info["external_url"])) + + on_activate_call=tutorial_confirm_window) + ba.imagewidget(parent=self._root_widget, position=(open_pos_x, open_pos_y), size=(40, 40),