Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
Game Controller List

Table of Contents

Used to display a list of game controllers, allowing for special effects such as controller highlighting and port selection.

The game controller list is used for displaying a list of game controllers. It is provided as a container to allow for special behavior of the inner game controllers, such as visualizing the current in-game port for each controller in the GameAgents dialog.

The control was introduced in v21 to support the new Player Viewer (GameAgents) dialog.


Example

<control type="gamecontrollerlist">
<description>My first game controller list, showing two items: A "controller disconnected" icon and a SNES controller</description>
<width>192</width>
<height>96</height>
<orientation>horizontal</orientation>
<align>left</align>
<itemlayout width="96" height="96">
<control type="gamecontroller">
<texture>$INFO[ListItem.Icon]</texture>
<controllerid>$INFO[ListItem.Property(controllerid)]</controllerid>
</control>
</itemlayout>
<focusedlayout width="96" height="96">
<control type="gamecontroller">
<texture>$INFO[ListItem.Icon]</texture>
<controllerid>$INFO[ListItem.Property(controllerid)]</controllerid>
</control>
</focusedlayout>
<content>
<item>
<icon>DefaultAddonNone.png</icon>
</item>
<item>
<property name="controllerid">game.controller.snes</property>
</item>
</content>
</control>
#define A(x)
Definition WindowXML.cpp:36
enum const char * name
Definition addon_base.h:203
@ left
Definition cc_decoder708.h:76
const char const uint8_t size_t unsigned int unsigned int * height
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:417
const char const uint8_t size_t unsigned int * width
Definition kodi-dev-kit/include/kodi/c-api/addon-instance/ImageDecoder.h:416

Available tags

The default control tags are applicable to this control. Note that each tag is lower case only. This is important, as xml tags are case-sensitive.

The game controller list derives from a List Container, so all list tags and attributes can be used.

In addition, the following game-related tags are available:

Tag Description
align Align controllers to the left or right, depending on how many in-game ports are available. Only used in-game for list item content provided by core, such as in the Player Viewer (GameAgents) dialog. Ignored if static content is provided.
v21 Skinning engine changes
Game Controller List was added.

See also

Development: