Position and navigation questions (1 Viewer)

Lehmden

Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    I'm working on a huge modification of PureVision Skin atm. And I need some help as I'm not an experienced skinner.

    First Question... I can use posx and posy tags to define the top left corner of an element relative to top left corner of the window. But sometimes it is much more useful to define other edges of the element. In this case I have submenus that all need to have the lower edges to be at the same height but have different heights. As for now I use different posy tags to compensate this. It would be much easier if I can define the position of bottom left (or right, no matter) corner so all elements could have the same tag here... Add or remove a button leads to also change those posy tags now, but it would be really nice if this is not necessary... Is this possible?

    Second question... Can I have something like "conditional navigation"? We have onup, ondown,... tags to navigate inside a menu. Sometimes this could be very useful if we can navigate a specific direction only if... e.G. a specific control is visible. Something like that:
    Code:
    <onleft condition="control.isvisible(1234)">1234</onleft>
    <onleft condition="!control.isvisible(1234)">5678</onleft>
    I haven't found such in Wiki so maybe this isn't possible. But maybe someone knows how to solve this. In special I want to show latestmediahander Items only if player don't have media. And if Player has media it should not be possible to navigate to those items, as they are hidden...

    To see what I'm talking about here's a screenshot from the BasicHome:
    screen-2_1-jpg.118517

    You can see, all submenus need to have the same lower position but as the number of buttons vary on each submenu they all have different posy tags needed...

    So many thanks in advance...

    p.s. if you think you know this design, you're right.;)
     

    Zoidberg77

    MP Donator
  • Premium Supporter
  • July 12, 2011
    392
    206
    Home Country
    Germany Germany
    Hi Lehmden,
    I think I figured out the conditional navigation issue:

    1. You will have to define a boolean variable
      1. Option 1: in SkinSetting.xml (this is nice, as it can be set from inside MP GUI):
        Code:
        <?xml version="1.0" encoding="utf-8"?>
        <profile>
        <section name="booleansettings">
          <entry name="#tester">True</entry>
        </section>
        </profile>
      2. Option 2: as <define> variable in your xml sheet; but promoted to property:
        Code:
        <define property="true">#tester:True</define>
    2. Do some math in your xml sheet:
      Code:
      <define evaluateNow="true">#togo:#(iif(#tester, 10001, 10002))</define>
    3. Use your evaluated variable in your direction command:
      Code:
      <onup>#togo</onup>
    4. In this example it would be <onup>10001</onup> if #tester=True or <onup>10002</onup> if #tester=False
    Hope this is right, it's a lot of trial and error for me :cautious:
     

    Lehmden

    Retired Team Member
  • Premium Supporter
  • December 17, 2010
    12,554
    3,936
    Lehmden
    Home Country
    Germany Germany
    Hi.
    Yea, thanks. I was thinking in the same direction. Will try it next days. Maybe I can have my conditional navigation as I want it...
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    For your conditional visibility Navigation: MP will skip over hidden controls (unless they are hidden with allowhiddenfocus or something). So if you have the following
    Ctrl 1 - onleft 2 (visible)
    Ctrl 2 - onleft 3 (hidden)
    Ctr 3 - onleft 4 (visible)

    pressing left on ctrl 1 will bring you to ctrl 3 if 2 is hidden, to 2 if it is visible. For the positioning things, look at the Group & layout stuff.
     

    Users who are viewing this thread

    Top Bottom