Update my utilities mods for 1.7.37+ (API 9)

icons_keyboard:
• Additional code which was added for compatibility between different versions of API 8 was removed;
• Removed PLUGIN functionality (not required anymore)
• Use default `# ba_meta export` class
• No longer imports the whole babase module, only the necessary one's

floater:
• No longer requires a compulsive function to always show the party chat icon, hence, removed.
• Add the missing JUMP_RELEASE button
This commit is contained in:
! Freaku 2025-02-08 16:50:58 +05:30 committed by GitHub
parent d6210689a2
commit 7fa1149944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 14 deletions

View file

@ -269,7 +269,6 @@ def new_chat_message(*args, **kwargs):
bs.chatmessage = new_chat_message bs.chatmessage = new_chat_message
# ba_meta export plugin # ba_meta export plugin
class byFreaku(babase.Plugin): class byFreaku(babase.Plugin):
def on_app_running(self): pass def on_app_running(self):
pass

View file

@ -10,10 +10,10 @@
# ba_meta require api 9 # ba_meta require api 9
import bauiv1 import bauiv1
import babase from babase import SpecialChar
from babase import charstr from babase import charstr
list_of_icons = [i for i in babase.SpecialChar] list_of_icons = [i for i in SpecialChar]
list_of_icons = [charstr(i) for i in list_of_icons] list_of_icons = [charstr(i) for i in list_of_icons]
list_of_icons.reverse() list_of_icons.reverse()
@ -21,7 +21,8 @@ for i in range(26 - (len(list_of_icons) % 26)):
list_of_icons.append('') list_of_icons.append('')
class IconKeyboard(babase.Keyboard if hasattr(babase, 'Keyboard') else bauiv1.Keyboard): # ba_meta export bauiv1.Keyboard
class IconKeyboard(bauiv1.Keyboard):
"""Keyboard go brrrrrrr""" """Keyboard go brrrrrrr"""
name = 'Icons by \ue048Freaku' name = 'Icons by \ue048Freaku'
chars = [(list_of_icons[0:10]), chars = [(list_of_icons[0:10]),
@ -32,10 +33,3 @@ class IconKeyboard(babase.Keyboard if hasattr(babase, 'Keyboard') else bauiv1.Ke
f'icon{i//26+1}': tuple(list_of_icons[i:i+26]) f'icon{i//26+1}': tuple(list_of_icons[i:i+26])
for i in range(26, len(list_of_icons), 26) for i in range(26, len(list_of_icons), 26)
} }
# ba_meta export plugin
class byFreaku(babase.Plugin):
def __init__(self):
babase.app.meta.scanresults.exports['babase.Keyboard' if hasattr(
babase, 'Keyboard') else 'bauiv1.Keyboard'].append(__name__+'.IconKeyboard')