Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Table of Contents

Description

This control aggregates the look and behavior of the check mark control and the button control. 

An example checkbutton can be see in the following screenshot. As the button is clicked the check mark image toggles on/off.

Changelog

Change

Date

Version

Checkbutton Control Created

2010/10/05

1.1.0 to 1.2.0

Checkbutton Implementation

2012/06/29

1.2.0 to 1.3.0

Text scrolling on Checkbutton, Togglebutton

2013/01/27

1.2.0 to 1.3.0

Image borders

2010/10/10

1.0.1 to 1.1.0

Text Padding

2013/01/27

1.2.0 to 1.3.0

Shadow text

2010/10/10

1.0.1 to 1.1.0

 

 

 

Tags

GUICheckButton (checkbutton)

Element Name

Data Type

Description

textureFocus [border, position, textureRepeat, textureRotate, texture, colorKey, corners, cornerRotate, mask, tileFill]

String

The texture to display when the button has the focus/is selected.

      border

String

With this feature you have the ability to add borders composed from textures that you identify. See Borders for a more detailled description.

      position

BorderPosition

Specifies the position of the border relative to the image or control rectangle edges. Valid values are OutsideImage, InsideImage, CenterImage, OutsideControl, InsideControl, CenterControl. The default value is "OutsideImage". Example: <border position="CenterControl">10</border>.

      textureRepeat

Boolean

 

      textureRotate

Boolean

 

      texture

String

 

      colorKey

Long

 

      corners

Boolean

 

      cornerRotate

Boolean

 

textureNoFocus [border, position, textureRepeat, textureRotate, texture, colorKey, corners, cornerRotate, mask, tileFill]

String

The texture to display when the button does not have the focus/is not selected.

      border

String

With this feature you have the ability to add borders composed from textures that you identify. See Borders for a more detailled description.

      position

BorderPosition

Specifies the position of the border relative to the image or control rectangle edges. Valid values are OutsideImage, InsideImage, CenterImage, OutsideControl, InsideControl, CenterControl. The default value is "OutsideImage". See Borders for a more detailled description.

      textureRepeat

Boolean

Specifies whether the texture used for the border should repeat or stretch inside each of the four rectangles that compose the overall border. The default value is "no". Example: <border textureRepeat="yes">10</border>.

      textureRotate

Boolean

 

      texture

String

 

      colorKey

Long

 

      corners

Boolean

 

      cornerRotate

Boolean

 

font

String

The font to use to display the button text.

label

String

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

textcolor

Long

The color of the text when the button has the focus/is selected.

textcolorNoFocus

Long

The color of the text when the button is not selected.

disabledcolor

Long

The color of the text when the button is disabled.

hyperlink

String

The id of the xml skin page that MP will load when the button is pushed.

action

Integer

The prefefined event to execute when the button is pushed.

script

String

Unknown.

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.

textpadding

Integer

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

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.

textureCheckmarkNoFocus

String

The filename containing the not checked texture.

textureCheckmark

String

The filename containing the checked texture.

markWidth

Integer

The width of the checkmark texture

markHeight

Integer

The height of the checkmark texture

markXOff

Integer

 

markYOff

Integer

 

markalign

Alignment

 

markvalign

VAlignment

 

shadowAngle

Integer

 

shadowDistance

Integer

 

shadowColor

Long

 

textalign

Alignment

 

textvalign

VAlignment

 

scrollStartDelaySec

Integer

[Since 1.3] Sets the delay before scrolling starts, and enables scrolling of label text when it is too long for the texture

scrollWrapString

String

[Since 1.3] Character to identify the end of the label text as it scrolls 

onclick

String

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

selected

Boolean

[Since 1.3] Sets the value of the control.  Useful when used in conjunction with Skin Settings.

 

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. As of v1.7.0 Skin Settings and Skin Expressions are also supported. 

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. As of v1.7.0 Skin Settings and Skin Expressions are also supported. 

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. As of v1.7.0 Skin Settings and Skin Expressions are also supported. 

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. As of v1.7.0 Skin Settings and Skin Expressions are also supported. 

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 samples

><control>
  <description>automatically turn on tv</description>
  <type>checkbutton</type>
  <id>24</id>
  <label>6006</label>
  <onleft>11</onleft>
  <onright>11</onright>
  <onup>23</onup>
  <ondown>28</ondown>
  <textureCheckmark>check-box.png</textureCheckmark>
  <textureCheckmarkNoFocus>check-boxNF.png</textureCheckmarkNoFocus>
  <markWidth>16</markWidth>
  <markHeight>16</markHeight>
  <markXOff>20</markXOff>
  <markalign>right</markalign>
  <markvalign>middle</markvalign>
  <height>34</height>
  <width>995</width>
  <font>menu</font>
  <shadowAngle>45</shadowAngle>
  <shadowDistance>1</shadowDistance>
  <shadowColor>FF000000</shadowColor>
  <textcolor>#settings.buttonTextColor</textcolor>
  <textalign>left</textalign>
  <textvalign>middle</textvalign>
  <textXOff>10</textXOff>
  <textureFocus border="1" position="insideimage" colorKey="66FFFFFF">list-focus.png</textureFocus>
  <textureNoFocus>list-nofocus.png</textureNoFocus>
</control>

   

 

This page has no comments.