mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-10-08 14:54:36 +00:00
Added discord and GitHub textures on button
This commit is contained in:
parent
ca8a3006a3
commit
0d03b1bece
2 changed files with 43 additions and 18 deletions
|
|
@ -1,6 +1,12 @@
|
||||||
{
|
{
|
||||||
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
"plugin_manager_url": "https://github.com/bombsquad-community/plugin-manager/{content_type}/{tag}/plugin_manager.py",
|
||||||
"versions": {
|
"versions": {
|
||||||
|
"0.1.10": {
|
||||||
|
"api_version": 7,
|
||||||
|
"commit_sha": "21e58a1",
|
||||||
|
"released_on": "05-12-2022",
|
||||||
|
"md5sum": "d6c963bf62e5bfdcd3d83ff44b58f855"
|
||||||
|
},
|
||||||
"0.1.9": {
|
"0.1.9": {
|
||||||
"api_version": 7,
|
"api_version": 7,
|
||||||
"commit_sha": "09b6832",
|
"commit_sha": "09b6832",
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ _env = _ba.env()
|
||||||
_uiscale = ba.app.ui.uiscale
|
_uiscale = ba.app.ui.uiscale
|
||||||
|
|
||||||
|
|
||||||
PLUGIN_MANAGER_VERSION = "0.1.9"
|
PLUGIN_MANAGER_VERSION = "0.1.10"
|
||||||
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
REPOSITORY_URL = "https://github.com/bombsquad-community/plugin-manager"
|
||||||
CURRENT_TAG = "main"
|
CURRENT_TAG = "main"
|
||||||
INDEX_META = "{repository_url}/{content_type}/{tag}/index.json"
|
INDEX_META = "{repository_url}/{content_type}/{tag}/index.json"
|
||||||
|
|
@ -1665,10 +1665,12 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
|
||||||
width = 380 * s
|
width = 380 * s
|
||||||
height = 150 + 150 * s
|
height = 150 + 150 * s
|
||||||
color = (0.9, 0.9, 0.9)
|
color = (0.9, 0.9, 0.9)
|
||||||
|
discord_bg_color = ba.normalized_color((88, 101, 242))
|
||||||
|
github_bg_color = (0.2, 0.2, 0.2)
|
||||||
text_scale = 0.7 * s
|
text_scale = 0.7 * s
|
||||||
self._transition_out = 'out_scale'
|
self._transition_out = 'out_scale'
|
||||||
transition = 'in_scale'
|
transition = 'in_scale'
|
||||||
button_size = (60 * s, 32 * s)
|
button_size = (32 * s, 32 * s)
|
||||||
# index = await self._plugin_manager.get_index()
|
# index = await self._plugin_manager.get_index()
|
||||||
self._root_widget = ba.containerwidget(size=(width, height),
|
self._root_widget = ba.containerwidget(size=(width, height),
|
||||||
# parent=_ba.get_special_widget(
|
# parent=_ba.get_special_widget(
|
||||||
|
|
@ -1727,23 +1729,40 @@ class PluginManagerSettingsWindow(popup.PopupWindow):
|
||||||
maxwidth=width * 0.95)
|
maxwidth=width * 0.95)
|
||||||
|
|
||||||
pos -= 75
|
pos -= 75
|
||||||
ba.buttonwidget(parent=self._root_widget,
|
self.discord_button = ba.buttonwidget(parent=self._root_widget,
|
||||||
position=((width * 0.20) - button_size[0] / 2, pos),
|
position=((width * 0.20) - button_size[0] / 2, pos),
|
||||||
size=button_size,
|
size=button_size,
|
||||||
on_activate_call=lambda: ba.open_url(DISCORD_URL),
|
on_activate_call=lambda: ba.open_url(DISCORD_URL),
|
||||||
textcolor=b_text_color,
|
textcolor=b_text_color,
|
||||||
button_type='square',
|
color=discord_bg_color,
|
||||||
text_scale=1,
|
button_type='square',
|
||||||
label='Discord')
|
text_scale=1,
|
||||||
|
label="")
|
||||||
|
|
||||||
|
ba.imagewidget(parent=self._root_widget,
|
||||||
|
position=((width * 0.20)+0.5 - button_size[0] / 2, pos),
|
||||||
|
size=button_size,
|
||||||
|
texture=ba.gettexture("discordLogo"),
|
||||||
|
color=(10, 10, 10),
|
||||||
|
draw_controller=self.discord_button)
|
||||||
|
|
||||||
|
self.github_button = ba.buttonwidget(parent=self._root_widget,
|
||||||
|
position=((width * 0.49) - button_size[0] / 2, pos),
|
||||||
|
size=button_size,
|
||||||
|
on_activate_call=lambda: ba.open_url(REPOSITORY_URL),
|
||||||
|
textcolor=b_text_color,
|
||||||
|
color=github_bg_color,
|
||||||
|
button_type='square',
|
||||||
|
text_scale=1,
|
||||||
|
label='')
|
||||||
|
|
||||||
|
ba.imagewidget(parent=self._root_widget,
|
||||||
|
position=((width * 0.49) + 0.5 - button_size[0] / 2, pos),
|
||||||
|
size=button_size,
|
||||||
|
texture=ba.gettexture("githubLogo"),
|
||||||
|
color=(1, 1, 1),
|
||||||
|
draw_controller=self.github_button)
|
||||||
|
|
||||||
ba.buttonwidget(parent=self._root_widget,
|
|
||||||
position=((width * 0.49) - button_size[0] / 2, pos),
|
|
||||||
size=button_size,
|
|
||||||
on_activate_call=lambda: ba.open_url(REPOSITORY_URL),
|
|
||||||
textcolor=b_text_color,
|
|
||||||
button_type='square',
|
|
||||||
text_scale=1,
|
|
||||||
label='GitHub')
|
|
||||||
ba.containerwidget(edit=self._root_widget,
|
ba.containerwidget(edit=self._root_widget,
|
||||||
on_cancel_call=self._ok)
|
on_cancel_call=self._ok)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue