From 0a02d710f315708fc6817f842e09bd3dd99122e4 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 22 Jun 2020 19:46:09 +0200 Subject: [PATCH] Removed the last remnants of the usage of /etc and updated the documenation accordingly. --- GAMELISTS.md | 12 +- INSTALL.md | 107 +++-- NEWS.md | 5 +- THEMES.md | 755 +++++++++++++++++----------------- es-app/src/SystemData.cpp | 10 +- es-app/src/scrapers/Scraper.h | 6 +- 6 files changed, 465 insertions(+), 430 deletions(-) diff --git a/GAMELISTS.md b/GAMELISTS.md index 7064a27ca..8e13ddc17 100644 --- a/GAMELISTS.md +++ b/GAMELISTS.md @@ -1,27 +1,27 @@ Gamelists ========= -The gamelist.xml file for a system defines metadata for a system's games, such as a name, image (like a screenshot or box art), description, release date, and rating. +The gamelist.xml file for a system defines metadata for a system's games, such as a name, description, release date, and rating. -ES will check three places for a gamelist.xml in the following order, using the first one it finds: -* `[SYSTEM_PATH]/gamelist.xml` +ES only checks for the gamelist.xml files in the user's home directory: * `~/.emulationstation/gamelists/[SYSTEM_NAME]/gamelist.xml` -* `/etc/emulationstation/gamelists/[SYSTEM_NAME]/gamelist.xml` An example gamelist.xml: ```xml - /home/pi/ROMs/nes/mm2.nes + ./mm2.nes Mega Man 2 Mega Man 2 is a classic NES game which follows Mega Man as he murders eight robot masters in cold blood. - ~/.emulationstation/downloaded_images/nes/Mega Man 2-image.png ``` Everything is enclosed in a `` tag. The information for each game or folder is enclosed in a corresponding tag (`` or ``). Each piece of metadata is encoded as a string. +As of EmulationStation Desktop Edition v1.0.0, there are no longer any references to game media files in gamelist.xml. Instead a media directory is used where the images and videos are simply matched against the ROM file names. As well, no absolute paths are used for the ROM files any longer. Instead a global ROM directory is configured and there are only relative references in the gamelist.xml files, starting with `./` as can be seen in the example above. + +Please refer to [INSTALL.md](INSTALL.md) for more information on how the ROM and media directories are configured. Reference ========= diff --git a/INSTALL.md b/INSTALL.md index 08e58b1ae..40aefec29 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -62,8 +62,33 @@ Remember to copy the necessary .DLL files into the same folder as the executable Configuring =========== + **~/.emulationstation/es_systems.cfg:** -When first run, an example systems configuration file will be created at `~/.emulationstation/es_systems.cfg`. `~` is `$HOME` on Linux, and `%HOMEPATH%` on Windows. This example has some comments explaining how to write the configuration file. See the "Writing an es_systems.cfg" section for more information. +EmulationStation Desktop Edition ships with a comprehensive es_systems.cfg configuration file, and as the logic is to use a %ROMPATH% variable to locate the ROM files (with a corresponding setting in es_settings.cfg), normally you shouldn't need to modify this file to the same extent as previous versions of EmulationStation. Still, see below in this document on how to adjust es_systems.cfg file if required. + +Upon first startup of the application, if there is no es_systems.cfg file present, it will be copied from the template directory of the resources directory. This directory is located in the installation path of the application, for instance `/usr/local/share/emulationstation/resources/templates`. + +The template file will be copied to `~/.emulationstation/es_systems.cfg`. `~` is `$HOME` on Linux, and `%HOMEPATH%` + +**~/.emulationstation/es_settings.cfg:** +When first run, an example configuration file will be created at `~/.emulationstation/es_settings.cfg`. `~` is `$HOME` on Linux, and `%HOMEPATH%` on Windows. This file contains all the settings supported by ES, at their default values. Normally you shouldn't need to modify this file manually, instead you should be able to use the menu inside ES to update all the necessary settings. The exception would be the ROMDirectory setting as ES won't start if no ROM files are found. + +**Setting the ROM directory:** + +By default, ES looks in `~/ROMs` for the ROM files, where they are expected to be grouped into directories corresponding to the systems, for example: + +```bash +user@computer:~ROMs$ ls -1 +arcade +megadrive +pcengine +``` + +However, if you save your ROMs in another directory, you need to configure the ROMDirectory setting in es_settings.cfg.\ +Here's an example: +'' + +Keep in mind though that you still need to group the ROMs into directories corresponding to the system names. Well at least if you want to use the default es_systems.cfg file. See below how to customize that file, which gives you full control over the location of the ROMs. **Keep in mind you'll have to set up your emulator separately from EmulationStation!** @@ -110,78 +135,82 @@ You can use `--help` or `-h` to view a list of command-line options. Briefly out As long as ES hasn't frozen, you can always press F4 to close the application. +As you can see above, you can override the home directory path using the `--home` flag. \ +So by running for instance the command `emulationstation --home ~/games/emulation` ES will look for all the configuration files under `~/games/emulation/.emulationstation`. + Writing an es_systems.cfg ========================= -Complete configuration instructions at [emulationstation.org](http://emulationstation.org/gettingstarted.html#config). - The `es_systems.cfg` file contains the system configuration data for EmulationStation, written in XML. \ This tells EmulationStation what systems you have, what platform they correspond to (for scraping), and where the games are located. -ES will check two places for an es_systems.cfg file, in the following order, stopping after it finds one that works: -* `~/.emulationstation/es_systems.cfg` -* `/etc/emulationstation/es_systems.cfg` +ES will only check in your home directory for an es_systems.cfg file, for example `~/.emulationstation/es_systems.cfg`. -The order EmulationStation displays systems reflects the order you define them in. +The order EmulationStation displays systems reflects the order you define them in, in the case of the default es_systems.cfg file, the systems are listed in alphabetical order. **NOTE:** A system *must* have at least one game present in its "path" directory, or ES will ignore it! If no valid systems are found, ES will report an error and quit! -Here's an example es_systems.cfg: +Here's an overview of the es_systems.cfg file layout: ```xml - - + + - - - - snes + + + + snes - - Super Nintendo Entertainment System + + Super Nintendo Entertainment System - - ~/roms/snes + + %ROMPATH%/snes - - .smc .sfc .SMC .SFC + + .smc .SMC .sfc .SFC .swc .SWC .fig .FIG .bs .BS .bin .BIN .mgd .MGD .7z .7Z .zip .ZIP - - snesemulator %ROM% - + + retroarch -L ~/.config/retroarch/cores/snes9x_libretro.so %ROM% - - snes + + snes - - snes - + + snes + ``` -The following "tags" are replaced by ES in launch commands: +The following variables are replaced by ES in launch commands: -`%ROM%` - Replaced with absolute path to the selected ROM, with most Bash special characters escaped with a backslash. +`%ROMPATH%` - Replaced with the path defined for the setting ROMDirectory in es_settings.cfg. -`%BASENAME%` - Replaced with the "base" name of the path to the selected ROM. For example, a path of "/foo/bar.rom", this tag would be "bar". This tag is useful for setting up AdvanceMAME. +`%ROM%` - Replaced with absolute path to the selected ROM, with most Bash special characters escaped with a backslash. + +`%BASENAME%` - Replaced with the "base" name of the path to the selected ROM. For example, a path of "/foo/bar.rom", this tag would be "bar". This tag is useful for setting up AdvanceMAME. `%ROM_RAW%` - Replaced with the unescaped, absolute path to the selected ROM. If your emulator is picky about paths, you might want to use this instead of %ROM%, but enclosed in quotes. See [SYSTEMS.md](SYSTEMS.md) for some live examples in EmulationStation. + gamelist.xml ============ The gamelist.xml file for a system defines metadata for games, such as a name, description, release date, and rating. -As of the fork to EmulationStation Desktop Edition, game media information no longer needs to be defined in the gamelist.xml files. Instead the application will look for any media matching the ROM filename. The media path where to look for game art is configurable either manually in es_settings.cfg or via the GUI. +As of the fork to EmulationStation Desktop Edition, game media information no longer needs to be defined in the gamelist.xml files. Instead the application will look for any media matching the ROM filename. The media path where to look for game art is configurable either manually in es_settings.cfg or via the GUI. If configured manually in es_settings.cfg, it looks something like this: +`` + +The default game media directory is `~/.emulationstation/downloaded_media`. If at least one game in a system has an image (mix image, screenshot or box cover), ES will use the detailed view for that system (which displays metadata alongside the game list). @@ -212,4 +241,4 @@ https://gitlab.com/recalbox/recalbox-themes https://wiki.batocera.org/themes -For information on how to make your own theme or edit an existing one, read [THEMES.md](THEMES.md)! +For information on how to make your own theme or edit an existing one, read [THEMES.md](THEMES.md). diff --git a/NEWS.md b/NEWS.md index 097ca8e68..353378a6b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -20,16 +20,17 @@ v1.0.0 * Speed improvements and optimizations, the application now starts faster and feels more responsive * Moved all resources to a subdirectory structure and enabled the CMake install prefix variable to generate the resources search path * Changed theme directory to the install prefix (e.g. /usr/local/share/emulationstation/themes) with themes in the home directory taking precedence +* No more attempts to open files directly under /etc, instead only the install prefix directory and the home directory are used * Refactoring, cleanup and documentation of the source code, removal of deprecated files etc. * All required fonts bundled with the application, no dependencies on the OS to provide them any longer * License files included for all the libraries and resources that are bundled with the application -* Updated the MAME ROM index files to include ROMs up to MAME version 0.221 +* Updated the MAME ROM index files to include ROMs up to MAME version 0.221 (and included new scripts to easily generate these index files) ### Bug fixes * Metadata editor insisted that changes were made although nothing was updated * Game images were sometimes scaled incorrectly * Non-transparent favorite icons were not rendered correctly -* Restart and power-off menu entries not working (i.e. on a desktop OS) +* Restart and power-off menu entries not working (at least on my desktop OS) * Toggling the screensaver didn't work as expected * Lots and lots of small bugs and inconsistencies fixed diff --git a/THEMES.md b/THEMES.md index b9002f3cf..5137a3c68 100644 --- a/THEMES.md +++ b/THEMES.md @@ -21,7 +21,7 @@ If that file doesn't exist, ES will try to find the theme in the current **theme my_other_super_cool_background.jpg common_resources/ - scroll_sound.wav + my_font.ttf theme.xml (Default theme) another_theme_set/ @@ -34,7 +34,10 @@ The theme set system makes it easy for users to try different themes and allows There are two places ES can load theme sets from: * `[HOME]/.emulationstation/themes/[CURRENT_THEME_SET]/[SYSTEM_THEME]/theme.xml` -* `/etc/emulationstation/themes/[CURRENT_THEME_SET]/[SYSTEM_THEME]/theme.xml` +* `[INSTALLATION PATH]/themes/[CURRENT_THEME_SET]/[SYSTEM_THEME]/theme.xml` + +An example of an installation path would be: \ +`/usr/local/share/emulationstation/themes/[CURRENT_THEME_SET]/[SYSTEM_THEME]/theme.xml` `[SYSTEM_THEME]` is the `` tag for the system, as defined in `es_systems.cfg`. If the `` tag is not set, ES will use the system's ``. @@ -49,18 +52,18 @@ Here is a very simple theme that changes the description text's color: ```xml - 5 - - - 00FF00 - - - 0.5 0.5 - 0.5 0.5 - 0.8 0.8 - ./my_art/my_awesome_image.jpg - - + 6 + + + 00FF00 + + + 0.5 0.5 + 0.5 0.5 + 0.8 0.8 + ./my_art/my_awesome_image.jpg + + ``` @@ -69,7 +72,7 @@ How it works Everything must be inside a `` tag. -**The `` tag *must* be specified**. This is the version of the theming system the theme was designed for. The current version is 5. +**The `` tag *must* be specified**. This is the version of the theming system the theme was designed for. The current version is 6. @@ -77,7 +80,7 @@ A *view* can be thought of as a particular "screen" within EmulationStation. Vi ```xml - ... define elements here ... + ... define elements here ... ``` @@ -86,17 +89,17 @@ A *view* can be thought of as a particular "screen" within EmulationStation. Vi An *element* is a particular visual element, such as an image or a piece of text. You can either modify an element that already exists for a particular view (as is done in the "description" example), like this: ```xml - - ... define properties here ... - + + ... define properties here ... + ``` Or, you can create your own elements by adding `extra="true"` (as is done in the "my_image" example) like this: ```xml - - ... define properties here ... - + + ... define properties here ... + ``` "Extra" elements will be drawn in the order they are defined (so define backgrounds first!). When they get drawn relative to the pre-existing elements depends on the view. Make sure "extra" element names do not clash with existing element names! An easy way to protect against this is to just start all your extra element names with some prefix like "e_". @@ -106,7 +109,7 @@ Or, you can create your own elements by adding `extra="true"` (as is done in the *Properties* control how a particular *element* looks - for example, its position, size, image path, etc. The type of the property determines what kinds of values you can use. You can read about the types below in the "Reference" section. Properties are defined like this: ```xml - ValueHere + ValueHere ``` @@ -124,39 +127,39 @@ You can include theme files within theme files, similar to `#include` in C (thou `~/.emulationstation/all_themes.xml`: ```xml - 5 - - - ./all_themes/myfont.ttf - 00FF00 - - + 6 + + + ./all_themes/myfont.ttf + 00FF00 + + ``` `~/.emulationstation/snes/theme.xml`: ```xml - 5 - ./../all_themes.xml - - - FF0000 - - + 6 + ./../all_themes.xml + + + FF0000 + + ``` Is equivalent to this `snes/theme.xml`: ```xml - 5 - - - ./all_themes/myfont.ttf - FF0000 - - + 6 + + + ./all_themes/myfont.ttf + FF0000 + + ``` @@ -170,45 +173,45 @@ Sometimes you want to apply the same properties to the same elements across mult ```xml - 5 - - - ./snes_art/snes_header.png - - - - - ./snes_art/snes_header_detailed.png - - + 6 + + + ./snes_art/snes_header.png + + + + + ./snes_art/snes_header_detailed.png + + ``` This is equivalent to: ```xml - 5 - - - ./snes_art/snes_header.png - - - - - ./snes_art/snes_header_detailed.png - - - - - ./snes_art/snes_header.png - - - - - ./snes_art/snes_header.png - - - ... and any other view that might try to look up "logo" ... + 6 + + + ./snes_art/snes_header.png + + + + + ./snes_art/snes_header_detailed.png + + + + + ./snes_art/snes_header.png + + + + + ./snes_art/snes_header.png + + + ... and any other view that might try to look up "logo" ... ``` @@ -220,12 +223,12 @@ You can theme multiple elements *of the same type* simultaneously. The `name` a ```xml - 5 + 6 - - - 48474D + + + 48474D @@ -234,32 +237,32 @@ You can theme multiple elements *of the same type* simultaneously. The `name` a Which is equivalent to: ```xml - 5 + 6 - - 48474D - - - 48474D - - - 48474D - - - 48474D - - - 48474D - - - 48474D - - - 48474D - - - 48474D - + + 48474D + + + 48474D + + + 48474D + + + 48474D + + + 48474D + + + 48474D + + + 48474D + + + 48474D + ``` @@ -287,32 +290,32 @@ Example navigationsounds.xml, to be included from the main theme file: ```xml - 5 - - - - ./core/sounds/systembrowse.wav - - - ./core/sounds/quicksysselect.wav - - - ./core/sounds/select.wav - - - ./core/sounds/back.wav - - - ./core/sounds/scroll.wav - - - ./core/sounds/favorite.wav - - - ./core/sounds/launch.wav - - - + 6 + + + + ./core/sounds/systembrowse.wav + + + ./core/sounds/quicksysselect.wav + + + ./core/sounds/select.wav + + + ./core/sounds/back.wav + + + ./core/sounds/scroll.wav + + + ./core/sounds/favorite.wav + + + ./core/sounds/launch.wav + + + ``` @@ -329,33 +332,33 @@ Example navigationsounds.xml, to be included from the main theme file: * `textlist name="gamelist"` - 20 * `imagegrid name="gamegrid"` - 20 * Media - * `image name="md_image"` - 30 - * `video name="md_video"` - 30 - * `image name="md_marquee"` - 35 + * `image name="md_image"` - 30 + * `video name="md_video"` - 30 + * `image name="md_marquee"` - 35 * Metadata - 40 - * Labels - * `text name="md_lbl_rating"` - * `text name="md_lbl_releasedate"` - * `text name="md_lbl_developer"` - * `text name="md_lbl_publisher"` - * `text name="md_lbl_genre"` - * `text name="md_lbl_players"` - * `text name="md_lbl_lastplayed"` - * `text name="md_lbl_playcount"` - * Values - * `rating name="md_rating"` - * `datetime name="md_releasedate"` - * `text name="md_developer"` - * `text name="md_publisher"` - * `text name="md_genre"` - * `text name="md_players"` - * `datetime name="md_lastplayed"` - * `text name="md_playcount"` - * `text name="md_description"` - * `text name="md_name"` + * Labels + * `text name="md_lbl_rating"` + * `text name="md_lbl_releasedate"` + * `text name="md_lbl_developer"` + * `text name="md_lbl_publisher"` + * `text name="md_lbl_genre"` + * `text name="md_lbl_players"` + * `text name="md_lbl_lastplayed"` + * `text name="md_lbl_playcount"` + * Values + * `rating name="md_rating"` + * `datetime name="md_releasedate"` + * `text name="md_developer"` + * `text name="md_publisher"` + * `text name="md_genre"` + * `text name="md_players"` + * `datetime name="md_lastplayed"` + * `text name="md_playcount"` + * `text name="md_description"` + * `text name="md_name"` * System Logo/Text - 50 - * `text name="logoText"` - * `image name="logo"` + * `text name="logoText"` + * `image name="logo"` ### Theme variables @@ -374,7 +377,7 @@ System variables are system specific and are derived from the values in es_syste Variables can also be defined in the theme. ``` - 8b0000 + 8b0000 ``` @@ -398,186 +401,186 @@ Reference #### basic * `helpsystem name="help"` - ALL - - The help system style for this view. + - The help system style for this view. * `image name="background"` - ALL - - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). + - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). * `text name="logoText"` - ALL - - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. * `image name="logo"` - ALL - - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. + - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. * `textlist name="gamelist"` - ALL - - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default. + - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Centered by default. --- #### detailed * `helpsystem name="help"` - ALL - - The help system style for this view. + - The help system style for this view. * `image name="background"` - ALL - - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). + - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). * `text name="logoText"` - ALL - - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. * `image name="logo"` - ALL - - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. + - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. * `textlist name="gamelist"` - ALL - - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default. + - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default. * Metadata - * Labels - * `text name="md_lbl_rating"` - ALL - * `text name="md_lbl_releasedate"` - ALL - * `text name="md_lbl_developer"` - ALL - * `text name="md_lbl_publisher"` - ALL - * `text name="md_lbl_genre"` - ALL - * `text name="md_lbl_players"` - ALL - * `text name="md_lbl_lastplayed"` - ALL - * `text name="md_lbl_playcount"` - ALL + * Labels + * `text name="md_lbl_rating"` - ALL + * `text name="md_lbl_releasedate"` - ALL + * `text name="md_lbl_developer"` - ALL + * `text name="md_lbl_publisher"` - ALL + * `text name="md_lbl_genre"` - ALL + * `text name="md_lbl_players"` - ALL + * `text name="md_lbl_lastplayed"` - ALL + * `text name="md_lbl_playcount"` - ALL - * Values - * All values will follow to the right of their labels if a position isn't specified. + * Values + * All values will follow to the right of their labels if a position isn't specified. - * `image name="md_image"` - POSITION | SIZE | Z_INDEX - - Path is the "image" metadata for the currently selected game. - * `rating name="md_rating"` - ALL - - The "rating" metadata. - * `datetime name="md_releasedate"` - ALL - - The "releasedate" metadata. - * `text name="md_developer"` - ALL - - The "developer" metadata. - * `text name="md_publisher"` - ALL - - The "publisher" metadata. - * `text name="md_genre"` - ALL - - The "genre" metadata. - * `text name="md_players"` - ALL - - The "players" metadata (number of players the game supports). - * `datetime name="md_lastplayed"` - ALL - - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). - * `text name="md_playcount"` - ALL - - The "playcount" metadata (number of times the game has been played). - * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX - - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. - * `text name="md_name"` - ALL - - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default + * `image name="md_image"` - POSITION | SIZE | Z_INDEX + - Path is the "image" metadata for the currently selected game. + * `rating name="md_rating"` - ALL + - The "rating" metadata. + * `datetime name="md_releasedate"` - ALL + - The "releasedate" metadata. + * `text name="md_developer"` - ALL + - The "developer" metadata. + * `text name="md_publisher"` - ALL + - The "publisher" metadata. + * `text name="md_genre"` - ALL + - The "genre" metadata. + * `text name="md_players"` - ALL + - The "players" metadata (number of players the game supports). + * `datetime name="md_lastplayed"` - ALL + - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). + * `text name="md_playcount"` - ALL + - The "playcount" metadata (number of times the game has been played). + * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX + - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. + * `text name="md_name"` - ALL + - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default #### video * `helpsystem name="help"` - ALL - - The help system style for this view. + - The help system style for this view. * `image name="background"` - ALL - - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). + - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). * `text name="logoText"` - ALL - - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. * `image name="logo"` - ALL - - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. + - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. * `textlist name="gamelist"` - ALL - - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default. + - The gamelist. `primaryColor` is for games, `secondaryColor` is for folders. Left aligned by default. * Metadata - * Labels - * `text name="md_lbl_rating"` - ALL - * `text name="md_lbl_releasedate"` - ALL - * `text name="md_lbl_developer"` - ALL - * `text name="md_lbl_publisher"` - ALL - * `text name="md_lbl_genre"` - ALL - * `text name="md_lbl_players"` - ALL - * `text name="md_lbl_lastplayed"` - ALL - * `text name="md_lbl_playcount"` - ALL + * Labels + * `text name="md_lbl_rating"` - ALL + * `text name="md_lbl_releasedate"` - ALL + * `text name="md_lbl_developer"` - ALL + * `text name="md_lbl_publisher"` - ALL + * `text name="md_lbl_genre"` - ALL + * `text name="md_lbl_players"` - ALL + * `text name="md_lbl_lastplayed"` - ALL + * `text name="md_lbl_playcount"` - ALL - * Values - * All values will follow to the right of their labels if a position isn't specified. + * Values + * All values will follow to the right of their labels if a position isn't specified. - * `image name="md_image"` - POSITION | SIZE | Z_INDEX - - Path is the "image" metadata for the currently selected game. - * `image name="md_marquee"` - POSITION | SIZE | Z_INDEX - - Path is the "marquee" metadata for the currently selected game. - * `video name="md_video"` - POSITION | SIZE | Z_INDEX - - Path is the "video" metadata for the currently selected game. - * `rating name="md_rating"` - ALL - - The "rating" metadata. - * `datetime name="md_releasedate"` - ALL - - The "releasedate" metadata. - * `text name="md_developer"` - ALL - - The "developer" metadata. - * `text name="md_publisher"` - ALL - - The "publisher" metadata. - * `text name="md_genre"` - ALL - - The "genre" metadata. - * `text name="md_players"` - ALL - - The "players" metadata (number of players the game supports). - * `datetime name="md_lastplayed"` - ALL - - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). - * `text name="md_playcount"` - ALL - - The "playcount" metadata (number of times the game has been played). - * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX - - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. - * `text name="md_name"` - ALL - - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default + * `image name="md_image"` - POSITION | SIZE | Z_INDEX + - Path is the "image" metadata for the currently selected game. + * `image name="md_marquee"` - POSITION | SIZE | Z_INDEX + - Path is the "marquee" metadata for the currently selected game. + * `video name="md_video"` - POSITION | SIZE | Z_INDEX + - Path is the "video" metadata for the currently selected game. + * `rating name="md_rating"` - ALL + - The "rating" metadata. + * `datetime name="md_releasedate"` - ALL + - The "releasedate" metadata. + * `text name="md_developer"` - ALL + - The "developer" metadata. + * `text name="md_publisher"` - ALL + - The "publisher" metadata. + * `text name="md_genre"` - ALL + - The "genre" metadata. + * `text name="md_players"` - ALL + - The "players" metadata (number of players the game supports). + * `datetime name="md_lastplayed"` - ALL + - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). + * `text name="md_playcount"` - ALL + - The "playcount" metadata (number of times the game has been played). + * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX + - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. + * `text name="md_name"` - ALL + - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default --- #### grid * `helpsystem name="help"` - ALL - - The help system style for this view. + - The help system style for this view. * `image name="background"` - ALL - - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). + - This is a background image that exists for convenience. It goes from (0, 0) to (1, 1). * `text name="logoText"` - ALL - - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. + - Displays the name of the system. Only present if no "logo" image is specified. Displayed at the top of the screen, centered by default. * `image name="logo"` - ALL - - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. + - A header image. If a non-empty `path` is specified, `text name="logoText"` will be hidden and this image will be, by default, displayed roughly in its place. * `imagegrid name="gamegrid"` - ALL - - The gamegrid. The number of tile displayed is controlled by its size, margin and the default tile max size. + - The gamegrid. The number of tile displayed is controlled by its size, margin and the default tile max size. * `gridtile name="default"` - ALL - Note that many of the default gridtile parameters change the selected gridtile parameters if they are not explicitly set by the theme. For example, changing the background image of the default gridtile also change the background image of the selected gridtile. Refer to the gridtile documentation for more informations. * `gridtile name="selected"` - ALL - See default gridtile description right above. * Metadata - * Labels - * `text name="md_lbl_rating"` - ALL - * `text name="md_lbl_releasedate"` - ALL - * `text name="md_lbl_developer"` - ALL - * `text name="md_lbl_publisher"` - ALL - * `text name="md_lbl_genre"` - ALL - * `text name="md_lbl_players"` - ALL - * `text name="md_lbl_lastplayed"` - ALL - * `text name="md_lbl_playcount"` - ALL + * Labels + * `text name="md_lbl_rating"` - ALL + * `text name="md_lbl_releasedate"` - ALL + * `text name="md_lbl_developer"` - ALL + * `text name="md_lbl_publisher"` - ALL + * `text name="md_lbl_genre"` - ALL + * `text name="md_lbl_players"` - ALL + * `text name="md_lbl_lastplayed"` - ALL + * `text name="md_lbl_playcount"` - ALL - * Values - * All values will follow to the right of their labels if a position isn't specified. + * Values + * All values will follow to the right of their labels if a position isn't specified. - * `rating name="md_rating"` - ALL - - The "rating" metadata. - * `datetime name="md_releasedate"` - ALL - - The "releasedate" metadata. - * `text name="md_developer"` - ALL - - The "developer" metadata. - * `text name="md_publisher"` - ALL - - The "publisher" metadata. - * `text name="md_genre"` - ALL - - The "genre" metadata. - * `text name="md_players"` - ALL - - The "players" metadata (number of players the game supports). - * `datetime name="md_lastplayed"` - ALL - - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). - * `text name="md_playcount"` - ALL - - The "playcount" metadata (number of times the game has been played). - * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX - - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. - * `text name="md_name"` - ALL - - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default + * `rating name="md_rating"` - ALL + - The "rating" metadata. + * `datetime name="md_releasedate"` - ALL + - The "releasedate" metadata. + * `text name="md_developer"` - ALL + - The "developer" metadata. + * `text name="md_publisher"` - ALL + - The "publisher" metadata. + * `text name="md_genre"` - ALL + - The "genre" metadata. + * `text name="md_players"` - ALL + - The "players" metadata (number of players the game supports). + * `datetime name="md_lastplayed"` - ALL + - The "lastplayed" metadata. Displayed as a string representing the time relative to "now" (e.g. "3 hours ago"). + * `text name="md_playcount"` - ALL + - The "playcount" metadata (number of times the game has been played). + * `text name="md_description"` - POSITION | SIZE | FONT_PATH | FONT_SIZE | COLOR | Z_INDEX + - Text is the "desc" metadata. If no `pos`/`size` is specified, will move and resize to fit under the lowest label and reach to the bottom of the screen. + * `text name="md_name"` - ALL + - The "name" metadata (the game name). Unlike the others metadata fields, the name is positioned offscreen by default --- #### system * `helpsystem name="help"` - ALL - - The help system style for this view. + - The help system style for this view. * `carousel name="systemcarousel"` -ALL - - The system logo carousel + - The system logo carousel * `image name="logo"` - PATH | COLOR - - A logo image, to be displayed in the system logo carousel. + - A logo image, to be displayed in the system logo carousel. * `text name="logoText"` - FONT_PATH | COLOR | FORCE_UPPERCASE | LINE_SPACING | TEXT - - A logo text, to be displayed system name in the system logo carousel when no logo is available. + - A logo text, to be displayed system name in the system logo carousel when no logo is available. * `text name="systemInfo"` - ALL - - Displays details of the system currently selected in the carousel. + - Displays details of the system currently selected in the carousel. * You can use extra elements (elements with `extra="true"`) to add your own backgrounds, etc. They will be displayed behind the carousel, and scroll relative to the carousel. @@ -606,27 +609,27 @@ Can be created as an extra. * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. - - If only one axis is specified (and the other is zero), the other will be automatically calculated in accordance with the image's aspect ratio. + - If only one axis is specified (and the other is zero), the other will be automatically calculated in accordance with the image's aspect ratio. * `maxSize` - type: NORMALIZED_PAIR. - - The image will be resized as large as possible so that it fits within this size and maintains its aspect ratio. Use this instead of `size` when you don't know what kind of image you're using so it doesn't get grossly oversized on one axis (e.g. with a game's image metadata). + - The image will be resized as large as possible so that it fits within this size and maintains its aspect ratio. Use this instead of `size` when you don't know what kind of image you're using so it doesn't get grossly oversized on one axis (e.g. with a game's image metadata). * `origin` - type: NORMALIZED_PAIR. - - Where on the image `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the image exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the image `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the image exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `rotation` - type: FLOAT. - - angle in degrees that the image should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. + - angle in degrees that the image should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. * `rotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the image will be rotated. Defaults to `0.5 0.5`. + - Point around which the image will be rotated. Defaults to `0.5 0.5`. * `path` - type: PATH. - - Path to the image file. Most common extensions are supported (including .jpg, .png, and unanimated .gif). + - Path to the image file. Most common extensions are supported (including .jpg, .png, and unanimated .gif). * `default` - type: PATH. - - Path to default image file. Default image will be displayed when selected game does not have an image. + - Path to default image file. Default image will be displayed when selected game does not have an image. * `tile` - type: BOOLEAN. - - If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds. + - If true, the image will be tiled instead of stretched to fit its size. Useful for backgrounds. * `color` - type: COLOR. - - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. You can also control the transparency of an image with `FFFFFFAA` - keeping all the pixels their normal color and only affecting the alpha channel. + - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. You can also control the transparency of an image with `FFFFFFAA` - keeping all the pixels their normal color and only affecting the alpha channel. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. #### imagegrid @@ -645,7 +648,7 @@ Can be created as an extra. * `folderImage` - type: PATH. - The default image used for folders which doesn't have an image. * `imageSource` - type: STRING. - - Selects the image to display. `thumbnail` by default, can also be set to `image` or `marquee`. + - Selects the image to display. `thumbnail` by default, can also be set to `image` or `marquee`. * `scrollDirection` - type: STRING. - `vertical` by default, can also be set to `horizontal`. Not that in `horizontal` mod, the tiles are ordered from top to bottom, then from left to right. * `centerSelection` - type: BOOLEAN. @@ -680,27 +683,27 @@ Can be created as an extra. * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. - - If only one axis is specified (and the other is zero), the other will be automatically calculated in accordance with the video's aspect ratio. + - If only one axis is specified (and the other is zero), the other will be automatically calculated in accordance with the video's aspect ratio. * `maxSize` - type: NORMALIZED_PAIR. - - The video will be resized as large as possible so that it fits within this size and maintains its aspect ratio. Use this instead of `size` when you don't know what kind of video you're using so it doesn't get grossly oversized on one axis (e.g. with a game's video metadata). + - The video will be resized as large as possible so that it fits within this size and maintains its aspect ratio. Use this instead of `size` when you don't know what kind of video you're using so it doesn't get grossly oversized on one axis (e.g. with a game's video metadata). * `origin` - type: NORMALIZED_PAIR. - - Where on the image `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the image exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the image `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the image exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `rotation` - type: FLOAT. - - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. + - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. * `rotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the text will be rotated. Defaults to `0.5 0.5`. + - Point around which the text will be rotated. Defaults to `0.5 0.5`. * `delay` - type: FLOAT. Default is false. - - Delay in seconds before video will start playing. + - Delay in seconds before video will start playing. * `default` - type: PATH. - - Path to default video file. Default video will be played when selected game does not have a video. + - Path to default video file. Default video will be played when selected game does not have a video. * `showSnapshotNoVideo` - type: BOOLEAN - - If true, image will be shown when selected game does not have a video and no `default` video is configured. + - If true, image will be shown when selected game does not have a video and no `default` video is configured. * `showSnapshotDelay` - type: BOOLEAN - - If true, playing of video will be delayed for `delayed` seconds, when game is selected. + - If true, playing of video will be delayed for `delayed` seconds, when game is selected. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. #### text @@ -708,64 +711,64 @@ Can be created as an extra. * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. - - Possible combinations: - - `0 0` - automatically size so text fits on one line (expanding horizontally). - - `w 0` - automatically wrap text so it doesn't go beyond `w` (expanding vertically). - - `w h` - works like a "text box." If `h` is non-zero and `h` <= `fontSize` (implying it should be a single line of text), text that goes beyond `w` will be truncated with an elipses (...). + - Possible combinations: + - `0 0` - automatically size so text fits on one line (expanding horizontally). + - `w 0` - automatically wrap text so it doesn't go beyond `w` (expanding vertically). + - `w h` - works like a "text box." If `h` is non-zero and `h` <= `fontSize` (implying it should be a single line of text), text that goes beyond `w` will be truncated with an elipses (...). * `origin` - type: NORMALIZED_PAIR. - - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `rotation` - type: FLOAT. - - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. + - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. * `rotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the text will be rotated. Defaults to `0.5 0.5`. + - Point around which the text will be rotated. Defaults to `0.5 0.5`. * `text` - type: STRING. * `color` - type: COLOR. * `backgroundColor` - type: COLOR; * `fontPath` - type: PATH. - - Path to a truetype font (.ttf). + - Path to a truetype font (.ttf). * `fontSize` - type: FLOAT. - - Size of the font as a percentage of screen height (e.g. for a value of `0.1`, the text's height would be 10% of the screen height). + - Size of the font as a percentage of screen height (e.g. for a value of `0.1`, the text's height would be 10% of the screen height). * `alignment` - type: STRING. - - Valid values are "left", "center", or "right". Controls alignment on the X axis. "center" will also align vertically. + - Valid values are "left", "center", or "right". Controls alignment on the X axis. "center" will also align vertically. * `forceUppercase` - type: BOOLEAN. Draw text in uppercase. * `lineSpacing` - type: FLOAT. Controls the space between lines (as a multiple of font height). Default is 1.5. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. #### textlist * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. * `origin` - type: NORMALIZED_PAIR. - - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `selectorColor` - type: COLOR. - - Color of the "selector bar." + - Color of the "selector bar." * `selectorImagePath` - type: PATH. - - Path to image to render in place of "selector bar." + - Path to image to render in place of "selector bar." * `selectorImageTile` - type: BOOLEAN. - - If true, the selector image will be tiled instead of stretched to fit its size. + - If true, the selector image will be tiled instead of stretched to fit its size. * `selectorHeight` - type: FLOAT. - - Height of the "selector bar". + - Height of the "selector bar". * `selectorOffsetY` - type: FLOAT. - - Allows moving of the "selector bar" up or down from its computed position. Useful for fine tuning the position of the "selector bar" relative to the text. + - Allows moving of the "selector bar" up or down from its computed position. Useful for fine tuning the position of the "selector bar" relative to the text. * `selectedColor` - type: COLOR. - - Color of the highlighted entry text. + - Color of the highlighted entry text. * `primaryColor` - type: COLOR. - - Primary color; what this means depends on the text list. For example, for game lists, it is the color of a game. + - Primary color; what this means depends on the text list. For example, for game lists, it is the color of a game. * `secondaryColor` - type: COLOR. - - Secondary color; what this means depends on the text list. For example, for game lists, it is the color of a folder. + - Secondary color; what this means depends on the text list. For example, for game lists, it is the color of a folder. * `fontPath` - type: PATH. * `fontSize` - type: FLOAT. * `alignment` - type: STRING. - - Valid values are "left", "center", or "right". Controls alignment on the X axis. + - Valid values are "left", "center", or "right". Controls alignment on the X axis. * `horizontalMargin` - type: FLOAT. - - Horizontal offset for text from the alignment point. If `alignment` is "left", offsets the text to the right. If `alignment` is "right", offsets text to the left. No effect if `alignment` is "center". Given as a percentage of the element's parent's width (same unit as `size`'s X value). + - Horizontal offset for text from the alignment point. If `alignment` is "left", offsets the text to the right. If `alignment` is "right", offsets text to the left. No effect if `alignment` is "center". Given as a percentage of the element's parent's width (same unit as `size`'s X value). * `forceUppercase` - type: BOOLEAN. Draw text in uppercase. * `lineSpacing` - type: FLOAT. Controls the space between lines (as a multiple of font height). Default is 1.5. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. #### ninepatch @@ -775,7 +778,7 @@ Can be created as an extra. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. 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). @@ -783,65 +786,65 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. - - Only one value is actually used. The other value should be zero. (e.g. specify width OR height, but not both. This is done to maintain the aspect ratio.) + - Only one value is actually used. The other value should be zero. (e.g. specify width OR height, but not both. This is done to maintain the aspect ratio.) * `origin` - type: NORMALIZED_PAIR. - - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `rotation` - type: FLOAT. - - angle in degrees that the rating should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. + - angle in degrees that the rating should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. * `rotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the rating will be rotated. Defaults to `0.5 0.5`. + - Point around which the rating will be rotated. Defaults to `0.5 0.5`. * `filledPath` - type: PATH. - - Path to the "filled star" image. Image must be square (width equals height). + - Path to the "filled star" image. Image must be square (width equals height). * `unfilledPath` - type: PATH. - - Path to the "unfilled star" image. Image must be square (width equals height). + - Path to the "unfilled star" image. Image must be square (width equals height). * `color` - type: COLOR. - - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. You can also control the transparency of an image with `FFFFFFAA` - keeping all the pixels their normal color and only affecting the alpha channel. + - Multiply each pixel's color by this color. For example, an all-white image with `FF0000` would become completely red. You can also control the transparency of an image with `FFFFFFAA` - keeping all the pixels their normal color and only affecting the alpha channel. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. #### datetime * `pos` - type: NORMALIZED_PAIR. * `size` - type: NORMALIZED_PAIR. - - Possible combinations: - - `0 0` - automatically size so text fits on one line (expanding horizontally). - - `w 0` - automatically wrap text so it doesn't go beyond `w` (expanding vertically). - - `w h` - works like a "text box." If `h` is non-zero and `h` <= `fontSize` (implying it should be a single line of text), text that goes beyond `w` will be truncated with an elipses (...). + - Possible combinations: + - `0 0` - automatically size so text fits on one line (expanding horizontally). + - `w 0` - automatically wrap text so it doesn't go beyond `w` (expanding vertically). + - `w h` - works like a "text box." If `h` is non-zero and `h` <= `fontSize` (implying it should be a single line of text), text that goes beyond `w` will be truncated with an elipses (...). * `origin` - type: NORMALIZED_PAIR. - - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `rotation` - type: FLOAT. - - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. + - angle in degrees that the text should be rotated. Positive values will rotate clockwise, negative values will rotate counterclockwise. * `rotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the text will be rotated. Defaults to `0.5 0.5`. + - Point around which the text will be rotated. Defaults to `0.5 0.5`. * `color` - type: COLOR. * `backgroundColor` - type: COLOR; * `fontPath` - type: PATH. - - Path to a truetype font (.ttf). + - Path to a truetype font (.ttf). * `fontSize` - type: FLOAT. - - Size of the font as a percentage of screen height (e.g. for a value of `0.1`, the text's height would be 10% of the screen height). + - Size of the font as a percentage of screen height (e.g. for a value of `0.1`, the text's height would be 10% of the screen height). * `alignment` - type: STRING. - - Valid values are "left", "center", or "right". Controls alignment on the X axis. "center" will also align vertically. + - Valid values are "left", "center", or "right". Controls alignment on the X axis. "center" will also align vertically. * `forceUppercase` - type: BOOLEAN. Draw text in uppercase. * `lineSpacing` - type: FLOAT. Controls the space between lines (as a multiple of font height). Default is 1.5. * `visible` - type: BOOLEAN. - If true, component will be rendered, otherwise rendering will be skipped. Can be used to hide elements from a particular view. * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. * `displayRelative` - type: BOOLEAN. Renders the datetime as a a relative string (ex: 'x days ago') * `format` - type: STRING. Specifies format for rendering datetime. - - %Y: The year, including the century (1900) - - %m: The month number [01,12] - - %d: The day of the month [01,31] - - %H: The hour (24-hour clock) [00,23] - - %M: The minute [00,59] - - %S: The second [00,59] + - %Y: The year, including the century (1900) + - %m: The month number [01,12] + - %d: The day of the month [01,31] + - %H: The hour (24-hour clock) [00,23] + - %M: The minute [00,59] + - %S: The second [00,59] #### helpsystem * `pos` - type: NORMALIZED_PAIR. Default is "0.012 0.9515" * `origin` - type: NORMALIZED_PAIR. - - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. + - Where on the component `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the component exactly in the middle of the screen. * `textColor` - type: COLOR. Default is 777777FF. * `iconColor` - type: COLOR. Default is 777777FF. * `fontPath` - type: PATH. @@ -850,37 +853,37 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice #### carousel * `type` - type: STRING. - - Sets the scoll direction of the carousel. - - Accepted values are "horizontal", "vertical", "horizontal_wheel" or "vertical_wheel". - - Default is "horizontal". + - Sets the scoll direction of the carousel. + - Accepted values are "horizontal", "vertical", "horizontal_wheel" or "vertical_wheel". + - Default is "horizontal". * `size` - type: NORMALIZED_PAIR. Default is "1 0.2325" * `pos` - type: NORMALIZED_PAIR. Default is "0 0.38375". * `origin` - type: NORMALIZED_PAIR. - - Where on the carousel `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the carousel exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. + - Where on the carousel `pos` refers to. For example, an origin of `0.5 0.5` and a `pos` of `0.5 0.5` would place the carousel exactly in the middle of the screen. If the "POSITION" and "SIZE" attributes are themable, "ORIGIN" is implied. * `color` - type: COLOR. - - Controls the color of the carousel background. - - Default is FFFFFFD8 + - Controls the color of the carousel background. + - Default is FFFFFFD8 * `logoSize` - type: NORMALIZED_PAIR. Default is "0.25 0.155" * `logoScale` - type: FLOAT. - - Selected logo is increased in size by this scale - - Default is 1.2 + - Selected logo is increased in size by this scale + - Default is 1.2 * `logoRotation` - type: FLOAT. - - Angle in degrees that the logos should be rotated. Value should be positive. - - Default is 7.5 - - This property only applies when `type` is "horizontal_wheel" or "vertical_wheel". + - Angle in degrees that the logos should be rotated. Value should be positive. + - Default is 7.5 + - This property only applies when `type` is "horizontal_wheel" or "vertical_wheel". * `logoRotationOrigin` - type: NORMALIZED_PAIR. - - Point around which the logos will be rotated. Defaults to `-5 0.5`. - - This property only applies when `type` is "horizontal_wheel" or "vertical_wheel". + - Point around which the logos will be rotated. Defaults to `-5 0.5`. + - This property only applies when `type` is "horizontal_wheel" or "vertical_wheel". * `logoAlignment` - type: STRING. - - Sets the alignment of the logos relative to the carousel. - - Accepted values are "top", "bottom" or "center" when `type` is "horizontal" or "horizontal_wheel". - - Accepted values are "left", "right" or "center" when `type` is "vertical" or "vertical_wheel". - - Default is "center" + - Sets the alignment of the logos relative to the carousel. + - Accepted values are "top", "bottom" or "center" when `type` is "horizontal" or "horizontal_wheel". + - Accepted values are "left", "right" or "center" when `type` is "vertical" or "vertical_wheel". + - Default is "center" * `maxLogoCount` - type: FLOAT. - - Sets the number of logos to display in the carousel. - - Default is 3 + - Sets the number of logos to display in the carousel. + - Default is 3 * `zIndex` - type: FLOAT. - - z-index value for component. Components will be rendered in order of z-index value from low to high. + - z-index value for component. Components will be rendered in order of z-index value from low to high. The help system is a special element that displays a context-sensitive list of actions the user can take at any time. You should try and keep the position constant throughout every screen. Keep in mind the "default" settings (including position) are used whenever the user opens a menu. diff --git a/es-app/src/SystemData.cpp b/es-app/src/SystemData.cpp index dfb9b62ed..1bc64fe00 100644 --- a/es-app/src/SystemData.cpp +++ b/es-app/src/SystemData.cpp @@ -117,7 +117,7 @@ bool SystemData::populateFolder(FileData* folder) bool showHidden = Settings::getInstance()->getBool("ShowHiddenFiles"); Utils::FileSystem::stringList dirContent = Utils::FileSystem::getDirContent(folderPath); - // If system directory exists but contain no games, return as error. + // If system directory exists but contains no games, return as error. if (dirContent.size() == 0) return false; @@ -380,7 +380,7 @@ std::string SystemData::getConfigPath(bool forWrite) if (forWrite || Utils::FileSystem::exists(path)) return path; - return "/etc/emulationstation/es_systems.cfg"; + return ""; } bool SystemData::isVisible() @@ -430,13 +430,15 @@ std::string SystemData::getGamelistPath(bool forWrite) const filePath = Utils::FileSystem::getHomePath() + "/.emulationstation/gamelists/" + mName + "/gamelist.xml"; - // Make sure the directory exists if we're going to write to it, or crashes will happen. + + // Make sure the directory exists if we're going to write to it, + // or crashes will happen. if (forWrite) Utils::FileSystem::createDirectory(Utils::FileSystem::getParent(filePath)); if (forWrite || Utils::FileSystem::exists(filePath)) return filePath; - return "/etc/emulationstation/gamelists/" + mName + "/gamelist.xml"; + return ""; } std::string SystemData::getThemePath() const diff --git a/es-app/src/scrapers/Scraper.h b/es-app/src/scrapers/Scraper.h index 775d33f42..e6870615f 100644 --- a/es-app/src/scrapers/Scraper.h +++ b/es-app/src/scrapers/Scraper.h @@ -197,9 +197,9 @@ private: int mMaxHeight; }; -// About the same as: -// "~/.emulationstation/downloaded_images/[system_name]/[game_name].[url's extension]". -// Will create the "downloaded_images" and "subdirectory" directories if they do not exist. +// Downloads to the home directory, using this subdirectory structure: +// ".emulationstation/downloaded_media/[system_name]/[media_type]/[game_name].[file_extension]". +// The subdirectories are automatically created if they do not exist. std::string getSaveAsPath(const ScraperSearchParams& params, const std::string& filetypeSubdirectory, const std::string& url);