Please help, calling all MP skinners, allowhiddenfocus

Discussion in 'MediaPortal 1 Skins' started by VdR, November 10, 2008.

  1. VdR
    • Premium Supporter

    VdR MP Donator

    Joined:
    October 17, 2006
    Messages:
    612
    Likes Received:
    16
    Gender:
    Male
    Location:
    Belgium
    Ratings:
    +16 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Calling all MP skinners.

    Some-one must have used (or try to use) this before. Please help me.

    Thx.

    This message relates to: How to - hide a sort button when not focussed

    I want to hide part of menu stack and show it only if it becomes focussed. I'm trying to do that by splitting the menu into two groups, one of which is hidden unless focussed. Splitting the menu in two groups works fine and to hide one group unless focussed I found the text below in the wiki:

    One thing you will notice, is that when a control is hidden, it can't be focused. This means you can't move to a control and have it automatically become visible (eg even if it had Control.HasFocus(myID) it wouldn't come back on, as MP wouldn't allow navigation to the hidden control). To solve this issue, you can use:

    <visible allowhiddenfocus="true">Control.HasFocus(21)</visible>



    on a control of <id> 21. This will allow the control to be focusable even when it's hidden. When the user moves to the hidden control, it will automatically unhide itself, due to the Control.HasFocus(21) visibility condition.


    That is excactly what I need.

    But is does't work, the group is hidden but I can't navigate there, it cannot be focussed, it doesn't become visible.

    If I change the Control.HasFocus id to the id of a control that is already visible and I navigate there then the hidden control becomes visible, so that part is working. I have tried it for one control instead of a group and have the same problem.

    Does this 'allowhiddenfocus' function work?

    VdR
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    Personally I have tried for days and weeks to get allowhiddenfocus to work, but I think it's broken. So much in the Wiki is incorrect or outdated that I stopped using it...
     
  4. VdR
    • Premium Supporter

    VdR MP Donator

    Joined:
    October 17, 2006
    Messages:
    612
    Likes Received:
    16
    Gender:
    Male
    Location:
    Belgium
    Ratings:
    +16 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    Thank you for the reply. That at least confirms that there is no point for me to keep trying.

    Indeed quite a few things in the skin functionality seem to be broken, which is a pity.

    VdR
     
  5. VdR
    • Premium Supporter

    VdR MP Donator

    Joined:
    October 17, 2006
    Messages:
    612
    Likes Received:
    16
    Gender:
    Male
    Location:
    Belgium
    Ratings:
    +16 / 0
    Home Country:
    Netherlands Netherlands
    Show System Specs
    I found a work around

    It's a bit elaborate, but I found a work around. :D

    I defined a 'dummy' button for all buttons in the menu stack that I want to hide unless you actually navigate there. The dummy button is visible only if one of the other hidden buttons has focus. That way all hidden buttons show together.

    Screen one shows the menu with the bottom three buttons hidden. Screen2 shows the hidden buttons showing up together if one is selected.

    The dummy button has to be defined before the real button, else the real button again doesn't gain focus. The dummy button gets id 0, this does however mean that f.i. a sort button does not always show the current sorting if not focused (very minor issue).

    Part of the xml file:

    <!--VdR: defined dummy buttons to show all hidden buttons together, can't use visibilty control to hide buttons because then they never get focus, allow.hiddenfocus function does not work-->
    <control>
    <type>button</type>
    <description>DUMMY Switch view</description>
    <id>0</id>
    <label>457</label>
    <posY>399</posY>
    <visible>control.hasfocus(3)|control.hasfocus(2) </visible>
    </control>
    <control>
    <type>button</type>
    <description>Switch view</description>
    <id>6</id>
    <label>457</label>
    <posY>399</posY>
    <!--VdR: hide when not selected-->
    <textureNoFocus>-</textureNoFocus>
    <textcolorNoFocus>00ffffff</textcolorNoFocus>
    <onleft>6</onleft>
    <onright>50</onright>
    <onup>12</onup>
    <ondown>3</ondown>
    </control>
    <control>
    <type>sortbutton</type>
    <description>DUMMY Sort</description>
    <id>0</id>
    <label>103</label>
    <posY>444</posY>
    <textureDescending>-</textureDescending>
    <textureAscending>-</textureAscending>
    <visible>control.hasfocus(6)|control.hasfocus(2) </visible>
    </control>
    <control>
    <type>sortbutton</type>
    <description>Sort</description>
    <id>3</id>
    <label>103</label>
    <!--VdR: added position-->
    <posY>444</posY>
    <!--VdR: hide when not selected-->
    <textureNoFocus>-</textureNoFocus>
    <textcolorNoFocus>00ffffff</textcolorNoFocus>
    <textureDescending>-</textureDescending>
    <textureAscending>-</textureAscending>
    <onleft>3</onleft>
    <onright>50</onright>
    <onup>6</onup>
    <ondown>2</ondown>
    </control>
    <control>
    <type>button</type>
    <description>DUMMY layout</description>
    <id>0</id>
    <label>100</label>
    <posY>489</posY>
    <visible>control.hasfocus(3)|control.hasfocus(6) </visible>
    </control>
    <control>
    <type>button</type>
    <description>layout</description>
    <id>2</id>
    <label>100</label>
    <!--VdR: added position-->
    <posY>489</posY>
    <!--VdR: hide when not selected-->
    <textureNoFocus>-</textureNoFocus>
    <textcolorNoFocus>00ffffff</textcolorNoFocus>
    <onleft>2</onleft>
    <onright>50</onright>
    <onup>3</onup>
    <ondown>2</ondown>
    </control>
     

    Attached Files:

    • screen1.jpg
      screen1.jpg
      File size:
      74.4 KB
      Uploaded:
      November 24, 2008
      Views:
      116
    • screen2.jpg
      screen2.jpg
      File size:
      77.7 KB
      Uploaded:
      November 24, 2008
      Views:
      94
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!