Label Parsing

In label controls and fadelabel controls, as well as in the LCD label definition files you can specify more than one piece of information to be displayed in a single line of text (or across multiple lines of text) by using the $INFO and $LOCALIZE keywords in a tag. In addition to this, you can use the Label Formatting syntax to specify color and style information for the text (changeable within a single label).

How the parsing works

 * 1) XBMC runs through and replaces any $LOCALIZE[number] blocks with the real string from strings.xml.
 * 2) XBMC then runs through and translates the $INFO[infolabel,prefix,postfix] blocks from left to right.
 * 3) If the Info manager returns an empty string from the infolabel, then nothing is rendered for that block.
 * 4) If the Info manager returns a non-empty string from the infolabel, then XBMC prints the prefix string, then the returned infolabel information, then the postfix string. Note that any $COMMA fields are replaced by real commas, and $$ is replaced by $.
 * 5) Any pieces of information outside of the $INFO blocks are rendered unchanged.

So, in the above example, if nothing is playing then the label will print: A good example of a If a song is playing but it has no Title (ie MusicPlayer.Title? returns an empty string) but does have an artist, it will return: A good example of a song artist:  If a song is playing that has title and artist information, it will return: A good example of a song title: , and a song artist: 