Kodi Community Forum

Full Version: Conditional <ondown>?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to do this within the same container?

<ondown condition="container.content(TVShows)>DOTHIS</ondown>
<ondown condition="container.content(Movies)>DOTHIS</ondown>
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.)
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.
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...
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>
Glad to see I'm not alone! Smile
http://trac.xbmc.org/ticket/10423
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
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/5594...3626742137
pieh Wrote:from next nigthly build it's possible Smile
https://github.com/xbmc/xbmc/commit/5594...3626742137

thank you!!!!!!!!!!!!!!!
thanx pieh, major improvement!
Thx, works flawless. Now I can really clean up my code.
Thanks.
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 ?
Controls in a vertical grouplist inherit the <onleft>/<onright> stuff from the parent. In this case, likely they don't inherit everything?