[Approved] Add GUI Property #selectedindex (1 Viewer)

Migue

Retired Team Member
  • Premium Supporter
  • January 27, 2006
    381
    305
    Florida
    This patch adds the #selectedindex property which returns the index of the currently selected item for skin creators to use if they wish. Note that if the selected item is "..", then an empty string is returned.
     

    Attachments

    • amped 21 itemindex.JPG
      amped 21 itemindex.JPG
      83.7 KB
    • Add GUI Property #selctedindex (using SVN23209).patch
      30.8 KB

    Dadeo

    Docs Group Manager
  • Premium Supporter
  • November 26, 2006
    5,340
    3,321
    Himalayas, India
    Home Country
    Canada Canada
    I have tested this patch pretty thoroughly in MP 1.0.2 using the updated Core.dll you sent me. It works perfectly, and I simply added the #selectedindex to my #itemcount so it is displayed only where #itemcount is supported (which unfortunately is not in all plugins).

    I find it VERY useful in long lists, much more precise than spincontrols!

    Here is the code I used in common.window
    Code:
            <control>
                <description>Number of Files Label</description>
                <type>fadelabel</type>
                <id>0</id>
                <posX>30</posX>
                <posY>505</posY>
                <width>220</width>
    	 <label>#selectedindex/#itemcount</label>
                <textcolor>ffa9d0f7</textcolor>
                <visible>skin.string(#selectedindex)+skin.string(#itemcount)</visible>
                <animation effect="fade" time="250">WindowOpen</animation>
                <animation effect="fade" time="250">WindowClose</animation>
            </control>

    NOTE: skin.string has changed to string.equals in MP 1.1.0 Alpha and latest SVN.

    and here's how it looks.
     

    Attachments

    • VIdeo Titles Selected Index.jpg
      VIdeo Titles Selected Index.jpg
      65.7 KB

    Users who are viewing this thread

    Similar threads

    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I don't have a fundamentally different solution for you, but with this approach you should achieve your goal. ;) The idea of first setting the current genre colors with the defines is certainly a good one, as...
    Well, I had already recognized your problem, but I still wanted to point out the basic connections once again. Unfortunately, I...
    Good afternoon, Does anyone know a way of referencing the genre colour of the currently selected item in the TV Guide. We are all...
    Replies
    4
    Views
    1K
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    Attached are new TV service logs with your latest DLL. I see lots of EPG events and none of the messages from earlier. Congratulations!
    I have some weird behavior trying to operate the MP GUI in a new installation of MP 1.36 under Windows 11 Pro. Some of the remote...
    Replies
    33
    Views
    6K
    MP 1.37 Final (Willow) Bugfix II released, download links updated...
    MP 1.37 Final (Willow) Bugfix II released, download links updated...
    We have just released MediaPortal 1.37 - Willow x86 and x64 version. Highlights of this release Bugfixes: [MP1-5232] - GPU...
    Replies
    4
    Views
    2K
    Thanks guys. Ok, spent the (whole) weekend on this lol. First; TVHeadend/Kodi.... Nah. Given up on that - 'non-tech'; its horrible. 'Tech' - a few reasons but mostly that it is buggy. It is actually a real shame as it does have potential and promises a lot (was great to have Kodi on my phone and be able to watch live/recordings...
    Thanks guys. Ok, spent the (whole) weekend on this lol. First; TVHeadend/Kodi.... Nah. Given up on that - 'non-tech'; its...
    So, a very long-time MP fan here. Family have used MP (Only MP1 as all addicted to Titan skin) for ever - for my 13yo, thats 100%...
    Replies
    5
    Views
    4K
    Hi CyberSimian (and others) just a bit along the coast from me (near Exeter) - I know you are very long-standing! Not going to make this long winded or anything, but just to point out over the @15 years I've overall donated several hundred quid. And I begrduge NONE of it, not a penny - I do wish MP well - 100%. It is an awesome...
    Hi CyberSimian (and others) just a bit along the coast from me (near Exeter) - I know you are very long-standing! Not going to...
    ONGGGG term MP user (and donator - why wouldn't you?) and leaving somewhat reluctantly. Few reasons, some that just seem...
    Replies
    4
    Views
    3K
    Top Bottom