<onup> conditionals?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ekim232 Offline
Posting Freak
Posts: 1,204
Joined: Nov 2008
Reputation: 5
Location: Chicago, IL
Post: #11
Ir really appreciate your help with this a lot. I got the code in place, but my problem comes now with this grey box that appears. It seems to be the button. You can see it just above the video window. Any suggestions on how to have that not show?

[Image: screenshot000mpg.jpg]
find quote
andyblac Offline
Posting Freak
Posts: 768
Joined: Feb 2009
Reputation: 0
Post: #12
ekim232 Wrote:Ir really appreciate your help with this a lot. I got the code in place, but my problem comes now with this grey box that appears. It seems to be the button. You can see it just above the video window. Any suggestions on how to have that not show?

[Image: screenshot000mpg.jpg]

button's don't have an image unless you tell it to have, i would look through your code. (i would start by doing a search for the image file name your using for your borders) based on your screen grab it should be around POSX = 300 POSY = 200

hope that helps.
find quote
filigran Offline
Senior Member
Posts: 187
Joined: Oct 2009
Reputation: 0
Post: #13
Was there any progress on this? Is it hard to add a condition to the on-events, just like the includes have, or just not a good solution? I posted a trac ticket but so far, no response. Smile

Any reason not to add this feature, except for the fact that there are lots of things to fix/add, now with dharma and all?
find quote
ekim232 Offline
Posting Freak
Posts: 1,204
Joined: Nov 2008
Reputation: 5
Location: Chicago, IL
Post: #14
I do not know of any progess on it. To solve issues you like this you can create multiple buttons with the same id except each one will have different visible conditions.

Then use <onfocus> with a setfocus(?) to control what it does.
find quote
filigran Offline
Senior Member
Posts: 187
Joined: Oct 2009
Reputation: 0
Post: #15
Yeah, I've used this approach, but IMO it's a tedious process, that could easily be solved with a few conditions.

Say I have a view, with posters in a list in the middle and plot/info at the bottom. I also have a menu at the top (id 900). The posters (id 50) have a scrollbar beneath to scroll through them (id 60), and the plot has one (id 600). Easy. <ondown>60</ondown> <onup>900</onup> in the poster list, then <ondown>600</ondown> <onup>50</onup> on the poster scrollbar, then <onleft>60</onleft><onright>60</onright> on the plot scrollbar.

Basically, this:
Code:
---TOP MENU (900)--- (no onup*, ondown* 50)
---POSTERS (50)--- (onup* 900, ondown* 60)
---SCROLLBAR (60)--- (onup* 50, ondown* 600)
---PLOT-PLOT SCROLLBAR (600)--- (onleft*/onright* 60)

Now, I have this setting to swap them, so that the posters are at the bottom, and the plot/info above it, which alters the events:

Code:
---TOP MENU (900)--- (no onup*, ondown* 600) *
---PLOT-PLOT SCROLLBAR (600)--- (onleft* 900, onright* 50)
---POSTERS (50)--- (onup* 600, ondown* 60)
---SCROLLBAR (60)--- (onup* 50, ondown* 900)

To get the navigation to make sense id 900 shouldn't go down to 50 anymore, it should go to 600.
The posters should go down to 60 either way, nothing to do there.
Scrollbar 60 should go down to 600 too, if posters are centered, 900 otherwise.
Then, the plot scrollbar 600 should go right to 60 if posters centered, and to 50 if bottom aligned.
That would equal four buttons with my logic:
PHP Code:
<control type="group" id="901">
    <
description>ondown/onright conditions</description>
    <
control type="button">
        <
description>Posters centered and down press from 900 OR posters bottom aligned and right press from 600</description>
        <
visible>[Control.HasFocus(900) + !Skin.HasSetting(Posters_Bottom)] | [Control.HasFocus(600) + Skin.HasSetting(Posters_Bottom)]</visible>
        <
onfocus>SetFocus(50)</onfocus>
    </
