documentation for the badges

This commit is contained in:
Sophia Hadash 2021-10-11 11:42:21 +02:00
parent a93b975ca0
commit 24a480cf73

View file

@ -466,6 +466,8 @@ or to specify only a portion of the value of a theme property:
- The "genre" metadata.
* `text name="md_players"` - ALL
- The "players" metadata (number of players the game supports).
* `badges name="md_badges"` - ALL
- The "badges" metadata. Displayed as a group of badges that indicate boolean metadata such as favorite, broken.
* `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
@ -521,6 +523,8 @@ or to specify only a portion of the value of a theme property:
- The "genre" metadata.
* `text name="md_players"` - ALL
- The "players" metadata (number of players the game supports).
* `badges name="md_badges"` - ALL
- The "badges" metadata. Displayed as a group of badges that indicate boolean metadata such as favorite, broken.
* `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
@ -576,6 +580,8 @@ or to specify only a portion of the value of a theme property:
- The "genre" metadata.
* `text name="md_players"` - ALL
- The "players" metadata (number of players the game supports).
* `badges name="md_badges"` - ALL
- The "badges" metadata. Displayed as a group of badges that indicate boolean metadata such as favorite, broken.
* `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
@ -909,6 +915,45 @@ EmulationStation borrows the concept of "nine patches" from Android (or "9-Slice
`button_back_XBOX360`,
`button_start_XBOX360`.
#### badges
* `pos` - type: NORMALIZED_PAIR.
* `size` - type: NORMALIZED_PAIR.
- Possible combinations:
- `w h` - Dimensions of the badges container. The badges will be scaled to fit within these dimensions.
* `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 themeable, "ORIGIN" is implied.
* `direction` - type: STRING.
- Valid values are "row" or "column". Controls the primary layout direction (line axis) for the badges. Lines will fill up in the specified direction.
* `align` - type: STRING.
- Valid values are "start", "center", "end", or "stretch". Controls orthogonal alignment to the line axis. "stretch" will stretch the badges to fill-up the line width.
* `itemsPerLine` - type: FLOAT.
- Number of badges that fit on a line. When more badges are available a new line will be started.
* `lines` - type: FLOAT.
- The number of lines available.
* `itemMargin` - type: NORMALIZED_PAIR.
- The margins between badges. Possible combinations:
- `x y` - horizontal and vertical margins.
* `slots` - type: STRING.
- The badge types that should be displayed. Should be specified as a dist of strings separated by spaces. The order will be followed when placing badges on the screen.
- Available badges are:
- "favorite": Will be shown when the game is marked as favorite.
- "completed": Will be shown when the game is marked as completed.
- "kidgame": Will be shown when the game is marked as a kids game.
- "broken": Will be shown when the game is marked as broken.
- "altemulator": Will be shown when an alternative emulator is setup for the game.
* `customBadgeIcon` - type: PATH.
- A badge icon override. Specify the badge type in the attribute `badge`. The available badges are:
`favorite`,
`completed`,
`kidgame`,
`broken`,
`altemulator`
* `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.
#### carousel
* `type` - type: STRING.