Conditional <ondown>?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #1
Is it possible to do this within the same container?

<ondown condition="container.content(TVShows)>DOTHIS</ondown>
<ondown condition="container.content(Movies)>DOTHIS</ondown>
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 175
Post: #2
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.)

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #3
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.
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #4
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...

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
`Black Offline
Team-XBMC Member
Posts: 2,386
Joined: Apr 2009
Reputation: 66
Location: Germany
Post: #5
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>

[Image: xp1080-21.png]
find quote
filigran Offline
Senior Member
Posts: 192
Joined: Oct 2009
Reputation: 0
Post: #6
Glad to see I'm not alone! Smile
http://trac.xbmc.org/ticket/10423
find quote
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #7
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
find quote
pieh Offline
Team-XBMC Member
Posts: 672
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #8
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

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
find quote
igotdvds Offline
Skilled Skinner
Posts: 1,616
Joined: Jul 2009
Reputation: 11
Post: #9
pieh Wrote:from next nigthly build it's possible Smile
https://github.com/xbmc/xbmc/commit/5594...3626742137

thank you!!!!!!!!!!!!!!!
find quote
ronie Offline
Team-XBMC Member
Posts: 9,093
Joined: Jan 2009
Reputation: 157
Post: #10
thanx pieh, major improvement!

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not PM or e-mail Team-XBMC members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
find quote
BigNoid Offline
Team-XBMC Member
Posts: 3,084
Joined: Jul 2010
Reputation: 99
Location: Below sea level
Post: #11
Thx, works flawless. Now I can really clean up my code.
find quote
Hitcher Offline
Skilled Skinner
Posts: 10,624
Joined: Aug 2007
Reputation: 91
Location: Eastleigh, UK
Post: #12
Thanks.
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #13
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 ?
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,181
Joined: Oct 2003
Reputation: 175
Post: #14
Controls in a vertical grouplist inherit the <onleft>/<onright> stuff from the parent. In this case, likely they don't inherit everything?

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote