[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
    2K
    Thankyou High_Five, that worked perfectly, I now remember doing that 10 years ago, thanks for jogging my old memory. Cheers Tony
    Thankyou High_Five, that worked perfectly, I now remember doing that 10 years ago, thanks for jogging my old memory. Cheers Tony
    Hi everyone, I have been using it For 16 years now (from V1.1.1) and it has worked flawlessly. I only use TV Series and Moving...
    Replies
    2
    Views
    500
    maybe setting loglevel to debug might pinpoint the difference between normal and stuck? Preferable with as much disabled as possible also try to see if anything is happening during stuck for the mediaportal process(resource monitor, disk activity, cpu usage, anything) maybe other programs competing for resouces?
    maybe setting loglevel to debug might pinpoint the difference between normal and stuck? Preferable with as much disabled as...
    Since over a year my MP sometimes stucks while showing the welcome screen. It started once a week now it happens every second time...
    Replies
    4
    Views
    2K
    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
    10K
    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
    3K
    Top Bottom