control>
    <
control type="button">
        <
description>Posters centered and right press from 600</description>
        <
visible>Control.HasFocus(600) + !Skin.HasSetting(Posters_Bottom)</visible>
        <
onfocus>SetFocus(60)</onfocus>
    </
control>
    <
control type="button">
        <
description>Posters bottom aligned and down press from 900 or posters center aligned and down press from 60</description>
        <
visible>[Control.HasFocus(900) + Skin.HasSetting(Posters_Bottom)] | [Control.HasFocus(60) + !Skin.HasSetting(Posters_Bottom)]</visible>
        <
onfocus>SetFocus(600)</onfocus>
    </
control>
    <
control type="button">
        <
description>Posters bottom aligned and down press from 60</description>
        <
visible>Control.HasFocus(60) + Skin.HasSetting(Posters_Bottom)</visible>
        <
onfocus>SetFocus(900)</onfocus>
    </
control>
</
control

But, I haven't even started with the onup/onleft conditions yet. This means, more buttons (only three though!):
PHP Code:
<control type="group" id="902">
    <
description>onup/onleft conditions</description>
    <
control type="button">
        <
description>Posters centered and up press from 50 OR posters bottom aligned and left press from 600</description>
        <
visible>[Control.HasFocus(50) + !Skin.HasSetting(Posters_Bottom)] | [Control.HasFocus(600) + Skin.HasSetting(Posters_Bottom)]</visible>
        <
onfocus>SetFocus(900)</onfocus>
    </
control>
    <
control type="button">
        <
description>Posters centered and left press from 600</description>
        <
visible>Control.HasFocus(600) + !Skin.HasSetting(Posters_Bottom)</visible>
        <
onfocus>SetFocus(60)</onfocus>
    </
control>
    <
control type="button">
        <
description>Posters bottom aligned and up press from 50</description>
        <
visible>Control.HasFocus(50) + Skin.HasSetting(Posters_Bottom)</visible>
        <
onfocus>SetFocus(600)</onfocus>
    </
control>
</
control

So, as far as I can tell, that would be seven buttons, just for a swap between bottom and center aligned posters.
Instead of just having this:
PHP Code:
<control type="scrollbar" id="60">
    ...
    <
onup>50</onup>
    <
ondown condition="!Skin.HasSetting(Posters_Bottom)">600</ondown>
    <
ondown condition="Skin.HasSetting(Posters_Bottom)">900</ondown>
    ...
</
control>
<
control type="list" id="50">
   ...
    <
ondown>60</ondown>
    <
onup condition="!Skin.HasSetting(Posters_Bottom)">900</onup>
    <
onup condition="Skin.HasSetting(Posters_Bottom)">600</onup>
    ...
</
control

Alot easier if you ask me!
If only my C++ skills werent so limited. Sad
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,263
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #16
I would just like to point at that yes it might be a good idea and yes it might be simple from a skinner point of view but coding it into the skinning engine is probably a big deal and time that is better spent on other things when there is already a way to achieve it even if it is much harder

But I agree it would be very nice feature

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
filigran Offline
Senior Member
Posts: 187
Joined: Oct 2009
Reputation: 0
Post: #17
Jezz_X Wrote:I would just like to point at that yes it might be a good idea and yes it might be simple from a skinner point of view but coding it into the skinning engine is probably a big deal and time that is better spent on other things when there is already a way to achieve it even if it is much harder

But I agree it would be very nice feature

Yeah, I am aware of that. Like I said in my first post:
Quote:Any reason not to add this feature, except for the fact that there are lots of things to fix/add, now with dharma and all?

So, I'm guessing the answer to that question is "no, there's no reason other than the fact that it takes time from other important things". Smile

Glad to hear I'm not the only one wanting this feature. Smile

I can just hope that someone with the right C++ skills will create a patch, and it'll get added to the source code. Too bad I don't have the know-how. Sad
find quote
Post Reply