From b05a92b8418a4579c62325870f029a90532dc761 Mon Sep 17 00:00:00 2001 From: Anas Date: Thu, 22 Jan 2026 19:41:15 +0100 Subject: [PATCH 01/12] Create InfinityGloves.py --- plugins/utilities/InfinityGloves.py | 59 +++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 plugins/utilities/InfinityGloves.py diff --git a/plugins/utilities/InfinityGloves.py b/plugins/utilities/InfinityGloves.py new file mode 100644 index 00000000..dcb840e2 --- /dev/null +++ b/plugins/utilities/InfinityGloves.py @@ -0,0 +1,59 @@ +# ba_meta require api 9 +# mod actualizado por: SOMBR1 +# mod updated by: SOMBR1 +# (see https://ballistica.net/wiki/meta-tag-system) + +from __future__ import annotations + +from typing import TYPE_CHECKING + +import bascenev1lib +import babase +import bascenev1 as bs +from bascenev1lib.actor import playerspaz + +if TYPE_CHECKING: + from typing import Sequence + +plugman = dict( + plugin_name="Infinity Gloves", + description="this plugin give you infinity gloves (isn't mine)", + external_url="", + authors=[ + {"name": "ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, + ], + version="1.0.0", +) + + +class NewPlayerSpaz(playerspaz.PlayerSpaz): + + def __init__(self, + player: bascenev1.Player, + color: Sequence[float] = (1.0, 1.0, 1.0), + highlight: Sequence[float] = (0.5, 0.5, 0.5), + character: str = 'Spaz', + powerups_expire: bool = True): + super().__init__(player=player, + color=color, + highlight=highlight, + character=character, + powerups_expire=powerups_expire) + self.equip_boxing_gloves() + + def handlemessage(self, msg: Any) -> Any: + if isinstance(msg, bs.PowerupMessage): + if msg.poweruptype == 'punch': + self.equip_boxing_gloves() + self.node.handlemessage('flash') + if msg.sourcenode: + msg.sourcenode.handlemessage(bs.PowerupAcceptMessage()) + else: + return super().handlemessage(msg) + else: + return super().handlemessage(msg) + + +# ba_meta export babase.Plugin +class InfinityGlovesPlugin(babase.Plugin): + playerspaz.PlayerSpaz = NewPlayerSpaz From 85db7916a39697deb2c05008ce2d2a4c64319fc0 Mon Sep 17 00:00:00 2001 From: Anas Date: Thu, 22 Jan 2026 19:44:20 +0100 Subject: [PATCH 02/12] Update InfinityGloves.py --- plugins/utilities/InfinityGloves.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/InfinityGloves.py b/plugins/utilities/InfinityGloves.py index dcb840e2..a0ab0a4a 100644 --- a/plugins/utilities/InfinityGloves.py +++ b/plugins/utilities/InfinityGloves.py @@ -16,7 +16,7 @@ from typing import Sequence plugman = dict( - plugin_name="Infinity Gloves", + plugin_name="InfinityGloves", description="this plugin give you infinity gloves (isn't mine)", external_url="", authors=[ From 790bd52d93b72a113b88214516bb9c29df4fc04a Mon Sep 17 00:00:00 2001 From: Anas Date: Thu, 22 Jan 2026 21:01:31 +0100 Subject: [PATCH 03/12] Update and rename InfinityGloves.py to infinity_gloves.py --- plugins/utilities/{InfinityGloves.py => infinity_gloves.py} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename plugins/utilities/{InfinityGloves.py => infinity_gloves.py} (97%) diff --git a/plugins/utilities/InfinityGloves.py b/plugins/utilities/infinity_gloves.py similarity index 97% rename from plugins/utilities/InfinityGloves.py rename to plugins/utilities/infinity_gloves.py index a0ab0a4a..703c68b7 100644 --- a/plugins/utilities/InfinityGloves.py +++ b/plugins/utilities/infinity_gloves.py @@ -16,7 +16,7 @@ from typing import Sequence plugman = dict( - plugin_name="InfinityGloves", + plugin_name="infinity_gloves", description="this plugin give you infinity gloves (isn't mine)", external_url="", authors=[ From cef7de04133e13b4307f4bd6eff56e3d23cd091a Mon Sep 17 00:00:00 2001 From: anasdhaoidi <223119809+anasdhaoidi@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:01:53 +0000 Subject: [PATCH 04/12] [ci] apply-plugin-metadata-and-formatting --- plugins/utilities.json | 14 ++++++++ plugins/utilities/infinity_gloves.py | 52 ++++++++++++++-------------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 589881d6..c883adca 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -2401,6 +2401,20 @@ "md5sum": "5082acb27f3dbe701d8bd42d8948b352" } } + }, + "infinity_gloves": { + "description": "this plugin give you infinity gloves (isn't mine)", + "external_url": "", + "authors": [ + { + "name": "ATD", + "email": "anasdhaoidi001@gmail.com", + "discord": "" + } + ], + "versions": { + "1.0.0": null + } } } } \ No newline at end of file diff --git a/plugins/utilities/infinity_gloves.py b/plugins/utilities/infinity_gloves.py index 703c68b7..8a4c860e 100644 --- a/plugins/utilities/infinity_gloves.py +++ b/plugins/utilities/infinity_gloves.py @@ -13,7 +13,7 @@ from bascenev1lib.actor import playerspaz if TYPE_CHECKING: - from typing import Sequence + from typing import Sequence plugman = dict( plugin_name="infinity_gloves", @@ -28,32 +28,32 @@ class NewPlayerSpaz(playerspaz.PlayerSpaz): - def __init__(self, - player: bascenev1.Player, - color: Sequence[float] = (1.0, 1.0, 1.0), - highlight: Sequence[float] = (0.5, 0.5, 0.5), - character: str = 'Spaz', - powerups_expire: bool = True): - super().__init__(player=player, - color=color, - highlight=highlight, - character=character, - powerups_expire=powerups_expire) - self.equip_boxing_gloves() - - def handlemessage(self, msg: Any) -> Any: - if isinstance(msg, bs.PowerupMessage): - if msg.poweruptype == 'punch': - self.equip_boxing_gloves() - self.node.handlemessage('flash') - if msg.sourcenode: - msg.sourcenode.handlemessage(bs.PowerupAcceptMessage()) - else: - return super().handlemessage(msg) - else: - return super().handlemessage(msg) + def __init__(self, + player: bascenev1.Player, + color: Sequence[float] = (1.0, 1.0, 1.0), + highlight: Sequence[float] = (0.5, 0.5, 0.5), + character: str = 'Spaz', + powerups_expire: bool = True): + super().__init__(player=player, + color=color, + highlight=highlight, + character=character, + powerups_expire=powerups_expire) + self.equip_boxing_gloves() + + def handlemessage(self, msg: Any) -> Any: + if isinstance(msg, bs.PowerupMessage): + if msg.poweruptype == 'punch': + self.equip_boxing_gloves() + self.node.handlemessage('flash') + if msg.sourcenode: + msg.sourcenode.handlemessage(bs.PowerupAcceptMessage()) + else: + return super().handlemessage(msg) + else: + return super().handlemessage(msg) # ba_meta export babase.Plugin class InfinityGlovesPlugin(babase.Plugin): - playerspaz.PlayerSpaz = NewPlayerSpaz + playerspaz.PlayerSpaz = NewPlayerSpaz From 9ae2b6fc591c78189eefb2a6197dc8eeb5aa1ec4 Mon Sep 17 00:00:00 2001 From: anasdhaoidi <223119809+anasdhaoidi@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:01:54 +0000 Subject: [PATCH 05/12] [ci] apply-version-metadata --- plugins/utilities.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index c883adca..da1dd091 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -2413,7 +2413,12 @@ } ], "versions": { - "1.0.0": null + "1.0.0": { + "api_version": 9, + "commit_sha": "cef7de0", + "released_on": "22-01-2026", + "md5sum": "afbd3cd3055254e8c8a060a484f153ee" + } } } } From d0a0f58220877a91bc0d6c8ebff54c89583f285a Mon Sep 17 00:00:00 2001 From: Anas Date: Fri, 23 Jan 2026 14:32:37 +0100 Subject: [PATCH 06/12] Update infinity_gloves.py --- plugins/utilities/infinity_gloves.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/infinity_gloves.py b/plugins/utilities/infinity_gloves.py index 8a4c860e..5864e849 100644 --- a/plugins/utilities/infinity_gloves.py +++ b/plugins/utilities/infinity_gloves.py @@ -20,7 +20,7 @@ description="this plugin give you infinity gloves (isn't mine)", external_url="", authors=[ - {"name": "ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, + {"name": "SOMBR1 & ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, ], version="1.0.0", ) From 8c1e7af5ae48e801216654330bd444c6e546e4cc Mon Sep 17 00:00:00 2001 From: Anas Date: Fri, 23 Jan 2026 14:34:26 +0100 Subject: [PATCH 07/12] Update infinity_gloves.py --- plugins/utilities/infinity_gloves.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/utilities/infinity_gloves.py b/plugins/utilities/infinity_gloves.py index 5864e849..a5378f48 100644 --- a/plugins/utilities/infinity_gloves.py +++ b/plugins/utilities/infinity_gloves.py @@ -1,7 +1,7 @@ # ba_meta require api 9 # mod actualizado por: SOMBR1 -# mod updated by: SOMBR1 -# (see https://ballistica.net/wiki/meta-tag-system) +# mod updated to API 8 by: SOMBR1 +# mod updated to API 9 by: ATD from __future__ import annotations From b3e9cc0b63f90899f6407437c2a7395a17131238 Mon Sep 17 00:00:00 2001 From: Anas Date: Fri, 23 Jan 2026 20:50:17 +0100 Subject: [PATCH 08/12] Add files via upload --- plugins/utilities/bs_text_on_map.py | 652 ++++++++++++++++++++++++++++ 1 file changed, 652 insertions(+) create mode 100644 plugins/utilities/bs_text_on_map.py diff --git a/plugins/utilities/bs_text_on_map.py b/plugins/utilities/bs_text_on_map.py new file mode 100644 index 00000000..9b110b86 --- /dev/null +++ b/plugins/utilities/bs_text_on_map.py @@ -0,0 +1,652 @@ +# ba_meta require api 9 +# by ATD +from __future__ import annotations +from typing import TYPE_CHECKING + +if TYPE_CHECKING: pass + +plugman = dict( + plugin_name="bs_text_on_map", + description="now your able to add text on every maps", + external_url="", + authors=[ + {"name": "ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, + ], + version="1.0.0", +) + +import babase +import bauiv1 as bui +import bascenev1 as bs +import _babase +import random +import time +import datetime +import weakref +import json +import os +from bauiv1lib.settings import advanced +from babase._mgen.enums import SpecialChar +from bauiv1lib.confirm import ConfirmWindow +from bauiv1lib.popup import PopupWindow +from bascenev1lib.actor.spaz import Spaz + +def getlanguage(txt): + lang = bs.app.lang.language + texts = {"Tittle":{"Spanish": "Añade tus textos", + "English": "Add your texts", + "Portuguese": "Adicione seus textos"}, + "Tittle2":{"Spanish": "Todos tus textos guardados", + "English": "All your saved texts", + "Portuguese": "Todos os seus textos salvos"}, + "Confirm":{"Spanish": "¿Estás seguro de querer \n borrar todos los textos?", + "English": "Are you sure you want to delete all the texts?", + "Portuguese": "Tem certeza de que deseja excluir todos os textos?"}, + "Add Text":{"Spanish": "Texto Guardardo", + "English": "Saved Text", + "Portuguese": "Texto Salvo"}, + "Del Tex":{"Spanish": "Texto eliminado", + "English": "Text removed", + "Portuguese": "Texto removido"}, + "Double Text":{"Spanish": "Este texto ya existe", + "English": "This text already exists", + "Portuguese": "Este texto já existe"}, + "Nothing text":{"Spanish": "Ya no hay textos", + "English": "There are no texts", + "Portuguese": "Não há textos"}, + "Confirm date":{"Spanish": "Todos los textos han sido eliminados", + "English": "All texts have been removed", + "Portuguese": "Todos os textos foram removidos"}, + "Multicolor Text":{"Spanish": "Color Cambiante", + "English": "Changing Color", + "Portuguese": "Mudança de cor"}, + "Add":{"Spanish": "Agregar", + "English": "Add", + "Portuguese": "Adicionar"}, + "Del":{"Spanish": "Borrar", + "English": "Delete", + "Portuguese": "Excluir"}, + "Del All":{"Spanish": "Borrar todo", + "English": "Delete everything", + "Portuguese": "Limpar tudo"}, + "Flags":{"Spanish": "Banderas", + "English": "Flags", + "Portuguese": "Bandeiras"}, + "Icons":{"Spanish": "Íconos", + "English": "Icons", + "Portuguese": "Ícones"}, + "Picker Color":{"Spanish": "Escoge tu color personalizado", + "English": "Choose your custom color", + "Portuguese": "Escolha sua cor personalizada"}, + "Tittle3":{"Spanish": "Añade un texto aquí", + "English": "Add text here", + "Portuguese": "Adicione texto aqui"}} + + language = ['Spanish', 'Portuguese', 'English'] + if lang not in language: + lang = 'English' + return texts[txt][lang] + +def thanks(): + return ['By ATD'] + +def getcolors(): + return {"Rojo": + (1,0,0), + "Naranja": + (1,0.5,0), + "Amarillo": + (1,1,0), + "Verde": + (0,1,0), + "Azul": + (0,1,1), + "Indigo": + (0.5,0.5,1), + "Violeta": + (1,0,1)} + +def configs(): + return [("Window", True), + ("Multicolor", False), + ("Texts", 'TextMod'), + ("Icon List", 'Icons'), + ("Texts List",thanks()), + ("Colors",(1,1,1)), + ("Color Text",{thanks()[0]: (1,1,1)})] + +cfg = babase.app.config +for config, settings in configs(): + if cfg.get(config) is None: + cfg[config] = settings +cfg.apply_and_commit() + +def random_colors(): + c = [(1,0,0),(1,0.5,0),(1,1,0),(0,1,0), + (0,1,1),(0.5,0.5,1),(0,0,1),(1,0,1)] + return random.choice(c) + +def random_texts(): + return random.choice(cfg['Texts List']) + +def colors(color): + c = [(1,0,0),(1,0.5,0),(1,1,0),(0,1,0), + (0,1,1),(0.5,0.5,1),(0,0,1),(1,0,1)] + return c[color] + +def window(self): + self.up_time_color = None + bui.containerwidget(edit=self._root_widget,transition='out_left') + TextWindow() + +def set_icons(): + return [_babase.charstr(SpecialChar.CROWN), + _babase.charstr(SpecialChar.DRAGON), + _babase.charstr(SpecialChar.SKULL), + _babase.charstr(SpecialChar.HEART), + _babase.charstr(SpecialChar.FEDORA), + _babase.charstr(SpecialChar.HAL), + _babase.charstr(SpecialChar.YIN_YANG), + _babase.charstr(SpecialChar.EYE_BALL), + _babase.charstr(SpecialChar.HELMET), + _babase.charstr(SpecialChar.MUSHROOM), + _babase.charstr(SpecialChar.NINJA_STAR), + _babase.charstr(SpecialChar.VIKING_HELMET), + _babase.charstr(SpecialChar.MOON), + _babase.charstr(SpecialChar.SPIDER), + _babase.charstr(SpecialChar.FIREBALL), + _babase.charstr(SpecialChar.MIKIROG), + "\ue026","\ue020","\ue01e","\ue027"] + +def set_flags(): + return [_babase.charstr(SpecialChar.FLAG_MEXICO), + _babase.charstr(SpecialChar.FLAG_UNITED_STATES), + _babase.charstr(SpecialChar.FLAG_CANADA), + _babase.charstr(SpecialChar.FLAG_ARGENTINA), + _babase.charstr(SpecialChar.FLAG_CHILE), + _babase.charstr(SpecialChar.FLAG_BRAZIL), + _babase.charstr(SpecialChar.FLAG_RUSSIA), + _babase.charstr(SpecialChar.FLAG_JAPAN), + _babase.charstr(SpecialChar.FLAG_CHINA), + _babase.charstr(SpecialChar.FLAG_SOUTH_KOREA), + _babase.charstr(SpecialChar.FLAG_GERMANY), + _babase.charstr(SpecialChar.FLAG_UNITED_KINGDOM), + _babase.charstr(SpecialChar.FLAG_INDIA), + _babase.charstr(SpecialChar.FLAG_FRANCE), + _babase.charstr(SpecialChar.FLAG_INDONESIA), + _babase.charstr(SpecialChar.FLAG_ITALY), + _babase.charstr(SpecialChar.FLAG_NETHERLANDS), + _babase.charstr(SpecialChar.FLAG_QATAR), + _babase.charstr(SpecialChar.FLAG_ALGERIA), + _babase.charstr(SpecialChar.FLAG_KUWAIT), + _babase.charstr(SpecialChar.FLAG_EGYPT), + _babase.charstr(SpecialChar.FLAG_MALAYSIA), + _babase.charstr(SpecialChar.FLAG_CZECH_REPUBLIC), + _babase.charstr(SpecialChar.FLAG_AUSTRALIA), + _babase.charstr(SpecialChar.FLAG_SINGAPORE), + _babase.charstr(SpecialChar.FLAG_IRAN), + _babase.charstr(SpecialChar.FLAG_POLAND), + _babase.charstr(SpecialChar.FLAG_PHILIPPINES), + _babase.charstr(SpecialChar.FLAG_SAUDI_ARABIA), + _babase.charstr(SpecialChar.FLAG_UNITED_ARAB_EMIRATES)] + +class TextWindow(PopupWindow): + def __init__(self, transition= 'in_right'): + self._transition = transition + self._container = None + self._refresh() + + def _refresh(self): + + if self._container is not None and self._container.exists(): + self._container.delete() + + app = bui.app.ui_v1 + uiscale = app.uiscale + + self._width = width = 800 + self._height = height = 500 + self._sub_height = 200 + self._scroll_width = self._width*0.90 + self._scroll_height = self._height - 180 + self._sub_width = self._scroll_width*0.95; + + self._window = cfg['Window'] + self._name = cfg['Texts List'] + + self._root_widget = bui.containerwidget(size=(width+90,height+80),transition=self._transition, + scale=1.5 if uiscale is babase.UIScale.SMALL else 1.0, + stack_offset=(0,-30) if uiscale is babase.UIScale.SMALL else (0,0)) + + self._backButton = b = bui.buttonwidget(parent=self._root_widget,autoselect=True, + position=(60,self._height-50),size=(130,60), + scale=0.8,text_scale=1.2,label=babase.Lstr(resource='backText'), + button_type='back',on_activate_call=babase.CallPartial(self._back)) + bui.buttonwidget(edit=self._backButton, button_type='backSmall',size=(60, 60),label=babase.charstr(babase.SpecialChar.BACK)) + bui.containerwidget(edit=self._root_widget,cancel_button=b) + + self.titletext = bui.textwidget(parent=self._root_widget,position=(40, height),size=(width,50), + h_align="center",color=bui.app.ui_v1.title_color, v_align="center",maxwidth=width*1.3) + + self.oth = bui.buttonwidget(parent=self._root_widget,autoselect=True, + position=(55,self._height-130),size=(60,60), + color=(0,0,1) if self._window else (0,1,1),scale=0.8,label='',button_type='square', + texture=bui.gettexture('replayIcon'),on_activate_call=babase.CallPartial(self._other)) + + self._scrollwidget = bui.scrollwidget(parent=self._root_widget, + position=(self._width*0.14,51*1.7), + size=(self._sub_width,self._scroll_height+100),selection_loops_to_parent=True) + + self._tab_container = None + self._set_window(self._window) + + def _other(self): + if self._window: + self._window = False + bui.buttonwidget(edit=self.oth,color=(0,1,1)) + self._saved_text() + else: + self._window = True + bui.buttonwidget(edit=self.oth,color=(0,0,1)) + self._set_window(self._window) + cfg.apply_and_commit() + + def _set_window(self, tag): + cfg['Window'] = tag + cfg.apply_and_commit() + + if self._tab_container is not None and self._tab_container.exists(): + self._tab_container.delete() + self.text_time = None + + if tag: + sub_height = 300 + v = sub_height - 55 + width = 300 + bui.textwidget(edit=self.titletext,text=getlanguage('Tittle')) + + self._tab_container = c = bui.containerwidget(parent=self._scrollwidget, + size=(self._sub_width,sub_height), + background=False,selection_loops_to_parent=True) + + up = 60 + upx = 10 + + t = bui.textwidget(parent=c,position=(60*2.2+upx,v-80+up),size=(205 * 1.8,53),h_align="center", + color=bui.app.ui_v1.title_color, text=getlanguage('Tittle3'), v_align="center",maxwidth=width*1.6) + + self.editable_text = bui.textwidget(parent=c,position=(60*2.2+upx,v-70*2+up),size=(205 * 1.8,53),selectable=True, + editable=True,max_chars=40,description=babase.Lstr(resource='editProfileWindow.nameText'), + h_align="center",color=(1,1,1), text=cfg['Texts'], v_align="center",maxwidth=width*1.6) + + b = bui.buttonwidget(parent=c,autoselect=True, + position=(120*3.4+upx,v-70*2.7+up),size=(130,60), + color=(0,1,0),scale=0.8,label=getlanguage('Add'),button_type='square', + textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self.do_not_duplicate,'Color')) + + b2 = bui.buttonwidget(parent=c,autoselect=True, + position=(120*2.2+upx,v-70*2.7+up),size=(130,60), + color=(1,1,0),scale=0.8,label=getlanguage('Del'),button_type='square', + textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self._remove)) + + b3 = bui.buttonwidget(parent=c,autoselect=True, + position=(120*1+upx,v-70*2.7+up),size=(130,60), + color=(1,0,0),scale=0.8,label=getlanguage('Del All'),button_type='square', + textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self._remove_all)) + self.iconpos = (120*4.4,v-70*1.1) + b4 = bui.buttonwidget(parent=c,autoselect=True, + position=self.iconpos,size=(60,60), + color=(0.52,0.48,0.63),scale=0.8,label=set_icons()[1], + button_type='square',on_activate_call=babase.CallPartial(self._icon)) + u = -30 + self.check = bui.checkboxwidget(parent=c,position=(120*1.8,v-70*4-u),value=cfg['Multicolor'], + on_value_change_call=babase.CallPartial(self._switches,'Multicolor'),maxwidth=self._scroll_width*0.9, + text=getlanguage('Multicolor Text'),autoselect=True) + else: + if len(self._name) >= 8: sub_height = (len(self._name) / 0.5 * 30) + else: sub_height = 400 + + width = 700 + v = sub_height - 55 + self.texts_widgets = {} + bui.textwidget(edit=self.titletext,text=getlanguage('Tittle2')) + + self._tab_container = c = bui.containerwidget(parent=self._scrollwidget, + size=(self._sub_width,sub_height), + background=False,selection_loops_to_parent=True) + + position = 0 + for names in self._name: + self.txtnames = bui.textwidget(parent=c,position=(-40,v-position),size=(width,50),selectable=True, + h_align="center",color=cfg['Color Text'][names],text=names,v_align="center",maxwidth=width*1.6) + self.texts_widgets[names] = self.txtnames + position += 60 + + if self.texts_widgets == {}: + self.text_time = None + else: + if cfg['Multicolor']: + with babase.ContextRef.empty(): + self.text_time = bs.Timer(0.1, babase.CallPartial(self.text_update_color), repeat=True) + else: pass + + def _multicolor(self): + if cfg['Multicolor']: + cfg['Multicolor'] = False + bui.buttonwidget(edit=self.button_color,color=(1,0,0)) + else: + bui.buttonwidget(edit=self.button_color,color=(0,1,0)) + cfg['Multicolor'] = True + + def _switches(self,tag,m): + cfg[tag] = False if m==0 else True + try: + apg.apply_and_commit() + except NameError: + pass + + def _save(self): + self._name.append(cfg['Texts']) + bs.broadcastmessage(f"{getlanguage('Add Text')}: {self._name[-1]}",cfg['Colors']) + cfg['Color Text'][self._name[-1]] = cfg['Colors'] + bui.getsound('gunCocking').play() + cfg.apply_and_commit() + + def _remove(self): + if len(self._name) == 0: + bs.broadcastmessage(getlanguage('Nothing text'),(1,0,0)) + else: + bs.broadcastmessage(f"{getlanguage('Del Tex')}: {self._name[-1]}",(1,0,0)) + del cfg['Color Text'][self._name[-1]] + self._name.pop() + + def _remove_all(self): + def confirm(): + delname = [] + for x in cfg['Texts List']: + delname.append(x) + for n in delname: + del cfg['Color Text'][n] + cfg['Texts List'].remove(n) + bs.broadcastmessage(getlanguage('Confirm date'),(1,1,0)) + cfg.apply_and_commit() + ConfirmWindow(getlanguage('Confirm'), + width=400, height=120, action=confirm, ok_text=babase.Lstr(resource='okText')) + + def do_not_duplicate(self, c): + self._saved_text() + if cfg['Texts'] not in self._name: + self._make_picker(c) + else: + bui.getsound('error').play() + bs.broadcastmessage(getlanguage('Double Text'),(1,1,0)) + + def _make_picker(self,tag): + from bauiv1lib.colorpicker import ColorPicker + if tag == 'Color': initial_color = cfg['Colors'] + ColorPicker(parent=self._root_widget,position=(0,0), + initial_color=initial_color,delegate=self,tag=tag) + + def color_picker_closing(self, picker): + pass + + def color_picker_selected_color(self, picker, color): + tag = picker.get_tag() + if tag == 'Color': + cfg['Colors'] = color + self._save() + + def _saved_text(self): + if hasattr(self, 'editable_text') and self.editable_text: + self._name_editable = bui.textwidget(query=self.editable_text) + cfg['Texts'] = self._name_editable + + def text_update_color(self): + for update in self._name: + bui.textwidget(edit=self.texts_widgets[update],color=(random_colors())) + + def _icon(self): + IconWindow(pos=(self.iconpos[0]-60*6,self.iconpos[1]-60*2), + callback=babase.CallPartial(window, self)) + self._saved_text() + + + def _back(self): + self.text_time = None + bui.containerwidget(edit=self._root_widget,transition='out_left') + advanced.AdvancedSettingsWindow() + if hasattr(self, '_saved_text'): + self._saved_text() + +class IconWindow(PopupWindow): + def __init__(self, pos=(0,0), callback=None): + self.callback = callback + uiscale = bui.app.ui_v1.uiscale + self._transitioning_out = False + scale = 2 if uiscale is babase.UIScale.SMALL else 1.3 + ipos = 0 + self._width = 380 + self._height = 300 + sub_width = self._width - 90 + sub_height = 100*6 + v = sub_height - 30 + bg_color = (0.5, 0.4, 0.6) + + self._current_tab = cfg['Icon List'] + self.collect = {} + + PopupWindow.__init__(self,position=pos, + size=(self._width, self._height), + scale=scale,bg_color=bg_color) + + self._cancel_button = bui.buttonwidget( parent=self.root_widget, + position=(50, self._height - 30), size=(50, 50), + scale=0.5, label=babase.charstr(babase.SpecialChar.BACK),button_type='backSmall', + color=(1,0,0),on_activate_call=self.on_popup_cancel,autoselect=True) + bui.containerwidget(edit=self.root_widget,cancel_button=self._cancel_button) + + self._scrollwidget = bui.scrollwidget(parent=self.root_widget, + size=(self._width - 60, + self._height - 70), + position=(30, 30)) + + iconlist = [("Icons",getlanguage('Icons')), ("Flags",getlanguage('Flags'))] + for x,j in iconlist: + self.collect[x] = bui.buttonwidget(parent=self.root_widget,size=(150*1.3, 60), + scale=0.5,position=(60*1.5+ipos, self._height - 45),label=j, + button_type='tab',enable_sound=False,autoselect=True, + on_activate_call=babase.CallPartial(self._set_tab,x,sound=True)) + ipos += 100 + + self._subcontainer = None + self._set_tab(self._current_tab) + + def _set_tab(self, tab, sound=False): + self.sound = sound + cfg['Icon List'] = tab + cfg.apply_and_commit() + + if self._subcontainer is not None and self._subcontainer.exists(): + self._subcontainer.delete() + + if self.sound: + self._tick_and_call() + + if tab == 'Icons': + sub_height = 240 + v = sub_height - 50 + u = 10 + self._subcontainer = c = bui.containerwidget(parent=self._scrollwidget, + size=(self._width, sub_height), + background=False) + + pos1 = 0 + for icon1 in range(5): + b = bui.buttonwidget(parent=c,position=(u+pos1,v),size=(40,40),button_type='square', + label=set_icons()[icon1],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon1),autoselect=True) + pos1 += 60 + + pos2 = 0 + for icon2 in range(5,10): + b = bui.buttonwidget(parent=c,position=(u+pos2,v-60),size=(40,40),button_type='square', + label=set_icons()[icon2],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon2),autoselect=True) + pos2 += 60 + + pos3 = 0 + for icon3 in range(10,15): + b = bui.buttonwidget(parent=c,position=(u+pos3,v-60*2),size=(40,40),button_type='square', + label=set_icons()[icon3],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon3),autoselect=True) + pos3 += 60 + + pos4 = 0 + for icon4 in range(15,20): + b = bui.buttonwidget(parent=c,position=(u+pos4,v-60*3),size=(40,40),button_type='square', + label=set_icons()[icon4],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon4),autoselect=True) + pos4 += 60 + + elif tab == 'Flags': + sub_height = 360 + v = sub_height - 50 + u = 10 + self._subcontainer = c = bui.containerwidget(parent=self._scrollwidget, + size=(self._width, sub_height), + background=False) + + pos1 = 0 + for flag1 in range(5): + b = bui.buttonwidget(parent=c,position=(u+pos1,v),size=(40,40),button_type='square', + label=set_flags()[flag1],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag1),autoselect=True) + pos1 += 60 + + pos2 = 0 + for flag2 in range(5,10): + b = bui.buttonwidget(parent=c,position=(u+pos2,v-60),size=(40,40),button_type='square', + label=set_flags()[flag2],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag2),autoselect=True) + pos2 += 60 + + pos3 = 0 + for flag3 in range(10,15): + b = bui.buttonwidget(parent=c,position=(u+pos3,v-60*2),size=(40,40),button_type='square', + label=set_flags()[flag3],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag3),autoselect=True) + pos3 += 60 + + pos4 = 0 + for flag4 in range(15,20): + b = bui.buttonwidget(parent=c,position=(u+pos4,v-60*3),size=(40,40),button_type='square', + label=set_flags()[flag4],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag4),autoselect=True) + pos4 += 60 + + pos5 = 0 + for flag5 in range(20,25): + b = bui.buttonwidget(parent=c,position=(u+pos5,v-60*4),size=(40,40),button_type='square', + label=set_flags()[flag5],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag5),autoselect=True) + pos5 += 60 + + pos6 = 0 + for flag6 in range(25,30): + b = bui.buttonwidget(parent=c,position=(u+pos6,v-60*5),size=(40,40),button_type='square', + label=set_flags()[flag6],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag6),autoselect=True) + pos6 += 60 + + for icons in self.collect: + if icons == tab: + bui.buttonwidget(edit=self.collect[icons],color=(0.5, 0.4, 0.93)) + else: bui.buttonwidget(edit=self.collect[icons],color=(0.52, 0.48, 0.63)) + + def _icons(self, icon): + cfg['Texts'] += set_icons()[icon] + self._on_cancel_press() + + def _flags(self, flag): + cfg['Texts'] += set_flags()[flag] + self._on_cancel_press() + + def _tick_and_call(self): + bui.getsound('click01').play() + + def _on_cancel_press(self) -> None: + self._transition_out() + self.callback() + + def _transition_out(self) -> None: + if not self._transitioning_out: + self._transitioning_out = True + bui.containerwidget(edit=self.root_widget, transition='out_scale') + + def on_popup_cancel(self) -> None: + bui.getsound('swish').play() + self._transition_out() + +GLOBAL = {"Alm": list()} + +super_map = bs.Map.__init__ +def text_init(self, *args,**kwargs): + super_map(self, *args,**kwargs) + + texts = cfg['Texts List'] + color_texts = cfg['Color Text'] + GLOBAL['Alm'] = [] + + def text(scale=1.5, + position=(0,-200), + shadow=1,h_align='center'): + random_txt = random_texts() + self.txt = bs.newnode('text', + attrs={'text': random_txt, + 'scale': scale, + 'shadow': shadow, + 'color': cfg['Color Text'][random_txt], + 'position': position, + 'h_align': h_align}) + bs.animate(self.txt,'opacity', + {0:0, 2:0, 2.5:1, 27:1, 28:0}, True) + + if cfg['Multicolor']: + bs.animate_array(self.txt, "color", 3, + {0: colors(0), 1: colors(1), 2: colors(2), 3: colors(3), 4: colors(4), + 5: colors(5), 6: colors(6), 7: colors(7), 8: colors(0)}, + loop=True) + + if any(texts) or any(color_texts): + text() + + def update(): + alm = GLOBAL['Alm'] + while(True): + if len(texts) == len(alm): + alm = [] + + t = random_texts() + if t not in alm: + self.txt.text = t + alm.append(t) + break + + GLOBAL['Alm'] = [alm[-1]] + + self.uptime = bs.Timer(28.0, + babase.CallPartial(update), repeat=True) + +def add_plugin(): + try: + bs.timer(2.5, lambda e=e: bs.broadcastmessage('Error plugin: ' + str(e), (1,0,0))) + except: + pass + try: + with babase.ContextRef.empty(): + bs.timer(2.5, lambda: bs.broadcastmessage('Error plugin', (1,0,0))) + except: + pass + +# ba_meta export babase.Plugin +class Text(babase.Plugin): + bs.Map.__init__ = text_init + + def __init__(self) -> None: + add_plugin() + + def has_settings_ui(self): + return True + + def show_settings_ui(self, origin_widget): + TextWindow() \ No newline at end of file From 400f20e2f78c4a863cf4d444f37730f796a0c9b5 Mon Sep 17 00:00:00 2001 From: Anas Date: Fri, 23 Jan 2026 20:55:37 +0100 Subject: [PATCH 09/12] Update bs_text_on_map.py --- plugins/utilities/bs_text_on_map.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/utilities/bs_text_on_map.py b/plugins/utilities/bs_text_on_map.py index 9b110b86..dc6b595e 100644 --- a/plugins/utilities/bs_text_on_map.py +++ b/plugins/utilities/bs_text_on_map.py @@ -12,7 +12,7 @@ authors=[ {"name": "ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, ], - version="1.0.0", + version="1.5.0", ) import babase @@ -649,4 +649,4 @@ def has_settings_ui(self): return True def show_settings_ui(self, origin_widget): - TextWindow() \ No newline at end of file + TextWindow() From ea2c12579bf65d50849f5e120cd099b9e589ae42 Mon Sep 17 00:00:00 2001 From: Anas Date: Fri, 23 Jan 2026 20:56:04 +0100 Subject: [PATCH 10/12] Update infinity_gloves.py --- plugins/utilities/infinity_gloves.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/utilities/infinity_gloves.py b/plugins/utilities/infinity_gloves.py index a5378f48..1e21d7b2 100644 --- a/plugins/utilities/infinity_gloves.py +++ b/plugins/utilities/infinity_gloves.py @@ -22,7 +22,7 @@ authors=[ {"name": "SOMBR1 & ATD", "email": "anasdhaoidi001@gmail.com", "discord": ""}, ], - version="1.0.0", + version="1.3.0", ) From a4c9c83facf7c76ce3fe7f1e158a7a7233bb6c98 Mon Sep 17 00:00:00 2001 From: anasdhaoidi <223119809+anasdhaoidi@users.noreply.github.com> Date: Fri, 23 Jan 2026 19:56:27 +0000 Subject: [PATCH 11/12] [ci] apply-plugin-metadata-and-formatting --- plugins/utilities.json | 17 +- plugins/utilities/bs_text_on_map.py | 601 +++++++++++++++------------- 2 files changed, 329 insertions(+), 289 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index da1dd091..98ee5241 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -2407,12 +2407,13 @@ "external_url": "", "authors": [ { - "name": "ATD", + "name": "SOMBR1 & ATD", "email": "anasdhaoidi001@gmail.com", "discord": "" } ], "versions": { + "1.3.0": null, "1.0.0": { "api_version": 9, "commit_sha": "cef7de0", @@ -2420,6 +2421,20 @@ "md5sum": "afbd3cd3055254e8c8a060a484f153ee" } } + }, + "bs_text_on_map": { + "description": "now your able to add text on every maps", + "external_url": "", + "authors": [ + { + "name": "ATD", + "email": "anasdhaoidi001@gmail.com", + "discord": "" + } + ], + "versions": { + "1.5.0": null + } } } } \ No newline at end of file diff --git a/plugins/utilities/bs_text_on_map.py b/plugins/utilities/bs_text_on_map.py index dc6b595e..39c97b09 100644 --- a/plugins/utilities/bs_text_on_map.py +++ b/plugins/utilities/bs_text_on_map.py @@ -1,9 +1,25 @@ # ba_meta require api 9 # by ATD from __future__ import annotations +from bascenev1lib.actor.spaz import Spaz +from bauiv1lib.popup import PopupWindow +from bauiv1lib.confirm import ConfirmWindow +from babase._mgen.enums import SpecialChar +from bauiv1lib.settings import advanced +import os +import json +import weakref +import datetime +import time +import random +import _babase +import bascenev1 as bs +import bauiv1 as bui +import babase from typing import TYPE_CHECKING -if TYPE_CHECKING: pass +if TYPE_CHECKING: + pass plugman = dict( plugin_name="bs_text_on_map", @@ -15,105 +31,94 @@ version="1.5.0", ) -import babase -import bauiv1 as bui -import bascenev1 as bs -import _babase -import random -import time -import datetime -import weakref -import json -import os -from bauiv1lib.settings import advanced -from babase._mgen.enums import SpecialChar -from bauiv1lib.confirm import ConfirmWindow -from bauiv1lib.popup import PopupWindow -from bascenev1lib.actor.spaz import Spaz def getlanguage(txt): lang = bs.app.lang.language - texts = {"Tittle":{"Spanish": "Añade tus textos", - "English": "Add your texts", - "Portuguese": "Adicione seus textos"}, - "Tittle2":{"Spanish": "Todos tus textos guardados", - "English": "All your saved texts", - "Portuguese": "Todos os seus textos salvos"}, - "Confirm":{"Spanish": "¿Estás seguro de querer \n borrar todos los textos?", - "English": "Are you sure you want to delete all the texts?", - "Portuguese": "Tem certeza de que deseja excluir todos os textos?"}, - "Add Text":{"Spanish": "Texto Guardardo", - "English": "Saved Text", - "Portuguese": "Texto Salvo"}, - "Del Tex":{"Spanish": "Texto eliminado", - "English": "Text removed", - "Portuguese": "Texto removido"}, - "Double Text":{"Spanish": "Este texto ya existe", - "English": "This text already exists", - "Portuguese": "Este texto já existe"}, - "Nothing text":{"Spanish": "Ya no hay textos", - "English": "There are no texts", - "Portuguese": "Não há textos"}, - "Confirm date":{"Spanish": "Todos los textos han sido eliminados", - "English": "All texts have been removed", - "Portuguese": "Todos os textos foram removidos"}, - "Multicolor Text":{"Spanish": "Color Cambiante", - "English": "Changing Color", - "Portuguese": "Mudança de cor"}, - "Add":{"Spanish": "Agregar", - "English": "Add", - "Portuguese": "Adicionar"}, - "Del":{"Spanish": "Borrar", - "English": "Delete", - "Portuguese": "Excluir"}, - "Del All":{"Spanish": "Borrar todo", - "English": "Delete everything", - "Portuguese": "Limpar tudo"}, - "Flags":{"Spanish": "Banderas", - "English": "Flags", - "Portuguese": "Bandeiras"}, - "Icons":{"Spanish": "Íconos", - "English": "Icons", - "Portuguese": "Ícones"}, - "Picker Color":{"Spanish": "Escoge tu color personalizado", - "English": "Choose your custom color", - "Portuguese": "Escolha sua cor personalizada"}, - "Tittle3":{"Spanish": "Añade un texto aquí", - "English": "Add text here", - "Portuguese": "Adicione texto aqui"}} - + texts = {"Tittle": {"Spanish": "Añade tus textos", + "English": "Add your texts", + "Portuguese": "Adicione seus textos"}, + "Tittle2": {"Spanish": "Todos tus textos guardados", + "English": "All your saved texts", + "Portuguese": "Todos os seus textos salvos"}, + "Confirm": {"Spanish": "¿Estás seguro de querer \n borrar todos los textos?", + "English": "Are you sure you want to delete all the texts?", + "Portuguese": "Tem certeza de que deseja excluir todos os textos?"}, + "Add Text": {"Spanish": "Texto Guardardo", + "English": "Saved Text", + "Portuguese": "Texto Salvo"}, + "Del Tex": {"Spanish": "Texto eliminado", + "English": "Text removed", + "Portuguese": "Texto removido"}, + "Double Text": {"Spanish": "Este texto ya existe", + "English": "This text already exists", + "Portuguese": "Este texto já existe"}, + "Nothing text": {"Spanish": "Ya no hay textos", + "English": "There are no texts", + "Portuguese": "Não há textos"}, + "Confirm date": {"Spanish": "Todos los textos han sido eliminados", + "English": "All texts have been removed", + "Portuguese": "Todos os textos foram removidos"}, + "Multicolor Text": {"Spanish": "Color Cambiante", + "English": "Changing Color", + "Portuguese": "Mudança de cor"}, + "Add": {"Spanish": "Agregar", + "English": "Add", + "Portuguese": "Adicionar"}, + "Del": {"Spanish": "Borrar", + "English": "Delete", + "Portuguese": "Excluir"}, + "Del All": {"Spanish": "Borrar todo", + "English": "Delete everything", + "Portuguese": "Limpar tudo"}, + "Flags": {"Spanish": "Banderas", + "English": "Flags", + "Portuguese": "Bandeiras"}, + "Icons": {"Spanish": "Íconos", + "English": "Icons", + "Portuguese": "Ícones"}, + "Picker Color": {"Spanish": "Escoge tu color personalizado", + "English": "Choose your custom color", + "Portuguese": "Escolha sua cor personalizada"}, + "Tittle3": {"Spanish": "Añade un texto aquí", + "English": "Add text here", + "Portuguese": "Adicione texto aqui"}} + language = ['Spanish', 'Portuguese', 'English'] if lang not in language: lang = 'English' return texts[txt][lang] + def thanks(): return ['By ATD'] + def getcolors(): return {"Rojo": - (1,0,0), + (1, 0, 0), "Naranja": - (1,0.5,0), + (1, 0.5, 0), "Amarillo": - (1,1,0), + (1, 1, 0), "Verde": - (0,1,0), + (0, 1, 0), "Azul": - (0,1,1), + (0, 1, 1), "Indigo": - (0.5,0.5,1), + (0.5, 0.5, 1), "Violeta": - (1,0,1)} + (1, 0, 1)} + def configs(): return [("Window", True), ("Multicolor", False), ("Texts", 'TextMod'), ("Icon List", 'Icons'), - ("Texts List",thanks()), - ("Colors",(1,1,1)), - ("Color Text",{thanks()[0]: (1,1,1)})] + ("Texts List", thanks()), + ("Colors", (1, 1, 1)), + ("Color Text", {thanks()[0]: (1, 1, 1)})] + cfg = babase.app.config for config, settings in configs(): @@ -121,24 +126,29 @@ def configs(): cfg[config] = settings cfg.apply_and_commit() + def random_colors(): - c = [(1,0,0),(1,0.5,0),(1,1,0),(0,1,0), - (0,1,1),(0.5,0.5,1),(0,0,1),(1,0,1)] + c = [(1, 0, 0), (1, 0.5, 0), (1, 1, 0), (0, 1, 0), + (0, 1, 1), (0.5, 0.5, 1), (0, 0, 1), (1, 0, 1)] return random.choice(c) + def random_texts(): return random.choice(cfg['Texts List']) + def colors(color): - c = [(1,0,0),(1,0.5,0),(1,1,0),(0,1,0), - (0,1,1),(0.5,0.5,1),(0,0,1),(1,0,1)] + c = [(1, 0, 0), (1, 0.5, 0), (1, 1, 0), (0, 1, 0), + (0, 1, 1), (0.5, 0.5, 1), (0, 0, 1), (1, 0, 1)] return c[color] + def window(self): self.up_time_color = None - bui.containerwidget(edit=self._root_widget,transition='out_left') + bui.containerwidget(edit=self._root_widget, transition='out_left') TextWindow() + def set_icons(): return [_babase.charstr(SpecialChar.CROWN), _babase.charstr(SpecialChar.DRAGON), @@ -156,8 +166,9 @@ def set_icons(): _babase.charstr(SpecialChar.SPIDER), _babase.charstr(SpecialChar.FIREBALL), _babase.charstr(SpecialChar.MIKIROG), - "\ue026","\ue020","\ue01e","\ue027"] - + "\ue026", "\ue020", "\ue01e", "\ue027"] + + def set_flags(): return [_babase.charstr(SpecialChar.FLAG_MEXICO), _babase.charstr(SpecialChar.FLAG_UNITED_STATES), @@ -190,17 +201,18 @@ def set_flags(): _babase.charstr(SpecialChar.FLAG_SAUDI_ARABIA), _babase.charstr(SpecialChar.FLAG_UNITED_ARAB_EMIRATES)] + class TextWindow(PopupWindow): - def __init__(self, transition= 'in_right'): + def __init__(self, transition='in_right'): self._transition = transition self._container = None self._refresh() def _refresh(self): - + if self._container is not None and self._container.exists(): self._container.delete() - + app = bui.app.ui_v1 uiscale = app.uiscale @@ -209,33 +221,34 @@ def _refresh(self): self._sub_height = 200 self._scroll_width = self._width*0.90 self._scroll_height = self._height - 180 - self._sub_width = self._scroll_width*0.95; - + self._sub_width = self._scroll_width*0.95 + self._window = cfg['Window'] self._name = cfg['Texts List'] - self._root_widget = bui.containerwidget(size=(width+90,height+80),transition=self._transition, - scale=1.5 if uiscale is babase.UIScale.SMALL else 1.0, - stack_offset=(0,-30) if uiscale is babase.UIScale.SMALL else (0,0)) - - self._backButton = b = bui.buttonwidget(parent=self._root_widget,autoselect=True, - position=(60,self._height-50),size=(130,60), - scale=0.8,text_scale=1.2,label=babase.Lstr(resource='backText'), - button_type='back',on_activate_call=babase.CallPartial(self._back)) - bui.buttonwidget(edit=self._backButton, button_type='backSmall',size=(60, 60),label=babase.charstr(babase.SpecialChar.BACK)) - bui.containerwidget(edit=self._root_widget,cancel_button=b) - - self.titletext = bui.textwidget(parent=self._root_widget,position=(40, height),size=(width,50), - h_align="center",color=bui.app.ui_v1.title_color, v_align="center",maxwidth=width*1.3) - - self.oth = bui.buttonwidget(parent=self._root_widget,autoselect=True, - position=(55,self._height-130),size=(60,60), - color=(0,0,1) if self._window else (0,1,1),scale=0.8,label='',button_type='square', - texture=bui.gettexture('replayIcon'),on_activate_call=babase.CallPartial(self._other)) + self._root_widget = bui.containerwidget(size=(width+90, height+80), transition=self._transition, + scale=1.5 if uiscale is babase.UIScale.SMALL else 1.0, + stack_offset=(0, -30) if uiscale is babase.UIScale.SMALL else (0, 0)) + + self._backButton = b = bui.buttonwidget(parent=self._root_widget, autoselect=True, + position=(60, self._height-50), size=(130, 60), + scale=0.8, text_scale=1.2, label=babase.Lstr(resource='backText'), + button_type='back', on_activate_call=babase.CallPartial(self._back)) + bui.buttonwidget(edit=self._backButton, button_type='backSmall', size=( + 60, 60), label=babase.charstr(babase.SpecialChar.BACK)) + bui.containerwidget(edit=self._root_widget, cancel_button=b) + + self.titletext = bui.textwidget(parent=self._root_widget, position=(40, height), size=(width, 50), + h_align="center", color=bui.app.ui_v1.title_color, v_align="center", maxwidth=width*1.3) + + self.oth = bui.buttonwidget(parent=self._root_widget, autoselect=True, + position=(55, self._height-130), size=(60, 60), + color=(0, 0, 1) if self._window else (0, 1, 1), scale=0.8, label='', button_type='square', + texture=bui.gettexture('replayIcon'), on_activate_call=babase.CallPartial(self._other)) self._scrollwidget = bui.scrollwidget(parent=self._root_widget, - position=(self._width*0.14,51*1.7), - size=(self._sub_width,self._scroll_height+100),selection_loops_to_parent=True) + position=(self._width*0.14, 51*1.7), + size=(self._sub_width, self._scroll_height+100), selection_loops_to_parent=True) self._tab_container = None self._set_window(self._window) @@ -243,18 +256,18 @@ def _refresh(self): def _other(self): if self._window: self._window = False - bui.buttonwidget(edit=self.oth,color=(0,1,1)) + bui.buttonwidget(edit=self.oth, color=(0, 1, 1)) self._saved_text() else: self._window = True - bui.buttonwidget(edit=self.oth,color=(0,0,1)) + bui.buttonwidget(edit=self.oth, color=(0, 0, 1)) self._set_window(self._window) cfg.apply_and_commit() def _set_window(self, tag): cfg['Window'] = tag cfg.apply_and_commit() - + if self._tab_container is not None and self._tab_container.exists(): self._tab_container.delete() self.text_time = None @@ -263,103 +276,107 @@ def _set_window(self, tag): sub_height = 300 v = sub_height - 55 width = 300 - bui.textwidget(edit=self.titletext,text=getlanguage('Tittle')) + bui.textwidget(edit=self.titletext, text=getlanguage('Tittle')) self._tab_container = c = bui.containerwidget(parent=self._scrollwidget, - size=(self._sub_width,sub_height), - background=False,selection_loops_to_parent=True) + size=(self._sub_width, sub_height), + background=False, selection_loops_to_parent=True) up = 60 upx = 10 - - t = bui.textwidget(parent=c,position=(60*2.2+upx,v-80+up),size=(205 * 1.8,53),h_align="center", - color=bui.app.ui_v1.title_color, text=getlanguage('Tittle3'), v_align="center",maxwidth=width*1.6) - - self.editable_text = bui.textwidget(parent=c,position=(60*2.2+upx,v-70*2+up),size=(205 * 1.8,53),selectable=True, - editable=True,max_chars=40,description=babase.Lstr(resource='editProfileWindow.nameText'), - h_align="center",color=(1,1,1), text=cfg['Texts'], v_align="center",maxwidth=width*1.6) - - b = bui.buttonwidget(parent=c,autoselect=True, - position=(120*3.4+upx,v-70*2.7+up),size=(130,60), - color=(0,1,0),scale=0.8,label=getlanguage('Add'),button_type='square', - textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self.do_not_duplicate,'Color')) - - b2 = bui.buttonwidget(parent=c,autoselect=True, - position=(120*2.2+upx,v-70*2.7+up),size=(130,60), - color=(1,1,0),scale=0.8,label=getlanguage('Del'),button_type='square', - textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self._remove)) - - b3 = bui.buttonwidget(parent=c,autoselect=True, - position=(120*1+upx,v-70*2.7+up),size=(130,60), - color=(1,0,0),scale=0.8,label=getlanguage('Del All'),button_type='square', - textcolor=bui.app.ui_v1.title_color,on_activate_call=babase.CallPartial(self._remove_all)) - self.iconpos = (120*4.4,v-70*1.1) - b4 = bui.buttonwidget(parent=c,autoselect=True, - position=self.iconpos,size=(60,60), - color=(0.52,0.48,0.63),scale=0.8,label=set_icons()[1], - button_type='square',on_activate_call=babase.CallPartial(self._icon)) + + t = bui.textwidget(parent=c, position=(60*2.2+upx, v-80+up), size=(205 * 1.8, 53), h_align="center", + color=bui.app.ui_v1.title_color, text=getlanguage('Tittle3'), v_align="center", maxwidth=width*1.6) + + self.editable_text = bui.textwidget(parent=c, position=(60*2.2+upx, v-70*2+up), size=(205 * 1.8, 53), selectable=True, + editable=True, max_chars=40, description=babase.Lstr(resource='editProfileWindow.nameText'), + h_align="center", color=(1, 1, 1), text=cfg['Texts'], v_align="center", maxwidth=width*1.6) + + b = bui.buttonwidget(parent=c, autoselect=True, + position=(120*3.4+upx, v-70*2.7+up), size=(130, 60), + color=(0, 1, 0), scale=0.8, label=getlanguage('Add'), button_type='square', + textcolor=bui.app.ui_v1.title_color, on_activate_call=babase.CallPartial(self.do_not_duplicate, 'Color')) + + b2 = bui.buttonwidget(parent=c, autoselect=True, + position=(120*2.2+upx, v-70*2.7+up), size=(130, 60), + color=(1, 1, 0), scale=0.8, label=getlanguage('Del'), button_type='square', + textcolor=bui.app.ui_v1.title_color, on_activate_call=babase.CallPartial(self._remove)) + + b3 = bui.buttonwidget(parent=c, autoselect=True, + position=(120*1+upx, v-70*2.7+up), size=(130, 60), + color=(1, 0, 0), scale=0.8, label=getlanguage('Del All'), button_type='square', + textcolor=bui.app.ui_v1.title_color, on_activate_call=babase.CallPartial(self._remove_all)) + self.iconpos = (120*4.4, v-70*1.1) + b4 = bui.buttonwidget(parent=c, autoselect=True, + position=self.iconpos, size=(60, 60), + color=(0.52, 0.48, 0.63), scale=0.8, label=set_icons()[1], + button_type='square', on_activate_call=babase.CallPartial(self._icon)) u = -30 - self.check = bui.checkboxwidget(parent=c,position=(120*1.8,v-70*4-u),value=cfg['Multicolor'], - on_value_change_call=babase.CallPartial(self._switches,'Multicolor'),maxwidth=self._scroll_width*0.9, - text=getlanguage('Multicolor Text'),autoselect=True) + self.check = bui.checkboxwidget(parent=c, position=(120*1.8, v-70*4-u), value=cfg['Multicolor'], + on_value_change_call=babase.CallPartial(self._switches, 'Multicolor'), maxwidth=self._scroll_width*0.9, + text=getlanguage('Multicolor Text'), autoselect=True) else: - if len(self._name) >= 8: sub_height = (len(self._name) / 0.5 * 30) - else: sub_height = 400 - + if len(self._name) >= 8: + sub_height = (len(self._name) / 0.5 * 30) + else: + sub_height = 400 + width = 700 v = sub_height - 55 self.texts_widgets = {} - bui.textwidget(edit=self.titletext,text=getlanguage('Tittle2')) - + bui.textwidget(edit=self.titletext, text=getlanguage('Tittle2')) + self._tab_container = c = bui.containerwidget(parent=self._scrollwidget, - size=(self._sub_width,sub_height), - background=False,selection_loops_to_parent=True) + size=(self._sub_width, sub_height), + background=False, selection_loops_to_parent=True) position = 0 for names in self._name: - self.txtnames = bui.textwidget(parent=c,position=(-40,v-position),size=(width,50),selectable=True, - h_align="center",color=cfg['Color Text'][names],text=names,v_align="center",maxwidth=width*1.6) + self.txtnames = bui.textwidget(parent=c, position=(-40, v-position), size=(width, 50), selectable=True, + h_align="center", color=cfg['Color Text'][names], text=names, v_align="center", maxwidth=width*1.6) self.texts_widgets[names] = self.txtnames position += 60 - + if self.texts_widgets == {}: self.text_time = None else: if cfg['Multicolor']: with babase.ContextRef.empty(): - self.text_time = bs.Timer(0.1, babase.CallPartial(self.text_update_color), repeat=True) - else: pass - + self.text_time = bs.Timer(0.1, babase.CallPartial( + self.text_update_color), repeat=True) + else: + pass + def _multicolor(self): if cfg['Multicolor']: cfg['Multicolor'] = False - bui.buttonwidget(edit=self.button_color,color=(1,0,0)) + bui.buttonwidget(edit=self.button_color, color=(1, 0, 0)) else: - bui.buttonwidget(edit=self.button_color,color=(0,1,0)) + bui.buttonwidget(edit=self.button_color, color=(0, 1, 0)) cfg['Multicolor'] = True - - def _switches(self,tag,m): - cfg[tag] = False if m==0 else True + + def _switches(self, tag, m): + cfg[tag] = False if m == 0 else True try: - apg.apply_and_commit() + apg.apply_and_commit() except NameError: - pass - + pass + def _save(self): self._name.append(cfg['Texts']) - bs.broadcastmessage(f"{getlanguage('Add Text')}: {self._name[-1]}",cfg['Colors']) + bs.broadcastmessage(f"{getlanguage('Add Text')}: {self._name[-1]}", cfg['Colors']) cfg['Color Text'][self._name[-1]] = cfg['Colors'] bui.getsound('gunCocking').play() cfg.apply_and_commit() - + def _remove(self): if len(self._name) == 0: - bs.broadcastmessage(getlanguage('Nothing text'),(1,0,0)) + bs.broadcastmessage(getlanguage('Nothing text'), (1, 0, 0)) else: - bs.broadcastmessage(f"{getlanguage('Del Tex')}: {self._name[-1]}",(1,0,0)) + bs.broadcastmessage(f"{getlanguage('Del Tex')}: {self._name[-1]}", (1, 0, 0)) del cfg['Color Text'][self._name[-1]] self._name.pop() - + def _remove_all(self): def confirm(): delname = [] @@ -368,25 +385,26 @@ def confirm(): for n in delname: del cfg['Color Text'][n] cfg['Texts List'].remove(n) - bs.broadcastmessage(getlanguage('Confirm date'),(1,1,0)) + bs.broadcastmessage(getlanguage('Confirm date'), (1, 1, 0)) cfg.apply_and_commit() ConfirmWindow(getlanguage('Confirm'), - width=400, height=120, action=confirm, ok_text=babase.Lstr(resource='okText')) - + width=400, height=120, action=confirm, ok_text=babase.Lstr(resource='okText')) + def do_not_duplicate(self, c): self._saved_text() if cfg['Texts'] not in self._name: self._make_picker(c) else: bui.getsound('error').play() - bs.broadcastmessage(getlanguage('Double Text'),(1,1,0)) - - def _make_picker(self,tag): + bs.broadcastmessage(getlanguage('Double Text'), (1, 1, 0)) + + def _make_picker(self, tag): from bauiv1lib.colorpicker import ColorPicker - if tag == 'Color': initial_color = cfg['Colors'] - ColorPicker(parent=self._root_widget,position=(0,0), - initial_color=initial_color,delegate=self,tag=tag) - + if tag == 'Color': + initial_color = cfg['Colors'] + ColorPicker(parent=self._root_widget, position=(0, 0), + initial_color=initial_color, delegate=self, tag=tag) + def color_picker_closing(self, picker): pass @@ -395,31 +413,31 @@ def color_picker_selected_color(self, picker, color): if tag == 'Color': cfg['Colors'] = color self._save() - + def _saved_text(self): if hasattr(self, 'editable_text') and self.editable_text: - self._name_editable = bui.textwidget(query=self.editable_text) + self._name_editable = bui.textwidget(query=self.editable_text) cfg['Texts'] = self._name_editable - + def text_update_color(self): for update in self._name: - bui.textwidget(edit=self.texts_widgets[update],color=(random_colors())) - + bui.textwidget(edit=self.texts_widgets[update], color=(random_colors())) + def _icon(self): - IconWindow(pos=(self.iconpos[0]-60*6,self.iconpos[1]-60*2), + IconWindow(pos=(self.iconpos[0]-60*6, self.iconpos[1]-60*2), callback=babase.CallPartial(window, self)) self._saved_text() - - + def _back(self): self.text_time = None - bui.containerwidget(edit=self._root_widget,transition='out_left') + bui.containerwidget(edit=self._root_widget, transition='out_left') advanced.AdvancedSettingsWindow() if hasattr(self, '_saved_text'): - self._saved_text() - + self._saved_text() + + class IconWindow(PopupWindow): - def __init__(self, pos=(0,0), callback=None): + def __init__(self, pos=(0, 0), callback=None): self.callback = callback uiscale = bui.app.ui_v1.uiscale self._transitioning_out = False @@ -435,29 +453,29 @@ def __init__(self, pos=(0,0), callback=None): self._current_tab = cfg['Icon List'] self.collect = {} - PopupWindow.__init__(self,position=pos, + PopupWindow.__init__(self, position=pos, size=(self._width, self._height), - scale=scale,bg_color=bg_color) + scale=scale, bg_color=bg_color) - self._cancel_button = bui.buttonwidget( parent=self.root_widget, - position=(50, self._height - 30), size=(50, 50), - scale=0.5, label=babase.charstr(babase.SpecialChar.BACK),button_type='backSmall', - color=(1,0,0),on_activate_call=self.on_popup_cancel,autoselect=True) - bui.containerwidget(edit=self.root_widget,cancel_button=self._cancel_button) + self._cancel_button = bui.buttonwidget(parent=self.root_widget, + position=(50, self._height - 30), size=(50, 50), + scale=0.5, label=babase.charstr(babase.SpecialChar.BACK), button_type='backSmall', + color=(1, 0, 0), on_activate_call=self.on_popup_cancel, autoselect=True) + bui.containerwidget(edit=self.root_widget, cancel_button=self._cancel_button) self._scrollwidget = bui.scrollwidget(parent=self.root_widget, - size=(self._width - 60, - self._height - 70), - position=(30, 30)) - - iconlist = [("Icons",getlanguage('Icons')), ("Flags",getlanguage('Flags'))] - for x,j in iconlist: - self.collect[x] = bui.buttonwidget(parent=self.root_widget,size=(150*1.3, 60), - scale=0.5,position=(60*1.5+ipos, self._height - 45),label=j, - button_type='tab',enable_sound=False,autoselect=True, - on_activate_call=babase.CallPartial(self._set_tab,x,sound=True)) + size=(self._width - 60, + self._height - 70), + position=(30, 30)) + + iconlist = [("Icons", getlanguage('Icons')), ("Flags", getlanguage('Flags'))] + for x, j in iconlist: + self.collect[x] = bui.buttonwidget(parent=self.root_widget, size=(150*1.3, 60), + scale=0.5, position=(60*1.5+ipos, self._height - 45), label=j, + button_type='tab', enable_sound=False, autoselect=True, + on_activate_call=babase.CallPartial(self._set_tab, x, sound=True)) ipos += 100 - + self._subcontainer = None self._set_tab(self._current_tab) @@ -468,7 +486,7 @@ def _set_tab(self, tab, sound=False): if self._subcontainer is not None and self._subcontainer.exists(): self._subcontainer.delete() - + if self.sound: self._tick_and_call() @@ -477,81 +495,82 @@ def _set_tab(self, tab, sound=False): v = sub_height - 50 u = 10 self._subcontainer = c = bui.containerwidget(parent=self._scrollwidget, - size=(self._width, sub_height), - background=False) - + size=(self._width, sub_height), + background=False) + pos1 = 0 for icon1 in range(5): - b = bui.buttonwidget(parent=c,position=(u+pos1,v),size=(40,40),button_type='square', - label=set_icons()[icon1],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon1),autoselect=True) + b = bui.buttonwidget(parent=c, position=(u+pos1, v), size=(40, 40), button_type='square', + label=set_icons()[icon1], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._icons, icon1), autoselect=True) pos1 += 60 - + pos2 = 0 - for icon2 in range(5,10): - b = bui.buttonwidget(parent=c,position=(u+pos2,v-60),size=(40,40),button_type='square', - label=set_icons()[icon2],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon2),autoselect=True) + for icon2 in range(5, 10): + b = bui.buttonwidget(parent=c, position=(u+pos2, v-60), size=(40, 40), button_type='square', + label=set_icons()[icon2], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._icons, icon2), autoselect=True) pos2 += 60 - + pos3 = 0 - for icon3 in range(10,15): - b = bui.buttonwidget(parent=c,position=(u+pos3,v-60*2),size=(40,40),button_type='square', - label=set_icons()[icon3],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon3),autoselect=True) + for icon3 in range(10, 15): + b = bui.buttonwidget(parent=c, position=(u+pos3, v-60*2), size=(40, 40), button_type='square', + label=set_icons()[icon3], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._icons, icon3), autoselect=True) pos3 += 60 - + pos4 = 0 - for icon4 in range(15,20): - b = bui.buttonwidget(parent=c,position=(u+pos4,v-60*3),size=(40,40),button_type='square', - label=set_icons()[icon4],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._icons,icon4),autoselect=True) + for icon4 in range(15, 20): + b = bui.buttonwidget(parent=c, position=(u+pos4, v-60*3), size=(40, 40), button_type='square', + label=set_icons()[icon4], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._icons, icon4), autoselect=True) pos4 += 60 - + elif tab == 'Flags': sub_height = 360 v = sub_height - 50 u = 10 self._subcontainer = c = bui.containerwidget(parent=self._scrollwidget, - size=(self._width, sub_height), - background=False) - + size=(self._width, sub_height), + background=False) + pos1 = 0 for flag1 in range(5): - b = bui.buttonwidget(parent=c,position=(u+pos1,v),size=(40,40),button_type='square', - label=set_flags()[flag1],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag1),autoselect=True) + b = bui.buttonwidget(parent=c, position=(u+pos1, v), size=(40, 40), button_type='square', + label=set_flags()[flag1], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag1), autoselect=True) pos1 += 60 - + pos2 = 0 - for flag2 in range(5,10): - b = bui.buttonwidget(parent=c,position=(u+pos2,v-60),size=(40,40),button_type='square', - label=set_flags()[flag2],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag2),autoselect=True) + for flag2 in range(5, 10): + b = bui.buttonwidget(parent=c, position=(u+pos2, v-60), size=(40, 40), button_type='square', + label=set_flags()[flag2], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag2), autoselect=True) pos2 += 60 - + pos3 = 0 - for flag3 in range(10,15): - b = bui.buttonwidget(parent=c,position=(u+pos3,v-60*2),size=(40,40),button_type='square', - label=set_flags()[flag3],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag3),autoselect=True) + for flag3 in range(10, 15): + b = bui.buttonwidget(parent=c, position=(u+pos3, v-60*2), size=(40, 40), button_type='square', + label=set_flags()[flag3], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag3), autoselect=True) pos3 += 60 - + pos4 = 0 - for flag4 in range(15,20): - b = bui.buttonwidget(parent=c,position=(u+pos4,v-60*3),size=(40,40),button_type='square', - label=set_flags()[flag4],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag4),autoselect=True) + for flag4 in range(15, 20): + b = bui.buttonwidget(parent=c, position=(u+pos4, v-60*3), size=(40, 40), button_type='square', + label=set_flags()[flag4], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag4), autoselect=True) pos4 += 60 pos5 = 0 - for flag5 in range(20,25): - b = bui.buttonwidget(parent=c,position=(u+pos5,v-60*4),size=(40,40),button_type='square', - label=set_flags()[flag5],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag5),autoselect=True) + for flag5 in range(20, 25): + b = bui.buttonwidget(parent=c, position=(u+pos5, v-60*4), size=(40, 40), button_type='square', + label=set_flags()[flag5], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag5), autoselect=True) pos5 += 60 pos6 = 0 - for flag6 in range(25,30): - b = bui.buttonwidget(parent=c,position=(u+pos6,v-60*5),size=(40,40),button_type='square', - label=set_flags()[flag6],color=(0.8,0.8,0.8),on_activate_call=babase.CallPartial(self._flags,flag6),autoselect=True) + for flag6 in range(25, 30): + b = bui.buttonwidget(parent=c, position=(u+pos6, v-60*5), size=(40, 40), button_type='square', + label=set_flags()[flag6], color=(0.8, 0.8, 0.8), on_activate_call=babase.CallPartial(self._flags, flag6), autoselect=True) pos6 += 60 for icons in self.collect: if icons == tab: - bui.buttonwidget(edit=self.collect[icons],color=(0.5, 0.4, 0.93)) - else: bui.buttonwidget(edit=self.collect[icons],color=(0.52, 0.48, 0.63)) + bui.buttonwidget(edit=self.collect[icons], color=(0.5, 0.4, 0.93)) + else: + bui.buttonwidget(edit=self.collect[icons], color=(0.52, 0.48, 0.63)) def _icons(self, icon): cfg['Texts'] += set_icons()[icon] @@ -572,50 +591,53 @@ def _transition_out(self) -> None: if not self._transitioning_out: self._transitioning_out = True bui.containerwidget(edit=self.root_widget, transition='out_scale') - + def on_popup_cancel(self) -> None: bui.getsound('swish').play() self._transition_out() - + + GLOBAL = {"Alm": list()} - + super_map = bs.Map.__init__ -def text_init(self, *args,**kwargs): - super_map(self, *args,**kwargs) + + +def text_init(self, *args, **kwargs): + super_map(self, *args, **kwargs) texts = cfg['Texts List'] color_texts = cfg['Color Text'] GLOBAL['Alm'] = [] - + def text(scale=1.5, - position=(0,-200), - shadow=1,h_align='center'): - random_txt = random_texts() + position=(0, -200), + shadow=1, h_align='center'): + random_txt = random_texts() self.txt = bs.newnode('text', - attrs={'text': random_txt, - 'scale': scale, - 'shadow': shadow, - 'color': cfg['Color Text'][random_txt], - 'position': position, - 'h_align': h_align}) - bs.animate(self.txt,'opacity', - {0:0, 2:0, 2.5:1, 27:1, 28:0}, True) - + attrs={'text': random_txt, + 'scale': scale, + 'shadow': shadow, + 'color': cfg['Color Text'][random_txt], + 'position': position, + 'h_align': h_align}) + bs.animate(self.txt, 'opacity', + {0: 0, 2: 0, 2.5: 1, 27: 1, 28: 0}, True) + if cfg['Multicolor']: bs.animate_array(self.txt, "color", 3, - {0: colors(0), 1: colors(1), 2: colors(2), 3: colors(3), 4: colors(4), - 5: colors(5), 6: colors(6), 7: colors(7), 8: colors(0)}, - loop=True) - + {0: colors(0), 1: colors(1), 2: colors(2), 3: colors(3), 4: colors(4), + 5: colors(5), 6: colors(6), 7: colors(7), 8: colors(0)}, + loop=True) + if any(texts) or any(color_texts): text() def update(): alm = GLOBAL['Alm'] - while(True): + while (True): if len(texts) == len(alm): alm = [] - + t = random_texts() if t not in alm: self.txt.text = t @@ -623,30 +645,33 @@ def update(): break GLOBAL['Alm'] = [alm[-1]] - + self.uptime = bs.Timer(28.0, - babase.CallPartial(update), repeat=True) - + babase.CallPartial(update), repeat=True) + + def add_plugin(): try: - bs.timer(2.5, lambda e=e: bs.broadcastmessage('Error plugin: ' + str(e), (1,0,0))) + bs.timer(2.5, lambda e=e: bs.broadcastmessage('Error plugin: ' + str(e), (1, 0, 0))) except: - pass + pass try: - with babase.ContextRef.empty(): - bs.timer(2.5, lambda: bs.broadcastmessage('Error plugin', (1,0,0))) + with babase.ContextRef.empty(): + bs.timer(2.5, lambda: bs.broadcastmessage('Error plugin', (1, 0, 0))) except: - pass - + pass + # ba_meta export babase.Plugin + + class Text(babase.Plugin): bs.Map.__init__ = text_init - + def __init__(self) -> None: add_plugin() def has_settings_ui(self): - return True + return True def show_settings_ui(self, origin_widget): TextWindow() From 1bd9910e3e4606bd3383d6066794e1d763244a38 Mon Sep 17 00:00:00 2001 From: anasdhaoidi <223119809+anasdhaoidi@users.noreply.github.com> Date: Fri, 23 Jan 2026 19:56:28 +0000 Subject: [PATCH 12/12] [ci] apply-version-metadata --- plugins/utilities.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/utilities.json b/plugins/utilities.json index 98ee5241..0d8f3704 100644 --- a/plugins/utilities.json +++ b/plugins/utilities.json @@ -2413,7 +2413,12 @@ } ], "versions": { - "1.3.0": null, + "1.3.0": { + "api_version": 9, + "commit_sha": "a4c9c83", + "released_on": "23-01-2026", + "md5sum": "d8214784e4b4916b2af56b6a9bbb91d5" + }, "1.0.0": { "api_version": 9, "commit_sha": "cef7de0", @@ -2433,7 +2438,12 @@ } ], "versions": { - "1.5.0": null + "1.5.0": { + "api_version": 9, + "commit_sha": "a4c9c83", + "released_on": "23-01-2026", + "md5sum": "82ba58e15220e628f1f09b9bdb3d451e" + } } } }