Fork MediaPortal on GitHub
MediaPortal Windows Media Center
MediaPortal Wiki > MediaPortal 1 > Contribute > Skins > Skin Related Changes > 1.0.1 to 1.1.0 > Fadelabel text wrapping and button control with fadelabel

Fadelabel text wrapping and button control with fadelabel

Was this page helpful?

    Purpose

    Button control and Up and Down button control changes

    This patch gives the button control the following new skin attributes:

    • scrollStartDelaySec - specifies the amount of time, in seconds, until text scrolling starts once the button *receives focus*. Obtaining focus is the trigger to start consideration for scrolling (otherwise all buttons on the screen might scroll at the same time = very annoying). If scrollWrapString is not specified then the fadelabel in the button control behaves as a "legacy" fadelabel (no text wrapping).
    • scrollWrapString - specifies two things; (a) that the fade label should wrap text back to front and, (b) the text string that should be used to join the back of the label to the front. If you want text to wrap around you must specify at least one character (e.g., a space). An empty string turns off wrapping behavior. This attribute has no effect if scrollStartDelaySec < 0.

    Fade label control changes

    This patch gives the fadelabel control the following new skin attributes:

    • wrapString - identical behavior to the button control scrollWrapString attribute.

    Description of change

    In the attached image a button control is defined by the transparent rectangle.

    The button control text is the longer, light-blue text (being scrolled).

    Notice the " | " before the word "LONG" - this is the value of the scrollWrapString attribute on the button control.

    The skin code for this button follows.

    Incidentally, the TV icon and "TV" label are simply overlays defined in other controls.

    fadelabel.png

    <control>
            <description>tv settings button</description>
            <type>button</type>
            <id>1001</id>
            <label>LONG DESCRIPTION GOES HERE FOR THESE SETTINGS</label>
            <font>h3</font>
            <textXOff>90</textXOff>
            <textYOff>50</textYOff>
            <textcolor>#buttonDescTextColor</textcolor>
            <textcolorNoFocus>#buttonDescTextColor</textcolorNoFocus>
            <textureFocus>list-nofocus.png</textureFocus>
            <textureNoFocus>-</textureNoFocus>
            <scrollStartDelaySec>1</scrollStartDelaySec>
            <scrollWrapString> | </scrollWrapString>
            <width>600</width>
            <height>96</height>
    </control>



    Running the latest version?

    V1.8.0 - released July 2014
    Releasenews | Download
    Changelog
     | Requirements
    HTPC
    Team-MediaPortal
     
    About
    Contact |  Press
    Partners