Skip to content

Commit

Permalink
PoC image for nav_up and nav_down;
Browse files Browse the repository at this point in the history
Fixed offset;
Fixed hidding right nav_next;
  • Loading branch information
bigretromike committed Sep 5, 2018
1 parent d4c2b0c commit 57e530d
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/windows/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, strXMLname, strFallbackPath, strDefaultName, forceFallback, d
self.day_of_week = {}
self.used_dates = []
self.day_count = 0
self.serie_processed = 0
self.serie_processed = int(item_number)

def onInit(self):
self.calendar_collection = {
Expand Down Expand Up @@ -146,8 +146,9 @@ def onInit(self):
else:
break
busy.close()
if self.serie_processed == _size:
if _count == _size:
self.getControl(2).setVisible(False)
self.getControl(2).setEnable(False)
self.setFocus(self.getControl(901))

def onAction(self, action):
Expand All @@ -160,8 +161,8 @@ def onAction(self, action):
if action == xbmcgui.ACTION_MOVE_LEFT and self.getFocus().getId() != 1:
self.list_update_left()
if action == xbmcgui.ACTION_MOVE_RIGHT and self.getFocus().getId() == 2:
xbmc.executebuiltin('RunScript(script.module.nakamori,?info=calendar&date=0&page='
+ str(self.serie_processed) + ')', True)
xbmc.executebuiltin('RunScript(script.module.nakamori,?info=calendar&date=0&page=%s)'
% self.serie_processed, True)
if action == xbmcgui.ACTION_MOVE_LEFT and self.getFocus().getId() == 1:
xbmc.executebuiltin('Action(Back)')

Expand Down Expand Up @@ -247,6 +248,7 @@ def process_series(self, series):
series_listitem.setInfo('video', {'title': title, 'aired': air_date})
self.calendar_collection[self.day_count].addItem(series_listitem)
self.serie_processed += 1
# xbmc.log('+ %s' % title, xbmc.LOGERROR)
return True

def list_update_right(self):
Expand Down
126 changes: 126 additions & 0 deletions resources/skins/Default/1080i/calendar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@
<control type="group" id="901">
<defaultcontrol>55</defaultcontrol>

<control type="image" id="45">
<description>up-image</description>
<left>10</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(55).HasPrevious</visible>
</control>
<control type="label" id="91">
<left>92</left>
<top>10</top>
Expand Down Expand Up @@ -131,7 +140,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="65">
<description>down-image</description>
<left>10</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(55).HasNext</visible>
</control>

<control type="image" id="46">
<description>up-image</description>
<left>260</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(56).HasPrevious</visible>
</control>
<control type="label" id="93">
<left>342</left>
<top>10</top>
Expand Down Expand Up @@ -226,7 +253,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="66">
<description>down-image</description>
<left>260</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(56).HasNext</visible>
</control>

<control type="image" id="47">
<description>up-image</description>
<left>510</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(57).HasPrevious</visible>
</control>
<control type="label" id="95">
<left>592</left>
<top>10</top>
Expand Down Expand Up @@ -321,7 +366,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="67">
<description>down-image</description>
<left>510</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(57).HasNext</visible>
</control>

<control type="image" id="48">
<description>up-image</description>
<left>770</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(58).HasPrevious</visible>
</control>
<control type="label" id="97">
<left>852</left>
<top>10</top>
Expand Down Expand Up @@ -416,7 +479,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="68">
<description>down-image</description>
<left>770</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(58).HasNext</visible>
</control>

<control type="image" id="49">
<description>up-image</description>
<left>1020</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(59).HasPrevious</visible>
</control>
<control type="label" id="99">
<left>1102</left>
<top>10</top>
Expand Down Expand Up @@ -511,7 +592,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="69">
<description>down-image</description>
<left>1020</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(59).HasNext</visible>
</control>

<control type="image" id="50">
<description>up-image</description>
<left>1270</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(60).HasPrevious</visible>
</control>
<control type="label" id="101">
<left>1352</left>
<top>10</top>
Expand Down Expand Up @@ -606,7 +705,25 @@
</control>
</focusedlayout>
</control>
<control type="image" id="70">
<description>down-image</description>
<left>1270</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(60).HasNext</visible>
</control>

<control type="image" id="51">
<description>up-image</description>
<left>1520</left>
<top>40</top>
<width>250</width>
<height>50</height>
<texture>nav_up.png</texture>
<visible>Container(61).HasPrevious</visible>
</control>
<control type="label" id="103">
<left>1602</left>
<top>10</top>
Expand Down Expand Up @@ -702,6 +819,15 @@
</control>
</focusedlayout>
</control>
<control type="image" id="71">
<description>down-image</description>
<left>1520</left>
<top>40r</top>
<width>250</width>
<height>50</height>
<texture>nav_down.png</texture>
<visible>Container(61).HasNext</visible>
</control>

</control>
</control>
Expand Down
Binary file added resources/skins/Default/media/nav_down.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/skins/Default/media/nav_up.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 57e530d

Please sign in to comment.