mirror of
https://github.com/bombsquad-community/plugin-manager.git
synced 2025-11-07 17:36:00 +00:00
Final tutorial button
Changed the texture to "frameInset" and the button will only appear only if the external_url is not empty.
This commit is contained in:
parent
ac26f010aa
commit
faf2b8a0b8
1 changed files with 29 additions and 27 deletions
|
|
@ -962,8 +962,10 @@ class PluginWindow(popup.PopupWindow):
|
|||
scale=0.45)
|
||||
|
||||
## Below snippet handles the tutorial button in the plugin window
|
||||
tutorial_url = self.plugin.info["external_url"]
|
||||
if tutorial_url:
|
||||
open_pos_x = (10 if _uiscale is ba.UIScale.SMALL else
|
||||
50 if _uiscale is ba.UIScale.MEDIUM else 50)
|
||||
70 if _uiscale is ba.UIScale.MEDIUM else 60)
|
||||
open_pos_y = (100 if _uiscale is ba.UIScale.SMALL else
|
||||
110 if _uiscale is ba.UIScale.MEDIUM else 120)
|
||||
open_button = ba.buttonwidget(parent=self._root_widget,
|
||||
|
|
@ -979,7 +981,7 @@ class PluginWindow(popup.PopupWindow):
|
|||
position=(open_pos_x, open_pos_y),
|
||||
size=(40, 40),
|
||||
color=(0.8, 0.95, 1),
|
||||
texture=ba.gettexture("file"),
|
||||
texture=ba.gettexture("frameInset"),
|
||||
draw_controller=open_button)
|
||||
ba.textwidget(parent=self._root_widget,
|
||||
position=(open_pos_x - 3, open_pos_y + 12),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue