MediaPortal Windows Media Center
MediaPortal Wiki > MediaPortal 1 > Contribute > Skins > Skin Architecture > Skin Controls > Spincontrol

Spincontrol

Was this page helpful?

    Description

    This control aggregates the look and behavior of the spin control and the button control. The up/down arrows are able to be independently focused for control. As the button is clicked the focused arrow scrolls the list of available values and displays each new value to the left of the up/down arrows.

    Changelog

    ChangeDateVersion
    No changes yet for this control

    Elements in spincontrol and how alignment works

    Item Element Name Data Type Description
    1 spinWidth Integer The width of each arrow image. If the width of the image is different from what is defined, it will be scaled to fit.
    2 spinHeight Integer The height of each arrow image. If the height of the image is different from what is defined, it will be scaled to fit.
    3 textureDown String The image file used for the down arrow when not selected.
    3 textureDownFocus String The image file used for the down arrow when selected.
    4 textureUp String the image file used for the up arrow when not selected.
    4 textureUpFocus String The image file used for the up arrow when selected.
    5 spinColor String The color of the text used to display the number of pages / total number of pages

     

    control_numbered.jpg

     

    How the Spincontrol is aligned around spinPosX with spinAlign set to Left

    spinalign_left.jpg

     

    How the Spincontrol is aligned around spinPosX with spinAlign set to Right

    spinalign_right.jpg

    Tags

    GUISpinControl (spincontrol)

    edit.png

    On Mon, 06 Dec 2010, Dadeo suggested that this page or content is incomplete and needs to be expanded with descriptions of all properties

    Property Name Data Type Description
    showrange Boolean Sets the value to the label text when the button is highlighted.
    digits Integer Will prepend "0" the given number of times.
    reverse Boolean The up/down button switches place.
    textcolor Long  
    font String  
    textureUp String  
    textureDown String  
    textureUpFocus String  
    textureDownFocus String  
    align Alignment  
    spintype SpinType Int, Float, Text or Disc.
    orientation eOrientation Horizontal or Vertical
    cycleItems Boolean  
    shadowAngle Integer  
    shadowDistance Integer  
    shadowColor Long  
    prefixText String  
    suffixText String  
    textXOff Integer The number of pixels the text label is offset from the left edge of the button image.
    textYOff Integer The number of pixels the text label is offset from the top edge of the button image.
    onclick String [Since 1.3] Executes a MediaPortal skin function when the button is clicked.  See Skin Settings for more information.

    Inherited by GUIControl

    See GUIControl for the full documentation of this control.

    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 The type of the control, for instance "button", "label", "textbox" and all other controls.
    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)
    onfocus String [Since 1.3] Executes a MediaPortal skin function when the control gains focus.  See Skin Settings for more information.

    XML Examples

    <control>
      <description>default spin control</description>
      <type>spincontrol</type>
      <id>2</id>
      <posX>330</posX>
      <posY>126</posY>
      <textureUp>page_up_nofocus.png</textureUp>
      <textureDown>page_down_nofocus.png</textureDown>
      <textureUpFocus>page_up_focus.png</textureUpFocus>
      <textureDownFocus>page_down_focus.png</textureDownFocus>
      <align>left</align>
      <width>16</width>
      <height>16</height>
      <font>font13</font>
      <reverse>yes</reverse>
      <textcolor>ffffffff</textcolor>
      <disabledcolor>60ffffff</disabledcolor>
      <spintype>text</spintype>
      <showrange>yes</showrange>
      <orientation>vertical</orientation>
    </control>
    •  




    Running the latest version?

    V1.6.0 - released December 2013
    Releasenews | Download
    Changelog
     | Requirements
    HTPC
    Team-MediaPortal
     
    About
    Contact |  Press
    Partners