mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-04-12 00:47:49 -04:00
skin: add new %pP tag (playlist progress as percentage)
This new tag returns the position in the playlist as a percent. The main usecase for this is to use it as a bar tag, allowing themes to visually present playlist progress. Change-Id: I0eb001e7458d97b8a0db39f3980d9c283bc8806b
This commit is contained in:
parent
1c429e2209
commit
41d5ca3c48
8 changed files with 35 additions and 1 deletions
|
|
@ -163,6 +163,7 @@ static const struct tag_info legal_tags[] =
|
|||
TAG(SKIN_TOKEN_TRACK_STARTING, "pS" , "|D", SKIN_REFRESH_DYNAMIC),
|
||||
TAG(SKIN_TOKEN_TRACK_ENDING, "pE" , "|D", SKIN_REFRESH_DYNAMIC),
|
||||
TAG(SKIN_TOKEN_PLAYLIST_POSITION, "pp", "", SKIN_REFRESH_STATIC),
|
||||
TAG(SKIN_TOKEN_PLAYLIST_PERCENT, "pP", BAR_PARAMS, SKIN_REFRESH_STATIC),
|
||||
TAG(SKIN_TOKEN_PLAYLIST_ENTRIES, "pe", "", SKIN_REFRESH_STATIC),
|
||||
TAG(SKIN_TOKEN_PLAYLIST_NAME, "pn", "", SKIN_REFRESH_STATIC),
|
||||
TAG(SKIN_TOKEN_PLAYLIST_SHUFFLE, "ps", "", SKIN_REFRESH_DYNAMIC),
|
||||
|
|
@ -329,3 +330,4 @@ const struct tag_info* find_tag(const char *name)
|
|||
}
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,6 +211,8 @@ enum skin_token_type {
|
|||
SKIN_TOKEN_PLAYLIST_ENTRIES,
|
||||
SKIN_TOKEN_PLAYLIST_NAME,
|
||||
SKIN_TOKEN_PLAYLIST_POSITION,
|
||||
SKIN_TOKEN_PLAYLIST_PERCENT,
|
||||
SKIN_TOKEN_PLAYLIST_PERCENTBAR,
|
||||
SKIN_TOKEN_PLAYLIST_SHUFFLE,
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue