2012-08-13 18:32:53 +00:00
Themes
======
2013-11-12 23:28:15 +00:00
EmulationStation allows each system to have its own "theme." A theme is a collection of resources defined in an XML document.
2012-08-13 18:32:53 +00:00
2013-11-12 23:28:15 +00:00
Themes are loaded like this:
2012-10-17 18:32:01 +00:00
2013-11-12 23:28:15 +00:00
1. Initialize to default values.
2. If `$HOME/.emulationstation/es_theme_default.xml` exists, load it.
2013-12-09 04:47:13 +00:00
3. If there is a `theme.xml` present in the root of a system's `path` directory, load it.
IF NOT, If `$HOME/.emulationstation/%SYSTEMNAME%/theme.xml` exists, load it.
2012-08-13 18:32:53 +00:00
Example
=======
```
< theme >
< listPrimaryColor > 0000FF< / listPrimaryColor >
< listSecondaryColor > 00FF00< / listSecondaryColor >
2013-11-12 23:28:15 +00:00
< listFont >
< path > ./../all_themes/font.ttf< / path >
< size > 0.045< / size >
< / listFont >
2013-01-06 20:33:50 +00:00
2013-11-12 23:28:15 +00:00
< descriptionFont >
< path > ./../all_themes/font.ttf< / path >
< size > 0.035< / size >
< / descriptionFont >
2013-01-06 20:33:50 +00:00
2013-11-12 23:28:15 +00:00
< backgroundImage >
2013-01-06 20:33:50 +00:00
< path > ./theme/background.png< / path >
2013-11-12 23:28:15 +00:00
< tile > true< / tile >
< / backgroundImage >
2012-10-01 03:29:55 +00:00
2013-11-12 23:28:15 +00:00
< headerImage >
< path > ./theme/logo.png< / path >
< tile > false< / tile >
< / headerImage >
2012-10-07 22:59:20 +00:00
2013-11-12 23:28:15 +00:00
< scrollSound > ./../all_themes/scrollSound.wav< / scrollSound >
< / theme >
```
2012-10-07 22:59:20 +00:00
2013-11-12 23:28:15 +00:00
Themes must be enclosed in a `<theme>` tag.
2012-10-07 22:59:20 +00:00
2013-11-12 23:28:15 +00:00
All paths automatically expand `./` to the folder containing the theme.xml.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
All paths automatically expand `~/` to the home directory ($HOME on Linux, %HOMEPATH% on Windows).
2012-10-10 13:51:48 +00:00
2013-11-12 23:28:15 +00:00
Stuff you can define
====================
2012-10-31 14:46:06 +00:00
Fonts
=====
Fonts are defined like so:
```
2013-11-12 23:28:15 +00:00
< resourceName >
<!-- Path is optional. -->
< path > ./some/path/here.ttf< / path >
<!-- Size is a percentage of screen height. Optional. -->
< size > 0.035< / size >
< / resourceName >
2012-10-31 14:46:06 +00:00
```
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<listFont>` - Default size: 0.045.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<descriptionFont>` - Default size: 0.035.
2013-12-09 04:47:13 +00:00
2013-11-25 20:49:02 +00:00
`<fastSelectLetterFont>` - Default size: 0.15.
2013-03-17 17:16:40 +00:00
2013-11-12 23:28:15 +00:00
Colors
======
2012-10-31 14:46:06 +00:00
2013-11-12 23:28:15 +00:00
Colors are defined in hex, like this:
2012-10-31 14:46:06 +00:00
2013-11-12 23:28:15 +00:00
`<resourceName>00FF00FF</resourceName>`
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
or
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<resourceName>00FF00</resourceName>`
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
(without the alpha channel specified - will assume FF)
2012-10-31 14:46:06 +00:00
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<listPrimaryColor>` - Default: 0000FFFF.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<listSecondaryColor>` - Default: 00FF00FF.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<listSelectorColor>` - Default: 000000FF.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<listSelectedColor>` - Default: 00000000.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<descriptionColor>` - Default: 48474DFF.
2013-12-09 04:47:13 +00:00
2013-11-25 20:49:02 +00:00
`<fastSelectLetterColor>` - Default: FFFFFFFF.
2013-12-09 04:47:13 +00:00
2013-11-25 20:49:02 +00:00
`<fastSelectTextColor>` - Default: DDDDDDFF.
2013-09-14 17:32:21 +00:00
2013-11-12 23:28:15 +00:00
Images
======
2012-10-13 18:29:53 +00:00
2013-11-12 23:28:15 +00:00
Images are defined like this:
```
< resourceName >
< path > ./some/path/here.png< / path >
<!-- Can be true or false. -->
< tile > true< / tile >
< / resourceName >
```
Pretty much any image format is supported.
2012-10-13 18:29:53 +00:00
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<backgroundImage>` - No default.
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<headerImage>` - No default.
2013-12-09 04:47:13 +00:00
2013-11-21 20:06:01 +00:00
`<infoBackgroundImage>` - No default.
2013-12-09 04:47:13 +00:00
2013-11-25 20:49:02 +00:00
`<verticalDividerImage>` - No default.
2013-12-09 04:47:13 +00:00
2013-12-11 03:23:47 +00:00
`<systemImage>` - No default. Large image, shown in the system select menu.
2013-11-28 19:52:21 +00:00
`<fastSelectBackgroundImage>` - Nine patch. Default is the "button.png" resource.
2012-10-13 20:05:43 +00:00
2013-11-12 23:28:15 +00:00
Sounds
======
2012-10-13 20:05:43 +00:00
2013-11-12 23:28:15 +00:00
Sounds are defined like this:
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
`<resourceName>./some/path/here.wav</resourceName>`
2013-12-09 04:47:13 +00:00
2013-11-12 23:28:15 +00:00
Only .wav files are supported.
2012-10-13 20:05:43 +00:00
2013-12-09 04:47:13 +00:00
2013-11-28 19:52:21 +00:00
`<scrollSound>` - No default. Played when a list scrolls.
2013-12-09 04:47:13 +00:00
2013-11-28 19:52:21 +00:00
`<gameSelectSound>` - No default. Played when a game is launched.
2013-12-09 04:47:13 +00:00
2013-11-28 19:52:21 +00:00
`<backSound>` - No default. Played when leaving a folder in the game list.
2013-12-09 04:47:13 +00:00
2013-11-28 19:52:21 +00:00
`<menuOpenSound>` - No default. Played when the menu is opened.
2013-12-09 04:47:13 +00:00
2013-11-28 19:52:21 +00:00
`<menuCloseSound>` - No default. Played when the menu is closed.
2012-10-13 18:29:53 +00:00
2013-09-14 17:32:21 +00:00
Nine Patches
============
EmulationStation borrows the concept of "nine patches" from Android (or "9-Slices"). Currently the implementation is very simple and hard-coded to only use 48x48px images (16x16px for each "patch"). Check the `data/resources` directory for some examples (button.png, frame.png).
2012-08-13 18:32:53 +00:00
-Aloshi
http://www.aloshi.com