Menu contestuale finestra server a schermo intero
This commit is contained in:
@@ -1785,8 +1785,8 @@ def serverWindow(item, itemlist):
|
||||
|
||||
def onInit(self):
|
||||
self.SERVERS = self.getControl(100)
|
||||
self.VIDEOLIBRARY = self.getControl(102)
|
||||
self.DOWNLOAD = self.getControl(103)
|
||||
self.VIDEOLIBRARY = self.getControl(103)
|
||||
self.DOWNLOAD = self.getControl(104)
|
||||
if 'videolibrary' not in self.actions.keys():
|
||||
self.VIDEOLIBRARY.setVisible(False)
|
||||
if 'download' not in self.actions.keys():
|
||||
@@ -1804,7 +1804,7 @@ def serverWindow(item, itemlist):
|
||||
def onAction(self, action):
|
||||
action = action.getId()
|
||||
focus = self.getFocusId()
|
||||
if action in [UP, DOWN, LEFT, RIGHT] and focus not in [100, 101, 102, 103]:
|
||||
if action in [UP, DOWN, LEFT, RIGHT] and focus not in [100, 101, 102, 103, 104]:
|
||||
self.setFocusId(100)
|
||||
elif action in [EXIT, BACKSPACE]:
|
||||
self.close()
|
||||
@@ -1818,8 +1818,10 @@ def serverWindow(item, itemlist):
|
||||
elif control in [101]:
|
||||
self.close()
|
||||
elif control in [102]:
|
||||
self.run(self.actions['videolibrary'])
|
||||
context(self)
|
||||
elif control in [103]:
|
||||
self.run(self.actions['videolibrary'])
|
||||
elif control in [104]:
|
||||
self.run(self.actions['download'])
|
||||
|
||||
def run(self, action):
|
||||
@@ -1838,9 +1840,9 @@ def serverWindow(item, itemlist):
|
||||
|
||||
def onInit(self):
|
||||
try:
|
||||
self.list = self.getControl(6)
|
||||
self.SERVERS = self.getControl(6)
|
||||
self.exit = self.getControl(5)
|
||||
self.exit.setNavigation(self.exit, self.exit, self.list, self.list)
|
||||
self.exit.setNavigation(self.exit, self.exit, self.SERVERS, self.SERVERS)
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -1886,9 +1888,9 @@ def serverWindow(item, itemlist):
|
||||
it.setArt({'thumb': videoitem.thumbnail})
|
||||
|
||||
items.append(it)
|
||||
self.list.reset()
|
||||
self.list.addItems(items)
|
||||
self.setFocus(self.list)
|
||||
self.SERVERS.reset()
|
||||
self.SERVERS.addItems(items)
|
||||
self.setFocus(self.SERVERS)
|
||||
|
||||
def onFocus(self, control):
|
||||
if is_playing() and db['controls'].get('reopen', False):
|
||||
@@ -1922,7 +1924,7 @@ def serverWindow(item, itemlist):
|
||||
|
||||
|
||||
def context(self):
|
||||
pos = self.list.getSelectedPosition()
|
||||
pos = self.SERVERS.getSelectedPosition()
|
||||
parent = self.item
|
||||
item = self.itemlist[pos]
|
||||
commands = set_context_commands(item, item.tourl(), parent)
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<!-- <onclick>Action(close)</onclick> -->
|
||||
</control>
|
||||
<control type="button" id="102">
|
||||
<description>videolibrary</description>
|
||||
<description>Menu</description>
|
||||
<top>0</top>
|
||||
<right>40</right>
|
||||
<height>40</height>
|
||||
@@ -210,23 +210,38 @@
|
||||
<onup>100</onup>
|
||||
<ondown>100</ondown>
|
||||
<onleft condition="Control.IsVisible(103)">103</onleft>
|
||||
<onleft condition="Control.IsVisible(103)">100</onleft>
|
||||
<onleft condition="!Control.IsVisible(103) + Control.IsVisible(104)">104</onleft>
|
||||
<onleft>100</onleft>
|
||||
<onright>101</onright>
|
||||
<texturefocus colordiffuse="FFFFFFFF">menu.png</texturefocus>
|
||||
<texturenofocus colordiffuse="80FFFFFF">menu.png</texturenofocus>
|
||||
</control>
|
||||
<control type="button" id="103">
|
||||
<description>videolibrary</description>
|
||||
<top>0</top>
|
||||
<right>80</right>
|
||||
<height>40</height>
|
||||
<width>40</width>
|
||||
<onup>100</onup>
|
||||
<ondown>100</ondown>
|
||||
<onleft condition="Control.IsVisible(104)">104</onleft>
|
||||
<onleft condition="!Control.IsVisible(104)">100</onleft>
|
||||
<onright>102</onright>
|
||||
<texturefocus colordiffuse="FFFFFFFF">add.png</texturefocus>
|
||||
<texturenofocus colordiffuse="80FFFFFF">add.png</texturenofocus>
|
||||
</control>
|
||||
<control type="button" id="103">
|
||||
<control type="button" id="104">
|
||||
<description>Download</description>
|
||||
<top>0</top>
|
||||
<right>40</right>
|
||||
<animation effect="slide" end="-40,0" condition="Control.IsVisible(102)">Conditional</animation>
|
||||
<right>80</right>
|
||||
<animation effect="slide" end="-40,0" condition="Control.IsVisible(103)">Conditional</animation>
|
||||
<height>40</height>
|
||||
<width>40</width>
|
||||
<onup>100</onup>
|
||||
<ondown>100</ondown>
|
||||
<onleft>100</onleft>
|
||||
<onright condition="Control.IsVisible(102)">102</onright>
|
||||
<onright>101</onright>
|
||||
<onright condition="Control.IsVisible(103)">102</onright>
|
||||
<onright>102</onright>
|
||||
<texturefocus colordiffuse="FFFFFFFF">down.png</texturefocus>
|
||||
<texturenofocus colordiffuse="80FFFFFF">down.png</texturenofocus>
|
||||
</control>
|
||||
|
||||
Reference in New Issue
Block a user