Kodi Community Forum
Buttons Displaying But Not Working - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12)
+--- Thread: Buttons Displaying But Not Working (/showthread.php?tid=185589)



Buttons Displaying But Not Working - kabkabaal - 2014-02-07

Hi I'm trying to add navigation buttons (ie home and back) to a slideshow display. I've editted the slidedshow .xml file and added two buttons. When i launch the slideshow the buttons display but they don't respond when i click on them. Any ideas what I'm doing wrong here?Thanks a million!


RE: Buttons Displaying But Not Working - Hitcher - 2014-02-07

Please post the code used. Wink


RE: Buttons Displaying But Not Working - kabkabaal - 2014-02-07

Hey thanks a million the code in the slideshow.xml is is:
Code:
<window>
    <defaultcontrol>2</defaultcontrol>
    <controls>
        <control type="group" id="14">
            <posx>120r</posx>
            <posy>55r</posy>
            
            <control type="button" id="38">
                <description>Back push button</description>
                <posx>0</posx>
                <posy>0</posy>
                <width>30</width>
                <height>30</height>
                <label>1036</label>
                <font>-</font>
                <aligny>-</aligny>
                <onclick>back</onclick>
                <texturefocus border="5">icon_back.png</texturefocus>
                <texturenofocus border="5">icon_back.png</texturenofocus>
                <onleft>50</onleft>
                <onright>50</onright>
                <onup>50</onup>
                <ondown>50</ondown>
            </control>
        
            <control type="button" id="39">
                <description>Home push button</description>
                <posx>55</posx>
                <posy>0</posy>
                <width>30</width>
                <height>30</height>
                <label>31003</label>
                <font>-</font>
                <aligny>-</aligny>
                <onclick>ActivateWindow(home)</onclick>
                <texturefocus border="5">icon_home.png</texturefocus>
                <texturenofocus border="5">icon_home.png</texturenofocus>
                <onleft>50</onleft>
                <onright>50</onright>
                <onup>50</onup>
                <ondown>50</ondown>
            </control>
        
        </control>
        <control type="group" id="13">
            <posx>130r</posx>
            <posy>10</posy>
            <visible>!Skin.HasSetting(Show_SlideShow_Paused)</visible>
            <control type="image">
                <posx>0</posx>
                <posy>0</posy>
                <width>120</width>
                <height>35</height>
                <texture>black-back.png</texture>
                <bordertexture border="3">NoCover_1.png</bordertexture>
                <bordersize>5</bordersize>
            </control>
            <control type="label">
                <description>paused label</description>
                <posx>10</posx>
                <posy>0</posy>
                <width>100</width>
                <height>35</height>
                <align>center</align>
                <aligny>center</aligny>
                <font>font10</font>
                <textcolor>white</textcolor>
                <label>31043</label>
            </control>
        </control>
        
        <!-- media infos -->
        <control type="group">
            <posx>20</posx>
            <posy>180r</posy>
            <visible>Player.ShowInfo + Player.HasMedia</visible>
            <include>VisibleFadeEffect</include>
            <include>SmallMusicInfo</include>
        </control>
    </controls>
    
</window>



RE: Buttons Displaying But Not Working - kristle - 2014-02-07

<onclick>ActivateWindow(home)</onclick>

Try

<onclick>ActivateWindow(Home.xml)</onclick>

Not sure about the back but think you need Back not back.

Also check that your buttons can actually receive focus through appropriate id's and navigation. At the moment you seem to have a default control of id=2 but there is no control with that id. Similarly, your navigation is all to control with id=50 which also doesn't exist. But you may know that Smile


RE: Buttons Displaying But Not Working - kabkabaal - 2014-02-08

Thank you so much for you help but unfortunately i'm still having the same issue. I have set the button id's to 1 and 2 and it seems that the buttons are definitely receiving focus (i changed the nofocus icon so i could the button change icon on focus) but still nothing. I tried changing the onclick function too but this is not changing anything the button is still not working. Also i check the default control id in case i'd changed it but it is unchanged from the original confluence skin Slideshow.xml file value so i don't know if that is making a difference??Any other ideas? Thanks again!


RE: Buttons Displaying But Not Working - ronie - 2014-02-08

i have not tested it, but it is probably just not possible to add buttons to the slideshow window.

if i'm not mistaken, the same applies to the other fullscreen media windows in xbmc (fullscreen video and music visualization)