The visible content of a theme is described by objects placed inside <view> tags. Each object has a type (the tag name), a name, and properties. This page describes views, the attributes common to every object, and links to each object's own page.
<view> tagInterface screens are called views.
name attributeMandatory. It states which screen the content applies to.
| Value | Screen |
|---|---|
system |
The system list |
detailed |
The game list |
basic |
The game list, variant without metadata |
menu |
Menus, help bar and virtual keyboard |
gameclip |
The "game clips" screensaver |
A single tag can target several views, comma-separated:
<view name="system, detailed">
...
</view>
The
gridandvideoviews from older versions no longer exist. An unknown view is silently ignored — that is the most frequent cause of a theme that "does nothing".
if attributeOptional. See the conditions page.
nameMandatory. It designates the targeted element. If it matches an element already managed by the interface, the object customises it; otherwise you must add extra="true". The list of recognised names is given on each object's page.
A name can target several elements of the same type, comma-separated:
<text name="md_lbl_rating, md_lbl_genre, md_lbl_players" color="48474D" />
Element names are case sensitive.
md_lbl_ratingandMD_LBL_RATINGdo not designate the same element.
extraOptional. extra="true" creates a new element instead of customising an existing one. "Extra" elements are drawn in declaration order, with a default zIndex of 10: declare backgrounds first. Pick names that cannot collide with the interface ones, for instance by prefixing them.
You can also group your additions in an <extras> block, which applies extra="true" to everything it contains:
<view name="system">
<extras>
<image name="background" path="./art/background.png" pos="0 0" size="1 1" />
<box name="banner" pos="0 0.8" size="1 0.2" color="00000080" />
</extras>
</view>
showIfOptional, detailed view. Restricts the object to a kind of entry: game, folder, header, or a comma-separated combination.
regionOptional and deprecated. It keeps the object only if the region chosen by the user (
eu,jp,us) is in the list. Prefer property suffixes (path.EU,text.JP) or the${settings.region}variable.
| Type | Notation |
|---|---|
| Normalised pair | Two numbers separated by a space. Each number is written as a fraction (0.5), a percentage (50%) or pixels (960px). |
| Path | Relative to the current XML file if it starts with ., relative to the home folder if it starts with ~, absolute otherwise. |
| Boolean | true / 1 / yes or false / 0 / no. Only the first character is examined. |
| Colour | Hexadecimal RRGGBB or RRGGBBAA. Without an alpha channel, opacity is FF. |
| Float | A decimal number. |
| String | Free text. |
These properties are found on most objects. They are detailed here only; object pages simply state which ones apply.
| Property | Type | Purpose |
|---|---|---|
pos |
Pair | Position of the object's anchor point. 0 0 = top left corner of the screen, 1 1 = bottom right. Values outside [0..1] place the object partially or fully off-screen. |
size |
Pair | Object size. |
maxSize |
Pair | Maximum size, keeping the aspect ratio. Useful when the image dimensions are unknown. |
keepratio |
Boolean | Preserves the aspect ratio together with size. |
origin |
Pair | Point of the object that pos refers to. 0.5 0.5 centres the object on its position. |
rotation |
Float | Rotation angle in degrees, clockwise when positive. |
rotationOrigin |
Pair | Point the rotation happens around. Defaults to 0.5 0.5. |
color |
Colour | Main colour. On an image, every pixel is multiplied by this colour: FFFFFFAA only changes transparency. |
zIndex |
Float | Drawing order, from lowest to highest. May be negative. |
disabled |
Boolean | Hides the object entirely. |
fontPath |
Path | TrueType or OpenType font to use. |
fontSize |
Float | Font size as a fraction of screen height (0.045 = 4.5% of the height). |
alignment |
String | left, center or right. center also centres vertically. |
forceUppercase |
Boolean | Displays text in uppercase. |
lineSpacing |
Float | Line spacing, as a multiple of the font height. Defaults to 1.5. |
path |
Path | File to load (image, video, sound, text, depending on the object). |
Default zIndex values are: 0 for the background, 10 for extras, 20 for the game list, 30 for media, 40 for metadata and the carousel, 50 for the logo and system info.
| Object | Purpose |
|---|---|
<image> |
Display an image |
<box> |
Draw a solid or gradient rectangle |
<video> |
Display a video |
<text> |
Display text |
<scrolltext> |
Display scrolling text |
<markdown> |
Display Markdown-formatted text |
<rating> |
Display a game rating as stars |
<datetime> |
Display a date or time |
| Object | Purpose |
|---|---|
<carousel> |
The system carousel, or its text-list variant |
<textlist> |
The game list |
<helpsystem> |
The help bar at the bottom of the screen |
<sound> |
The background music |
| Object | Purpose |
|---|---|
<menuBackground> |
The menu background |
<menuText> |
Menu texts |
<menuTextSmall> |
Secondary menu texts |
<menuSection> |
Menu section headers |
<menuSize> |
Menu row height |
<menuButton> |
Menu buttons |
<menuSwitch> |
Menu switches |
<menuSlider> |
Menu sliders |
<menuIcons> |
Menu icons |
<keyboard> |
Virtual keyboard colours |
| Object | Purpose |
|---|---|
<include> |
Include another theme file |
<subset> |
Declare a theme option visible in the menus |
The
<container>and<ninepatch>tags are still recognised by the parser for compatibility, but no element of the 10.1 interface uses them and they cannot be created withextra="true". Do not build anything on them.