fixed pause overlay

pull/17/head
DiMartinoXBMC 2018-08-08 22:40:39 +03:00
parent db2e5ac02c
commit 1858e2d0de
4 changed files with 325 additions and 1240 deletions

File diff suppressed because it is too large Load Diff

View File

@ -668,7 +668,8 @@ class OverlayText(object):
self._shown = False
self._text = ""
self._label = xbmcgui.ControlLabel(x, y, w, h, self._text, *args, **kwargs)
self._background = xbmcgui.ControlImage(x, y, w, h, os.path.join(RESOURCES_PATH, "images", "black.png"))
filename = os.path.join(RESOURCES_PATH, "images", "black.png")
self._background = xbmcgui.ControlImage(x, y, w, h, filename)
self._background.setColorDiffuse("0xD0000000")
def show(self):
@ -702,5 +703,10 @@ class OverlayText(object):
skin_path = xbmc.translatePath("special://skin/")
tree = ET.parse(os.path.join(skin_path, "addon.xml"))
res = tree.findall("./extension/res")[0]
res = None
for element in tree.findall("./extension/res"):
if element.attrib["default"] == 'true':
res = element
break
if res is None: res = tree.findall("./extension/res")[0]
return int(res.attrib["width"]), int(res.attrib["height"])

14
Core.py
View File

@ -297,9 +297,17 @@ class Core:
def test(self, params={}):
pass
import searchwindow
params = {'mode': 'file_browser', 'path':'D:\\', 'tdir':'D:\\FRAPS\\'}
searchwindow.main(params)
xbmc.Player().play('D:\\filmz\\The Missing (2014).mp4')
from Anteoloader import OverlayText, OVERLAY_WIDTH, OVERLAY_HEIGHT, XBFONT_CENTER_X,XBFONT_CENTER_Y
overlay = OverlayText(w=OVERLAY_WIDTH, h=OVERLAY_HEIGHT,
alignment=XBFONT_CENTER_X | XBFONT_CENTER_Y)
overlay.show()
overlay.text = 'XXXXXXXXXXXXXXXXXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxXXXXXXXXXXXXXXXXXX\r\n' \
'YYyyyYyYYyYyY'
time.sleep(5)
overlay.hide()
time.sleep(1)
xbmc.Player().stop()
def swHistory(self, params={}):
import searchwindow

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 B

After

Width:  |  Height:  |  Size: 120 B