Game Controller List

From Official Kodi Wiki
Jump to navigation Jump to search
  ▶ Skinning ▶ Available controls ▶ Game Controller List

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>

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.

See also

Development: