[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

    MP1 MP2 Music Player issues DE
    @hwahrmann maybe can helps
    @hwahrmann maybe can helps
    Version: MediaPortal 1.30 Issue 1: At the end of a playback (when the last item of playlist ends), the player is not properly...
    Replies
    1
    Views
    1K
    So far I needed to limit the media items to respect the token limit of ChatGPT. Now the complete media items can be used, because the movie list is splitted into chunks of a specified size and responses for each chunk are concentrated into the result list :) private async Task<string> GenerateResponseWithGPT(string searchQuery...
    So far I needed to limit the media items to respect the token limit of ChatGPT. Now the complete media items can be used, because...
    Hi, I'm planning to write a plugin for MediaPortal 2, that supports users to find the right media items with help of AI...
    Replies
    6
    Views
    1K
    MP1 MP2 MP2 - V2.5 Trailer plugin DE
    Maybe the wording “plugin” is misleading, because almost every feature in MP2 is basically a plugin. This allows to even exchange core elements easily. Short: Of course it can be also a feature as part of the installer, means integrated for the user.
    Maybe the wording “plugin” is misleading, because almost every feature in MP2 is basically a plugin. This allows to even exchange...
    The question, if MP2 can support trailers came up several times (e.g. here) and was so far always neglected mainly because of the...
    Replies
    14
    Views
    2K
    Works also, removed the "section" entry from MediaPortal.xml ;) (y)
    Works also, removed the "section" entry from MediaPortal.xml ;) (y)
    This plugin is alternate version to the original World Weather plugin developed by @Micropolis. Is compatible with MediaPortal...
    Replies
    33
    Views
    4K
    • Sticky
    I can't believe I missed the new feature, pixel shaders. :) Thankyou guys for all your work (y)
    I can't believe I missed the new feature, pixel shaders. :) Thankyou guys for all your work (y)
    Pre Releases are provided as a way for the community to test and give feedback on all the exciting things we have lined up for the...
    Replies
    1
    Views
    903
    Top Bottom