Fork MediaPortal on GitHub
MediaPortal Windows Media Center
MediaPortal Wiki > MediaPortal 1 > Contribute > Skins > Skin Architecture > Skin Controls > Button3part

Button3part

0 of 1 found this page helpful

    GUIButton3PartControl (button3part)

    Implements a button which consists of 3 parts. A left part, a middle part and a right part. These are presented as [ Left Middle Right ]. Each part has 2 images, 1 for the normal state and 1 for the focused state. Further the button can have an image (icon) which can be positioned.

    INTERNAL: This control is designed to be implemented internally by MediaPortal only.

     

    outdated.png

    On 28 Jul 2012, michael_t suggested that this page is outdated and does not reflect the current state of the button3part control. On 1 Oct 2012, ajp8164 confrimed and added an Issue 4036 to Mantis. 

    Changelog

    ChangeDateVersion
    Button3Part2010/10/051.1.0 to 1.2.0
    Image Overlay2012/10/011.2.0 to 1.3.0
    Image Tile Fill2010/10/051.1.0 to 1.2.0
    Image borders2010/10/101.0.1 to 1.1.0
    Text Padding2013/01/271.2.0 to 1.3.0

    GUIButton3PartControl Tags

    Element Name

    Data Type

    Description

    textureFocusedLeft

    String

    The left part of the texture to display when the button has the focus

    textureNonFocusedLeft

    String

    The left part of the texture to display when the button does not have the focus

    textureFocusedMid

    String

    The middle part of the texture to display when the button has the focus

    textureNonFocusedMid

    String

    The middle part of the texture to display when the button does not have the focus 

     

    textureFocusedRight

    String

    The right part of the texture to display when the button has the focus

    textureNonFocusedRight

    String

    The right part of the texture to display when the button does not have the focus

    [overlay]

    String

    Specify an image to blend with the current diffusecolor and then overlay on top of the (main) texture. See TV Guide for an example using image overlays in MediaPortal. Can be used with any of the above textures

    font

    String

    The font to use to display the label

    label

    String

    The label text, property or a number that corresponds to an id in the strings.xml file

    textcolor

    Long

    The color of the text

    disabledcolor

    Long

    The color of the text when the button is disabled

    hyperlink

    Integer

    The window id to switch to when the button is pushed

    action

    Integer

    The action id to generate when the button is pushed

    textXOff

    Integer

    Sets the X-offset of the label

    textYOff

    Integer

    Sets the Y-offset of the label

    textpadding 

    Integer 

    [Since 1.3]  provides "space" inside the label text to prevent overlap with graphics that follow on the right.

    textalign

    String

    Align the text in the button 'left', 'right' or 'center'

    application

    String

    The application to launch when the button is pushed. The application working directory is set to the executable directory and run hidden. MediaPortal does not wait for the application to exit.

    arguments

    String

    The arguments passed to the application being launched

    hover

    String

    The image to display when the button has the focus

    hoverX

    Integer

    The X position on the window to display the hover image

    hoverY

    Integer

    The Y position on the window to display the hover image

    hoverWidth

    Integer

    The width of the hover image

    hoverHeight

    Integer

    The height of the hover image

    onclick

    String

    [Since 1.3] Executes a MediaPortal skin function when the button is clicked.  See Skin Settings for more information.

    GUIButtonControl Properties Exposed

    Property Name

    Data Type

    Description

    #highlightedbutton

    String

    Sets the value to the label text when the button is highlighted

    Inherited Tags

    Element Name

    Data Type

    Description

    id

    Integer

    The id of the control. The id will couple the skin file to the code, so if we later on want to check that a user pressed a button, the id will be required and must be unique. For controls that will never be referenced in the code it is safe to set it to "1"

    description

    String

    An optional description of the control for your reference

    type

    String

    button

    posX

    Integer

    The X-position on the window for this control

    posY

    Integer

    The Y-position on the window for this control

    width

    Integer

    The width of this control

    height

    Integer

    The height of this control

    onleft

    Integer

    The control id to move the focus to when the user moves left. If not specified (or zero) MediaPortal will find the closest control in that direction to move to

    onright

    Integer

    The control id to move the focus to when the user moves right. If not specified (or zero) MediaPortal will find the closest control in that direction to move to

    onup

    Integer

    The control id to move the focus to when the user moves up. If not specified (or zero) MediaPortal will find the closest control in that direction to move to

    ondown

    Integer

    The control id to move the focus to when the user moves down. If not specified (or zero) MediaPortal will find the closest control in that direction to move to

    colordiffuse

    Long

    Allows you to mix a color & a graphics texture. E.g. If you have a graphics texture like a blue button you can mix it with a yellow color diffuse and the end result will be green. Defaults to 0xFFFFFFFF

    dimColor

    Integer

    Color for a control when it is not focussed. Defaults to half transparent (0x60ffffff)

    GUIWindow Properties Exposed

    Property Name

    Data Type

    Description

    #currentmodule

    String

    The module name from strings.xml lookup (100000 + Window ID)

    XML/Code Examples

    The following is an example of button3part using image overlays in TV Guide for genre colors:

    <control>
      <description>template for program on now button</description>
      <type>button3part</type>
      <id>35</id>
      <textureFocusedLeft overlay="tvguide_arrow_left_colorize_overlay.png">tvguide_arrow_left_colorize.png</textureFocusedLeft>
      <textureNonFocusedLeft overlay="tvguide_arrow_left_colorize_overlay.png">tvguide_arrow_left_colorize.png</textureNonFocusedLeft>
      <textureFocusedMid overlay="tvguide_button_middle_colorize_overlay.png">tvguide_button_middle_colorize.png</textureFocusedMid>
      <textureNonFocusedMid overlay="tvguide_button_middle_colorize_overlay.png">tvguide_button_middle_colorize.png</textureNonFocusedMid>
      <textureFocusedRight overlay="tvguide_arrow_right_colorize_overlay.png">tvguide_arrow_right_colorize.png</textureFocusedRight>
      <textureNonFocusedRight overlay="tvguide_arrow_right_colorize_overlay.png">tvguide_arrow_right_colorize.png</textureNonFocusedRight>
      <!-- This icon is used for the hd program indicator -->
      <textureIcon2>tvguide_hd_program_on_now.png</textureIcon2>
      <icon2Align>left</icon2Align>
      <icon2VAlign>middle</icon2VAlign>
      <icon2OffsetX>10</icon2OffsetX>
      <icon2OffsetY>1</icon2OffsetY>
      <icon2InlineLabel1>yes</icon2InlineLabel1>
    </control>



    Running the latest version?

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