caffeinatedmike

Kodi Pyxbmct Setting Custom Skin Properties

Mar 14th, 2018
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.79 KB | None | 0 0
  1. _url = sys.argv[0]
  2. _handle = int(sys.argv[1])
  3. addon_id = 'plugin.video.sports'
  4. addon = xbmcaddon.Addon(id=addon_id)
  5. logo = os.path.join(addon.getAddonInfo('path').decode('utf-8'), 'nhl/logo.png')
  6. blue = os.path.join(addon.getAddonInfo('path').decode('utf-8'), 'blue.png')
  7. red = os.path.join(addon.getAddonInfo('path').decode('utf-8'), 'red.png')
  8.  
  9. #http://romanvm.github.io/script.module.pyxbmct/skins.html
  10. class MySkin(pyxbmct.Skin):
  11.     @property
  12.     def title_background_img(self):
  13.         return red
  14.        
  15.     @property
  16.     def close_button_no_focus(self):
  17.         return logo
  18.        
  19. pyxbmct.addonwindow.skin = MySkin()
  20.  
  21. #Create your AddonDialogWindow or AddonFullWindow class now
  22. #as you normally would and you will see the changes
  23. class Score(pyxbmct.AddonDialogWindow):
  24.     ....
Advertisement
Add Comment
Please, Sign In to add comment