mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Update icons_keyboard.py
• Add compatibility for new/old versions
This commit is contained in:
parent
a98d8a2264
commit
d5ff78ca2a
1 changed files with 8 additions and 2 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
# ba_meta require api 8
|
||||
|
||||
import bauiv1
|
||||
import babase
|
||||
from babase import charstr
|
||||
|
||||
|
|
@ -20,8 +21,7 @@ for i in range(26 - (len(list_of_icons) % 26)):
|
|||
list_of_icons.append('')
|
||||
|
||||
|
||||
# ba_meta export keyboard
|
||||
class IconKeyboard(babase.Keyboard):
|
||||
class IconKeyboard(babase.Keyboard if hasattr(babase, 'Keyboard') else bauiv1.Keyboard):
|
||||
"""Keyboard go brrrrrrr"""
|
||||
name = 'Icons by \ue048Freaku'
|
||||
chars = [(list_of_icons[0:10]),
|
||||
|
|
@ -32,3 +32,9 @@ class IconKeyboard(babase.Keyboard):
|
|||
f'icon{i//26+1}': tuple(list_of_icons[i:i+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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue