selectedColor not in effect

Discussion in '1.1.x and SVN Builds' started by pilehave, November 1, 2010.

  1. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    MediaPortal Version: 1.1.0 final
    MediaPortal Skin: Maya
    Windows Version: Windows 7 x64
    CPU Type: AMD Athlon II x2 240e 2.8 GHz 45w TDP
    HDD: OCZ Agility SSD 30 GB
    Memory: 4 GB DDR2 800 MHz Dual-Channel
    Motherboard: Gigabyte GA-MA78GM-S2H (rev 1.0)
    Video Card: Onboard AMD Radeon HD 3200
    Video Card Driver: Catalyst 10.3
    Sound Card: Onboard ALC889A
    Sound Card AC3: optical out
    Sound Card Driver:
    1. TV Card: Terratec Cinergy 2400i DT PCI
    1. TV Card Type: DVB-T
    1. TV Card Driver:
    2. TV Card:
    2. TV Card Type:
    2. TV Card Driver:
    3. TV Card:
    3. TV Card Type:
    3. TV Card Driver:
    4. TV Card:
    4. TV Card Type:
    4. TV Card Driver:
    MPEG2 Video Codec: PowerDVD9
    MPEG2 Audio Codec:
    h.264 Video Codec: DivX HD
    Satelite/CableTV Provider:
    HTPC Case:
    Cooling:
    Power Supply: picuPSU 120W
    Remote: Logitech 885
    TV: LG 42PM1MA
    TV - HTPC Connection: HDMI

    According to MediaPortal1_Development/SkinArchitecture/listcontrol - MediaPortal Manual Documentation

    Code (Text):
    1. <selectedColor>red</selectedColor>
    should enable you to change the colour of the selected item in a list.



    Editing references.xml with the following attributes does, however, not work properly:

    <selectedColor>red</selectedColor>
    <playedColor>yellow</playedColor>
    <textcolor>blue</textcolor>
    <textcolor2>pink</textcolor2>
    <textcolor3>black</textcolor3>
    <colordiffuse>maroon</colordiffuse>
    <remoteColor>amber</remoteColor>
    <downloadColor>green</downloadColor>

    The MP skin-engine does understand generic colours. But it looks like they are not in effect for the selected item.

    This problem has been there as long back I can remember.

    If you do not believe there is a problem, I challenge you to create a listview where the selected colour is red and other items are blue. ;)
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
  4. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,452
    Likes Received:
    4,234
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,374 / 0
    Home Country:
    Australia Australia
    Isn't selected color handled in code. Last I checked it's used to identify the currentselected item. In a menu this would be the current choice, in a Playlist this would be thecurrent playing item.

    This works for me as expected just not that obvious from name.
     
  5. pilehave
    • Premium Supporter

    pilehave Community Skin Designer

    Joined:
    April 2, 2008
    Messages:
    2,566
    Likes Received:
    500
    Gender:
    Male
    Occupation:
    Technical consultant, marketing
    Location:
    Hornslet
    Ratings:
    +517 / 0
    Home Country:
    Denmark Denmark
    I'm not sure what you mean be "handled in code" but what I am looking for, is a way to colour all text of the listitems in blue, and the one item that has focus, in red. As far as I can tell, this isn't possible. Surely this would be one of the most basic things of a list to do, just like you can change the texture of the focused item and the non-focused item.

    In the ideal world I would like to be able to change the focused font and non-focused font, but that's another story. :)
     
  6. ltfearme
    • Premium Supporter

    ltfearme Community Plugin Dev

    Joined:
    June 10, 2007
    Messages:
    6,452
    Likes Received:
    4,234
    Gender:
    Male
    Occupation:
    Software Test Engineer
    Location:
    Sydney
    Ratings:
    +5,374 / 0
    Home Country:
    Australia Australia
    What I mean is that a plugin needs to set item.selected property for the skin to react to the <selectedColor> skin property.

    Here is an example of how Selected Color is used.
     

    Attached Files:

  7. DieBagger
    • Team MediaPortal

    DieBagger Retired Team Member

    Joined:
    September 11, 2007
    Messages:
    2,516
    Likes Received:
    1,257
    Gender:
    Male
    Occupation:
    Android Developer
    Location:
    Austria
    Ratings:
    +1,302 / 0
    Home Country:
    Austria Austria
    Show System Specs
    I had a look at this and here's your problem

    GUIListControl ln582
    Code (Text):
    1.  
    2.       if (buttonNr == _cursorX && IsFocused && _listType == ListType.CONTROL_LIST)
    3.       {
    4.         bSelected = true;
    5.       }
    6.  
    checks if the item in the list is selected, but when setting the color

    Code (Text):
    1.  
    2.         if (pItem.Selected)
    3.         {
    4.           dwColor = _selectedColor2;
    5.         }
    6.  
    is used, which is always false (As ltfarme suggested, this would have to be set in code). That's the problem, so I thought: "easy fix" and changed it to

    Code (Text):
    1.  
    2.       if (buttonNr == _cursorX && IsFocused && _listType == ListType.CONTROL_LIST)
    3.       {
    4.         bSelected = true;
    5.       }
    6.       pItem.Selected = bSelected;
    7.  
    which results in the selected labels not being drawn at all... :confused::confused:

    25112010_114357.png

    Since I couldn't pinpoint the reason for this, I'll let someone else with more experience handle this, but it should be on mantis at least imo.
     
  8. jameson_uk
    • Team MediaPortal

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,403 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    Silent ??? I am sure you will have this licked in about 2 minutes ?
     
  9. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Previous observations are correct.

    - listcontrol holds a list of GUIListItem objects
    - those objects have Selected property which can be set to true/false FROM THE CODE (plugin). This property has nothing to do with selection in GUI.
    - <selecteditem> color is used only for GUIListItem's that have Selected property set to true

    Facts are, this is working as intended, and there is no skin property skinners can use for requested functionality.
     
  10. jameson_uk
    • Team MediaPortal

    jameson_uk Retired Team Member

    Joined:
    January 27, 2005
    Messages:
    7,258
    Likes Received:
    2,228
    Gender:
    Male
    Occupation:
    Data Warehousing Consultant
    Location:
    Birmingham
    Ratings:
    +2,403 / 0
    Home Country:
    United Kingdom United Kingdom
    Show System Specs
    So is a bug that it is not set in our plugins?
     
  11. SilentException
    • Team MediaPortal

    SilentException Retired Team Member

    Joined:
    October 27, 2008
    Messages:
    2,617
    Likes Received:
    1,125
    Gender:
    Male
    Location:
    Rijeka, Croatia
    Ratings:
    +1,129 / 0
    Home Country:
    Croatia Croatia
    Not exactly. You don't want to be setting Selected property every time item is selected. If this was the purpose of the property it would work automatically in that way.

    I suppose the original usage for this property was that you can select - mark multiple items in the list (for example before deletion). There are other usages as well.

    But there is no skin property to color the GUI selected item.
     
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!