summaryrefslogtreecommitdiffstats
path: root/xbmc/guilib/GUIMoverControl.dox
blob: 191231fdff56b8cec301e45909d5f7a02d3c353d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/*!

\page Mover_Control Mover Control
\brief **Used in the calibration screens.**

\tableofcontents

The mover control is used for the screen calibration portions of Kodi. You can
choose the size and look of the mover control.


--------------------------------------------------------------------------------
\section Mover_Control_sect1 Example

~~~~~~~~~~~~~
<control type="mover" id="3">
      <description>My first mover control</description>
      <posx>80</posx>
      <posy>60</posy>
      <width>250</width>
      <height>200</height>
      <texturefocus>mytexture.png</texturefocus>
      <texturenofocus>mytexture.png</texturenofocus>
      <pulseonselect>true</pulseonselect>
      <movingspeed acceleration="180" maxvelocity="300" resettimeout="200" delta="1">
            <eventconfig type="up">
            <eventconfig type="down">
            <eventconfig type="left" acceleration="100" maxvelocity="100" resettimeout="160" delta="1">
            <eventconfig type="right" acceleration="100" maxvelocity="100" resettimeout="160" delta="1">
      </movingspeed>
</control>
~~~~~~~~~~~~~


--------------------------------------------------------------------------------
\section Mover_Control_sect2 Available tags

In addition to the [Default Control Tags](http://kodi.wiki/view/Default_Control_Tags)
the following tags are available. Note that each tag is lower case only. This is
important, as xml tags are case-sensitive.

| Tag             | Description                                                   |
|----------------:|:--------------------------------------------------------------|
| texturefocus    | Specifies the image file which should be displayed when the mover has focus. [See here for additional information about textures](http://kodi.wiki/view/Texture_Attributes).
| texturenofocus  | Specifies the image file which should be displayed when the mover does not have focus.
| movingspeed     | Specifies the allowed directional movements and respective configurations. The <c>`<movingspeed>`</c> tag section can contain as many <c>`<eventconfig>`</c> tags as required.


--------------------------------------------------------------------------------
\section Mover_Control_sect3 Note on use of movingspeed tag

The <c>`movingspeed`</c> tag must be specified to allow the control to be moved via
an input device such as keyboard. Each direction can be specified and configured
to simulate the motion effect with the <c>`eventconfig`</c> tag.

The following attributes allow the motion effect of the control to be configured:

| Attribute       | Description                                                   |
|----------------:|:--------------------------------------------------------------|
| type            | Specifies the direction of movement. Accepted values are: <c>`up`</c>, <c>`down`</c>, <c>`left`</c>, <c>`right`</c>. All directions are optional and do not have to be included.
| acceleration    | Specifies the acceleration in pixels per second (integer value).
| maxvelocity     | Specifies the maximum movement speed. This depends on the acceleration value, e.g. a suitable value could be (acceleration value)*3. Set to 0 to disable. (integer value).
| resettimeout    | Specifies the idle timeout before resetting the acceleration speed (in milliseconds, integer value).
| delta           | Specifies the minimal pixel increment step (integer value).

The attributes <c>`acceleration`</c>, <c>`maxvelocity`</c>, <c>`resettimeout`</c>,
<c>`delta`</c> can be specified individually for each <c>`eventconfig`</c> tag,
or globally in the <c>`movingspeed`</c> tag, or a mixture, as the following example:

~~~~~~~~~~~~~
<movingspeed acceleration="180" maxvelocity="300" resettimeout="200" delta="1">
    <eventconfig type="up">
    <eventconfig type="down">
    <eventconfig type="left" acceleration="100" maxvelocity="100" resettimeout="160">
    <eventconfig type="right" acceleration="100" maxvelocity="100" resettimeout="160">
</movingspeed>
~~~~~~~~~~~~~

--------------------------------------------------------------------------------
\section Mover_Control_sect4 Revision History

@skinning_v20 <b>[movingspeed]</b> New tag added.

--------------------------------------------------------------------------------
\section Mover_Control_sect5 See also

#### Development:

- [Add-on development](http://kodi.wiki/view/Add-on_development)
- [Skinning](http://kodi.wiki/view/Skinning)

*/