Fix Menu Rapido
This commit is contained in:
@@ -95,6 +95,7 @@ class Main(xbmcgui.WindowXMLDialog):
|
|||||||
self.setCoordinateResolution(2)
|
self.setCoordinateResolution(2)
|
||||||
|
|
||||||
for menuentry in menu:
|
for menuentry in menu:
|
||||||
|
if not menuentry.channel: menuentry.channel = prevchannel
|
||||||
item = xbmcgui.ListItem(menuentry.title)
|
item = xbmcgui.ListItem(menuentry.title)
|
||||||
if not submenu and menuentry.channel in ['news', 'channelselector', 'search', 'videolibrary']:
|
if not submenu and menuentry.channel in ['news', 'channelselector', 'search', 'videolibrary']:
|
||||||
item.setProperty('sub', 'Controls/spinUp-Focus.png')
|
item.setProperty('sub', 'Controls/spinUp-Focus.png')
|
||||||
@@ -110,7 +111,7 @@ class Main(xbmcgui.WindowXMLDialog):
|
|||||||
def onClick(self, control_id):
|
def onClick(self, control_id):
|
||||||
if control_id == 32500:
|
if control_id == 32500:
|
||||||
action = self.getControl(32500).getSelectedItem().getProperty('run')
|
action = self.getControl(32500).getSelectedItem().getProperty('run')
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
self.close()
|
||||||
xbmc.executebuiltin('ActivateWindow(10025, "plugin://plugin.video.kod/?' + base64.b64encode(action) + '")')
|
xbmc.executebuiltin('ActivateWindow(10025, "plugin://plugin.video.kod/?' + base64.b64encode(action) + '")')
|
||||||
|
|
||||||
|
|
||||||
@@ -118,7 +119,7 @@ class Main(xbmcgui.WindowXMLDialog):
|
|||||||
def onAction(self, action):
|
def onAction(self, action):
|
||||||
# exit
|
# exit
|
||||||
if action.getId() in [xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]:
|
if action.getId() in [xbmcgui.ACTION_PREVIOUS_MENU, xbmcgui.ACTION_NAV_BACK]:
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
self.close()
|
||||||
if submenu: open_shortcut_menu()
|
if submenu: open_shortcut_menu()
|
||||||
|
|
||||||
if action.getId() == xbmcgui.ACTION_CONTEXT_MENU:
|
if action.getId() == xbmcgui.ACTION_CONTEXT_MENU:
|
||||||
@@ -126,25 +127,27 @@ class Main(xbmcgui.WindowXMLDialog):
|
|||||||
|
|
||||||
if action == 3:
|
if action == 3:
|
||||||
if submenu:
|
if submenu:
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
self.close()
|
||||||
open_shortcut_menu()
|
open_shortcut_menu()
|
||||||
elif self.getControl(32500).getSelectedItem().getProperty('channel') in ['news', 'channelselector', 'search', 'videolibrary']:
|
elif self.getControl(32500).getSelectedItem().getProperty('channel') in ['news', 'channelselector', 'search', 'videolibrary']:
|
||||||
channel_name = self.getControl(32500).getSelectedItem().getProperty('channel')
|
channel_name = self.getControl(32500).getSelectedItem().getProperty('channel')
|
||||||
if channel_name == 'channelselector':
|
if channel_name == 'channelselector':
|
||||||
import channelselector
|
import channelselector
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
self.close()
|
||||||
open_shortcut_menu(channelselector.getchanneltypes())
|
open_shortcut_menu(channelselector.getchanneltypes(), channel_name)
|
||||||
else:
|
else:
|
||||||
from core.item import Item
|
from core.item import Item
|
||||||
channel = __import__('specials.%s' % channel_name, fromlist=["specials.%s" % channel_name])
|
channel = __import__('specials.%s' % channel_name, fromlist=["specials.%s" % channel_name])
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
self.close()
|
||||||
open_shortcut_menu(channel.mainlist(Item().fromjson(action)))
|
open_shortcut_menu(channel.mainlist(Item().fromjson(action)), channel_name)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def open_shortcut_menu(newmenu=''):
|
def open_shortcut_menu(newmenu='', channel=''):
|
||||||
global menu
|
global menu
|
||||||
global submenu
|
global submenu
|
||||||
|
global prevchannel
|
||||||
|
prevchannel = channel
|
||||||
if newmenu:
|
if newmenu:
|
||||||
menu = newmenu
|
menu = newmenu
|
||||||
submenu = True
|
submenu = True
|
||||||
@@ -154,7 +157,6 @@ def open_shortcut_menu(newmenu=''):
|
|||||||
XML = 'ShortCutMenu.xml'
|
XML = 'ShortCutMenu.xml'
|
||||||
if config.get_setting('icon_set') == 'dark':
|
if config.get_setting('icon_set') == 'dark':
|
||||||
XML = 'Dark' + XML
|
XML = 'Dark' + XML
|
||||||
xbmc.executebuiltin('Dialog.Close(all,true)')
|
|
||||||
main = Main(XML, config.get_runtime_path())
|
main = Main(XML, config.get_runtime_path())
|
||||||
main.doModal()
|
main.doModal()
|
||||||
del main
|
del main
|
||||||
|
|||||||
@@ -7,12 +7,10 @@
|
|||||||
</coordinates>
|
</coordinates>
|
||||||
<defaultcontrol always="true">32500</defaultcontrol>
|
<defaultcontrol always="true">32500</defaultcontrol>
|
||||||
<animation type="WindowOpen" reversible="false">
|
<animation type="WindowOpen" reversible="false">
|
||||||
<effect type="slide" start="0,100" end="0,0" center="640,225" delay="160" tween="cubic" time="200" />
|
|
||||||
<effect type="fade" delay="160" end="100" time="220" />
|
<effect type="fade" delay="160" end="100" time="220" />
|
||||||
</animation>
|
</animation>
|
||||||
<animation type="WindowClose" reversible="false">
|
<animation type="WindowClose" reversible="false">
|
||||||
<effect type="slide" start="0,0" end="0,-100" center="640,225" delay="160" tween="cubic" time="200" />
|
<effect type="fade" delay="160" start="100" end="0" time="200" />
|
||||||
<effect type="fade" start="100" end="0" time="200" />
|
|
||||||
</animation>
|
</animation>
|
||||||
<controls>
|
<controls>
|
||||||
<control type="button">
|
<control type="button">
|
||||||
@@ -24,14 +22,22 @@
|
|||||||
<texturenofocus colordiffuse="88FFFFFF">Shortcut/white.png</texturenofocus>
|
<texturenofocus colordiffuse="88FFFFFF">Shortcut/white.png</texturenofocus>
|
||||||
<onclick>Action(close)</onclick>
|
<onclick>Action(close)</onclick>
|
||||||
</control>
|
</control>
|
||||||
<control type="image">
|
|
||||||
<left>0</left>
|
|
||||||
<top>0</top>
|
|
||||||
<width>880</width>
|
|
||||||
<height>220</height>
|
|
||||||
<texture border="2" colordiffuse="FFEEEEEE">Shortcut/white.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="group">
|
<control type="group">
|
||||||
|
<animation type="WindowOpen" reversible="false">
|
||||||
|
<effect type="slide" start="0,100" end="0,0" center="640,225" delay="160" tween="cubic" time="200" />
|
||||||
|
<effect type="fade" delay="160" end="100" time="220" />
|
||||||
|
</animation>
|
||||||
|
<animation type="WindowClose" reversible="false">
|
||||||
|
<effect type="slide" start="0,0" end="0,-100" center="640,225" delay="160" tween="cubic" time="200" />
|
||||||
|
<effect type="fade" delay="160" start="100" end="0" time="200" />
|
||||||
|
</animation>
|
||||||
|
<control type="image">
|
||||||
|
<left>0</left>
|
||||||
|
<top>0</top>
|
||||||
|
<width>880</width>
|
||||||
|
<height>220</height>
|
||||||
|
<texture border="2" colordiffuse="FFEEEEEE">Shortcut/white.png</texture>
|
||||||
|
</control>
|
||||||
<control type="group">
|
<control type="group">
|
||||||
<control type="image">
|
<control type="image">
|
||||||
<left>-21</left>
|
<left>-21</left>
|
||||||
@@ -53,7 +59,6 @@
|
|||||||
<animation effect="slide" start="0,0" end="10,0" time="0" condition="true">Conditional</animation>
|
<animation effect="slide" start="0,0" end="10,0" time="0" condition="true">Conditional</animation>
|
||||||
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
||||||
<itemlayout height="220" width="220">
|
<itemlayout height="220" width="220">
|
||||||
<!-- <top>2</top> -->
|
|
||||||
<control type="image">
|
<control type="image">
|
||||||
<top>0</top>
|
<top>0</top>
|
||||||
<left>0</left>
|
<left>0</left>
|
||||||
@@ -69,11 +74,9 @@
|
|||||||
<texture colordiffuse="60FFFFFF">Shortcut/black.png</texture>
|
<texture colordiffuse="60FFFFFF">Shortcut/black.png</texture>
|
||||||
</control>
|
</control>
|
||||||
<control type="image">
|
<control type="image">
|
||||||
<left>35</left>
|
<width>220</width>
|
||||||
<top>35</top>
|
<height>220</height>
|
||||||
<width>150</width>
|
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
|
||||||
<height>150</height>
|
|
||||||
<texture>$INFO[ListItem.Property(thumb)]</texture>
|
|
||||||
<aspectratio>keep</aspectratio>
|
<aspectratio>keep</aspectratio>
|
||||||
<align>center</align>
|
<align>center</align>
|
||||||
</control>
|
</control>
|
||||||
@@ -97,8 +100,9 @@
|
|||||||
<animation effect="fade" start="100" end="0" time="0">Focus</animation>
|
<animation effect="fade" start="100" end="0" time="0">Focus</animation>
|
||||||
</control>
|
</control>
|
||||||
<control type="image">
|
<control type="image">
|
||||||
|
<top>1</top>
|
||||||
<width>220</width>
|
<width>220</width>
|
||||||
<height>220</height>
|
<height>218</height>
|
||||||
<texture colordiffuse="FF0082C2">Shortcut/button-fo.png</texture>
|
<texture colordiffuse="FF0082C2">Shortcut/button-fo.png</texture>
|
||||||
<animation effect="fade" start="100" end="0" time="0">Unfocus</animation>
|
<animation effect="fade" start="100" end="0" time="0">Unfocus</animation>
|
||||||
</control>
|
</control>
|
||||||
@@ -118,20 +122,19 @@
|
|||||||
<texture colordiffuse="60FFFFFF">Shortcut/black.png</texture>
|
<texture colordiffuse="60FFFFFF">Shortcut/black.png</texture>
|
||||||
</control>
|
</control>
|
||||||
<control type="image">
|
<control type="image">
|
||||||
<left>35</left>
|
<width>220</width>
|
||||||
<top>35</top>
|
<height>220</height>
|
||||||
<width>150</width>
|
<texture>$INFO[ListItem.Property(thumbnail)]</texture>
|
||||||
<height>150</height>
|
|
||||||
<texture>$INFO[ListItem.Property(thumb)]</texture>
|
|
||||||
<aspectratio>keep</aspectratio>
|
<aspectratio>keep</aspectratio>
|
||||||
<align>center</align>
|
<align>center</align>
|
||||||
</control>
|
</control>
|
||||||
<control type="textbox">
|
<control type="textbox">
|
||||||
<left>0</left>
|
<left>0</left>
|
||||||
<top>146</top>
|
<top>160</top>
|
||||||
<width>220</width>
|
<width>220</width>
|
||||||
<height>74</height>
|
<height>74</height>
|
||||||
<font>font12</font>
|
<font>font12</font>
|
||||||
|
<textcolor>FF232323</textcolor>
|
||||||
<label>$INFO[ListItem.Label]</label>
|
<label>$INFO[ListItem.Label]</label>
|
||||||
<align>center</align>
|
<align>center</align>
|
||||||
<aligny>center</aligny>
|
<aligny>center</aligny>
|
||||||
@@ -160,8 +163,6 @@
|
|||||||
<textureslidernibfocus>-</textureslidernibfocus>
|
<textureslidernibfocus>-</textureslidernibfocus>
|
||||||
<showonepage>false</showonepage>
|
<showonepage>false</showonepage>
|
||||||
<orientation>horizontal</orientation>
|
<orientation>horizontal</orientation>
|
||||||
<onleft>32500</onleft>
|
|
||||||
<onright>32500</onright>
|
|
||||||
<ondown>32500</ondown>
|
<ondown>32500</ondown>
|
||||||
<onup>32500</onup>
|
<onup>32500</onup>
|
||||||
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
||||||
|
|||||||
@@ -7,12 +7,10 @@
|
|||||||
</coordinates>
|
</coordinates>
|
||||||
<defaultcontrol always="true">32500</defaultcontrol>
|
<defaultcontrol always="true">32500</defaultcontrol>
|
||||||
<animation type="WindowOpen" reversible="false">
|
<animation type="WindowOpen" reversible="false">
|
||||||
<effect type="slide" start="0,100" end="0,0" center="640,225" delay="160" tween="cubic" time="200" />
|
|
||||||
<effect type="fade" delay="160" end="100" time="220" />
|
<effect type="fade" delay="160" end="100" time="220" />
|
||||||
</animation>
|
</animation>
|
||||||
<animation type="WindowClose" reversible="false">
|
<animation type="WindowClose" reversible="false">
|
||||||
<effect type="slide" start="0,0" end="0,-100" center="640,225" delay="160" tween="cubic" time="200" />
|
<effect type="fade" delay="160" start="100" end="0" time="200" />
|
||||||
<effect type="fade" start="100" end="0" time="200" />
|
|
||||||
</animation>
|
</animation>
|
||||||
<controls>
|
<controls>
|
||||||
<control type="button">
|
<control type="button">
|
||||||
@@ -24,14 +22,22 @@
|
|||||||
<texturenofocus colordiffuse="88232323">Shortcut/white.png</texturenofocus>
|
<texturenofocus colordiffuse="88232323">Shortcut/white.png</texturenofocus>
|
||||||
<onclick>Action(close)</onclick>
|
<onclick>Action(close)</onclick>
|
||||||
</control>
|
</control>
|
||||||
<control type="image">
|
|
||||||
<left>0</left>
|
|
||||||
<top>0</top>
|
|
||||||
<width>880</width>
|
|
||||||
<height>220</height>
|
|
||||||
<texture border="2" colordiffuse="FF232323">Shortcut/white.png</texture>
|
|
||||||
</control>
|
|
||||||
<control type="group">
|
<control type="group">
|
||||||
|
<animation type="WindowOpen" reversible="false">
|
||||||
|
<effect type="slide" start="0,100" end="0,0" center="640,225" delay="160" tween="cubic" time="200" />
|
||||||
|
<effect type="fade" delay="160" end="100" time="220" />
|
||||||
|
</animation>
|
||||||
|
<animation type="WindowClose" reversible="false">
|
||||||
|
<effect type="slide" start="0,0" end="0,-100" center="640,225" delay="160" tween="cubic" time="200" />
|
||||||
|
<effect type="fade" delay="160" start="100" end="0" time="200" />
|
||||||
|
</animation>
|
||||||
|
<control type="image">
|
||||||
|
<left>0</left>
|
||||||
|
<top>0</top>
|
||||||
|
<width>880</width>
|
||||||
|
<height>220</height>
|
||||||
|
<texture border="2" colordiffuse="FF232323">Shortcut/white.png</texture>
|
||||||
|
</control>
|
||||||
<control type="group">
|
<control type="group">
|
||||||
<control type="image">
|
<control type="image">
|
||||||
<left>-21</left>
|
<left>-21</left>
|
||||||
@@ -157,8 +163,6 @@
|
|||||||
<textureslidernibfocus>-</textureslidernibfocus>
|
<textureslidernibfocus>-</textureslidernibfocus>
|
||||||
<showonepage>false</showonepage>
|
<showonepage>false</showonepage>
|
||||||
<orientation>horizontal</orientation>
|
<orientation>horizontal</orientation>
|
||||||
<!-- <onleft>32500</onleft>
|
|
||||||
<onright>32500</onright> -->
|
|
||||||
<ondown>32500</ondown>
|
<ondown>32500</ondown>
|
||||||
<onup>32500</onup>
|
<onup>32500</onup>
|
||||||
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
<animation effect="slide" end="120,0" time="0" condition="!Control.IsVisible(5)">Conditional</animation>
|
||||||
|
|||||||
Reference in New Issue
Block a user