Additional global properties (1 Viewer)

Rob Hexenmeister

MP Donator
  • Premium Supporter
  • May 12, 2011
    164
    38
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    Following properties would be very useful in my skin design:

    #posX The X position of the currently focused control
    #posY The Y position of the currently focused control
    Including items within listcontrol and thumbnail panel

    Why : the ability to show balloon tips/prompts depending on which control or list item or thumbnail panel item. Currently not possible using control.hasfocus() or #selecteditem or #selectedindex as these don't report the screen position of the active item within a list or panel

    What for : balloon tips next to selected items within a list, selected items within a thumbnail panel, etc or for conditional visibility depending on where the cursor is on the screen

    next idea:
    #inkey The key number of the last pressed key

    Why : Allows controls to behave conditionally based on key press
    What for : pop-up dialogs, conditional jumping etc

    eg:

    <control>
    <id>10</id>
    <description>dummy</description>
    <onfocus>#(skin.setfocus(35,#(switch(
    eq(string.equals(#inkey,'159'),'true'),
    50,
    eq(string.equals(#inkey,'160'),'true'),
    60,
    eq(1,1),
    10))))
    </onfocus>
    ...

    The idea in the example being that when control(10) gets focus it waits until key 159 or key 160 is pressed and jumps to control 50 or 60 accordingly, otherwise it loops back to itself. I am unsure of the logic expression I have used here as it is quite heavily nested, but hopefully it depicts what I am aiming for.

    all the best to you all
    RH
     

    Rob Hexenmeister

    MP Donator
  • Premium Supporter
  • May 12, 2011
    164
    38
    Slaithwaite
    United Kingdom United Kingdom
    Country flag
    Thumbnail, Cover, Facade have this properties: MediaPortal/MediaPortal-1
    Hi AJS,

    I'm not meaning the xpos or ypos relative to the item, I mean the absolute position relative to the screen 0x0, so if you mean thumbPosX/thumbPosY then you may have misunderstood me, unless there's another property I am not aware of.

    It definitely doesn't exist for Listcontrol does it.

    Best
    RH
     

    Users who are viewing this thread

    Similar threads

    Top Bottom