Current control ID (1 Viewer)

Rob Hexenmeister

MP Donator
  • Premium Supporter
  • May 12, 2011
    156
    35
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    I would like to put a label control in my xml to tell me which control currently has focus (for debugging purposes/movement around the screen), but I can't find a skin variable. Is there something like #skin.control.focusedID by any other name?

    Thank you :)
     

    catavolt

    Design Group Manager
  • Team MediaPortal
  • August 13, 2007
    12,913
    9,272
    Lanzarote
    Germany Germany
    Country flag
    Easy. Give it an ID like 12345, then ask for visibility with <visible>control.isvisible(12345)</visible>.
    Asking for focus in case of any button: control.hasfocus(12345).

    via tapatalk
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    156
    35
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    Thank you catavolt :) I think you may have misunderstood. I am trying to report the ID number of whichever control is active and display it in a label.

    Something along the lines of:

    <control>
    <id>1</id>
    <description>whatisactive</description>
    <type>label</type>
    <Xpos>50</Xpos>
    <Ypos>50</Ypos>
    <font>font9</font>
    <value>.....whatever control ID is active elsewhere on the screen....</value>

    etc

    </control>
     

    123vak123

    Portal Pro
    December 13, 2010
    194
    148
    Minsk
    Belarus Belarus
    Country flag
    Perhaps, catavolt, meant to do so.
    1. Set an ID for each item you want to control, eg :
    Code:
        <control>
            <description>Refresh Button</description>
            <type>button</type>
            <id>5</id>
            <label></label>
        </control>
    2. Make a hint for each specific item, eg :
    Code:
        <control>
                <description>Refresh label</description>
                <type>label</type>
                <id>0</id>
                <label>ID = 5</label>
                <visible>control.HasFocus(5)</visible>
        </control>
    3. Tips will need to be done for all controlled items.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    12,101
    6,882
    Kyiv
    Ukraine Ukraine
    Country flag
    I wanted to add such a property, but a group of designers said that it was not needed, but there are such options:
    We have already the property #highlightedbutton ;)
    #highlightedbutton return Label of button,
    You are correct that #highlightedbutton only returns the label but catavolt is correct when he says you can report the current control id to a setting which is what i do in Ares.
    ...
    If you want the ID of a control, make it like this:
    <onfocus>#(skin.setstring('#focusedcontrol',ID_of_That_Control))</onfocus>
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    156
    35
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    That's really clever AJS, so if I am right, what you are doing here is telling each control to set a skin setting called #focusedcontrol to the control ID when it gets focus. My label in the top left hand corner can report the current value of #focusedcontrol.

    I need to put #focusedcontrol somewhere in the defines don't I.

    R.
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    12,101
    6,882
    Kyiv
    Ukraine Ukraine
    Country flag
    This is not currently implemented. and this idea is closed. Those will not be implemented.

    --
    WBR, ajs :):whistle::coffee:
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    156
    35
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    :cry:

    Catavolt's solution seems to be a good idea though using onfocus and a skin setting. If only I knew where to put the define for #focusedcontrol, in skin settings or in the xml I am editing. :(:confused:
     

    ajs

    Development Group
  • Team MediaPortal
  • February 29, 2008
    12,101
    6,882
    Kyiv
    Ukraine Ukraine
    Country flag
    Try simply add onfocus event to button :)

    --
    WBR, ajs :):whistle::coffee:
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    horned_reaper [Music] 5012: Start current music track from the beginning Improvement Suggestions 21
    horned_reaper [solved] 5012: Restart current music track General Support 13
    CyberSimian [solved] MP1-4976 Built-in skin variables for current date MediaPortal 1 8
    N [confirm] Calling RemoveScheduleForProgramAsync does not stop the recording if it is currently in progress MediaPortal 2 1
    henrysinn Remote - W10 Gyro by Pepper Jobs General 8
    G Remote control suggestions? MediaPortal 1 Talk 16
    mrmojo666 [Tv Server Plugin ]Direct Show Video Control Plugin 0.0.0.1 for Hauppauge PVR cards MediaPortal 1 Plugins 0
    T TV Player Controls WMC Skin 0
    emphatic Allow remote control mapping of all plugins Improvement Suggestions 0
    S Problem with Remote Control One-for-all Streamer Newcomers Forum 6
    Rob Hexenmeister Playing with hyperlinkParameter and List Control indexes General Support 2
    mrmojo666 [Plugin]Marantz Control Plugin 0.0.0.2 MediaPortal 1 Plugins 2
    T Can Emprex 3009ARF III MCE Remote Control be used to toggle Fullscreen/Windowed mode?? Remotes 7
    N [Proposal] Make text input using remote control easier MediaPortal 2 4
    N [Proposal] Make text input possible with remote control in SMS style MediaPortal 2 1
    N [Finished] [MP2-789] MCE remote control Recorded TV and My Pictures buttons do not work MediaPortal 2 17
    Rob Hexenmeister [solved] Latests Media Handler - Skinning an updating window or control Fanart Handler 26
    N How to input text with the remote control General 3
    milagroso Remote control with EventGhost - I'm stuck, need help General 3
    C Manual Control doesn't work anymore inside TVServer General Support 4
    HTPCSourcer Harmony Smart Control freezes Input/Output Interfaces 3
    coolblue [solved] Double Volume Control with RC6 IR General 4
    F Blu-Ray Contextual Menu Remote Key/Keyboard Watch / Listen Media 5
    Similar threads























    Top Bottom