2019-06-23, 01:25
I'm trying to create a window that is displayed when Kodi is loading addons. This will prevent my wife from clicking on things when Kodi is initializing. The window has slide show of fanart that is displayed while Kodi is loading, and is supposed to display button "Press OK to Continue" message when addons are loaded. The code I have does not work as it displays the the "Press OK to COntinue" button before the addons are completed loading. I referred to code in home.xml for displaying the addons section in the skin.
Here is my code for my "Press Ok to continue" button. Again, this is in a different window. I am calling only of the
I'm using code from the home.xml which determines when addons will be visible
Here is my code for my "Press Ok to continue" button. Again, this is in a different window. I am calling only of the
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="1281">
<onload>SetFocus(108)</onload>
<defaultcontrol always="true">108</defaultcontrol>
<previouswindow>ActivateWindow(1281)</previouswindow>
<controls>
<include>Setupbackground</include>
<control type="multiimage" id="102">
<left>0</left>
<top>0</top>
<width>100%</width>
<height>100%</height>
<imagepath>http:///fanart/</imagepath>
<timeperimage>4000</timeperimage>
<randomize>false</randomize>
<fadetime>0</fadetime>
</control>
<control type="button" id="108">
<visible> Integer.IsGreater(Container(8400).NumItems,0) </visible>
<animation effect="slide" start="10" end="0" >WindowOpen</animation>
<include>OpenClose_Right</include>
<description>Next button</description>
<font>font37</font>
<align>center</align>
<posy>950</posy>
<posx>0</posx>
<width>1920</width>
<height>90</height>
<texturefocus colordiffuse="DA8C46B9">colors/white.png</texturefocus>
<texturenofocus colordiffuse="DA8C46B9">colors/white.png</texturenofocus>
<focusedcolor>white</focusedcolor>
<textcolor>white</textcolor>
<onup>108</onup>
<ondown>108</ondown>
<onleft>108</onleft>
<onright>108</onright>
<label>Press OK to continue.</label>
<onclick>ActivateWindow(home)</onclick>
</control>
<control type="button" >
<animation effect="slide" start="0,0" end="4000,4000" time="0" reversible="false" condition="Control.IsVisible(108)">Conditional</animation>
<include>OpenClose_Right</include>
<description>Next button</description>
<font>font37</font>
<align>center</align>
<posy>950</posy>
<posx>0</posx>
<width>1920</width>
<height>90</height>
<texturefocus colordiffuse="DA8C46B9">colors/white.png</texturefocus>
<texturenofocus colordiffuse="DA8C46B9">colors/white.png</texturenofocus>
<focusedcolor>white</focusedcolor>
<textcolor>white</textcolor>
<label>Loading Content...Please Wait.</label>
</control>
<control type="image">
<animation effect="slide" start="0,0" end="4000,4000" time="10" reversible="false" condition="Control.IsVisible(108)">Conditional</animation>
<description>Busy animation</description>
<top>965</top>
<posx>30%</posx>
<width>60</width>
<height>60</height>
<texture colordiffuse="button_focus">spinner.png</texture>
<aspectratio>keep</aspectratio>
<animation effect="rotate" start="360" end="0" center="auto" time="3000" loop="true" condition="true">conditional</animation>
</control>
</controls>
</window>
I'm using code from the home.xml which determines when addons will be visible
:<control type="group" id="8000">
<visible>String.IsEqual(Container(9000).ListItem.Property(id),addons)</visible>
<include content="Visible_Right_Delayed">
<param name="id" value="addons"/>
</include>
<control type="grouplist" id="8001">
<include>imagefade</include>
<control type="label">
<top>230</top>
<left>50</left>
</control>
<ondown>ActivateWindow(1270)</ondown>
<include>WidgetGroupListCommon</include>
<include>spacehor1_Apps</include>
<include content="WidgetListCategories">
<param name="widget_header" value="$LOCALIZE[31148]"/>
<param name="list_id" value="8900"/>
<param name="visible" value="Integer.IsGreater(Container(8100).NumItems,0) | Integer.IsGreater(Container(8200).NumItems,0) | Integer.IsGreater(Container(8300).NumItems,0) | Integer.IsGreater(Container(8400).NumItems,0) | Integer.IsGreater(Container(8500).NumItems,0)"/>
<param name="addon_submenu" value="true"/>
</include>
<include content="WidgetListSquare" condition="System.Platform.Android">
<param name="content_path" value="androidapp://sources/apps/"/>
<param name="widget_header" value="$LOCALIZE[20244]"/>
<param name="widget_target" value="programs"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
<param name="list_id" value="8400"/>
<param name="fallback_icon" value="DefaultAddon.png"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="addons://sources/video/"/>
<param name="widget_header" value="$LOCALIZE[1037]"/>
<param name="widget_target" value="videos"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
<param name="list_id" value="8100"/>
<param name="fallback_icon" value="DefaultAddon.png"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="addons://sources/audio/"/>
<param name="widget_header" value="$LOCALIZE[1038]"/>
<param name="widget_target" value="music"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
<param name="list_id" value="8200"/>
<param name="fallback_icon" value="DefaultAddon.png"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="addons://sources/executable/"/>
<param name="widget_header" value="$LOCALIZE[1043]"/>
<param name="widget_target" value="programs"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
<param name="list_id" value="8300"/>
<param name="fallback_icon" value="DefaultAddon.png"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="addons://sources/image/"/>
<param name="widget_header" value="$LOCALIZE[1039]"/>
<param name="widget_target" value="pictures"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
<param name="list_id" value="8500"/>
</include>
</control>
<include content="ImageWidget">
<param name="image_path" value="special://skin/extras/home-images/add-ons.jpg"/>
<param name="text_label" value="$LOCALIZE[31119]" />
<param name="button_label" value="$LOCALIZE[31118]" />
<param name="button_onclick" value="ActivateWindow(addonbrowser)"/>
<param name="button_id" value="8600"/>
<param name="visible" value="!Integer.IsGreater(Container(8001).NumItems,0)"/>
<param name="button2_onclick" value="Skin.SetBool(HomeMenuNoProgramsButton)"/>
</include>
</control>