Kodi Community Forum
Conditional <ondown>? - 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: Conditional <ondown>? (/showthread.php?tid=94052)



Conditional <ondown>? - igotdvds - 2011-02-13

Is it possible to do this within the same container?

<ondown condition="container.content(TVShows)>DOTHIS</ondown>
<ondown condition="container.content(Movies)>DOTHIS</ondown>


- jmarshall - 2011-02-13

Nope. The trick is usually to make the thing you're moving down to conditional (eg within a group, or with an item invisible etc.)


- igotdvds - 2011-02-13

Well I was activating a window. I use the same View for TV and Movies but when in Movies I want to open window ID 1112 ondown and in TV Shows, I want to open window ID 1116 ondown. Oh well.


- mcborzu - 2011-02-13

I do this both in Night and "The Carmicael':

<ondown>2448</ondown>

Which reference's different a <group>

One group has a <visible>Movies</visible>* and the other has <visible>!Movies</visible>*

bear in mind my shorthand, you know what I mean...


- `Black - 2011-02-13

igotdvds Wrote:Well I was activating a window. I use the same View for TV and Movies but when in Movies I want to open window ID 1112 ondown and in TV Shows, I want to open window ID 1116 ondown. Oh well.

You could do this (like mcborzu said):

Code:
<control type="button" id="someid">
   <onfocus>dosth</onfocus>
   <onfocus>setFocus(yourcontainer)</onfocus>
   <visible>Container.Content(movies)</visible>
</control>

<control type="button" id="someid">
   <onfocus>dosth</onfocus>
   <onfocus>setFocus(yourcontainer)</onfocus>
   <visible>Container.Content(tvshows)</visible>
</control>

And then in your container:

Code:
<ondown>someid</ondown>



- filigran - 2011-02-17

Glad to see I'm not alone! Smile
http://trac.xbmc.org/ticket/10423


- igotdvds - 2011-02-17

filigran Wrote:Glad to see I'm not alone! Smile
http://trac.xbmc.org/ticket/10423

I hope it becomes more simple. Here's to hoping. Smile


- pieh - 2011-08-18

igotdvds Wrote:Is it possible to do this within the same container?

<ondown condition="container.content(TVShows)>DOTHIS</ondown>
<ondown condition="container.content(Movies)>DOTHIS</ondown>
from next nigthly build it's possible Smile
https://github.com/xbmc/xbmc/commit/55941ded3b0d68c45fd006d98075a93626742137


- igotdvds - 2011-08-18

pieh Wrote:from next nigthly build it's possible Smile
https://github.com/xbmc/xbmc/commit/55941ded3b0d68c45fd006d98075a93626742137

thank you!!!!!!!!!!!!!!!


- ronie - 2011-08-18

thanx pieh, major improvement!


- BigNoid - 2011-08-19

Thx, works flawless. Now I can really clean up my code.


- Hitcher - 2011-08-19

Thanks.


RE: Conditional <ondown>? - Jezz_X - 2012-03-18

Bit of a bump here but I can't seem to get this to work in grouplists is there some sort of issue here that prevents it from working proper with them ?


RE: Conditional <ondown>? - jmarshall - 2012-03-18

Controls in a vertical grouplist inherit the <onleft>/<onright> stuff from the parent. In this case, likely they don't inherit everything?