Difference between revisions of "AddColorMarker"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Created page with "<onlyinclude> This defines an token (e.g. $RED$) for colouring text in menus and suchlike. </onlyinclude> It takes a string representing the token to be replaced and a colour (as...")
 
Line 1: Line 1:
 
<onlyinclude>
 
<onlyinclude>
This defines an token (e.g. $RED$) for colouring text in menus and suchlike.
+
This defines a token (e.g. $RED$) for colouring text in menus and suchlike.
 
</onlyinclude>
 
</onlyinclude>
 
It takes a string representing the token to be replaced and a colour (as an [[SColor]]) to give the text.
 
It takes a string representing the token to be replaced and a colour (as an [[SColor]]) to give the text.

Revision as of 15:19, 15 August 2012

This defines a token (e.g. $RED$) for colouring text in menus and suchlike.

It takes a string representing the token to be replaced and a colour (as an SColor) to give the text. Text following the token will be given the colour assigned to the token.

void AddColorMarker( const string &token, [[SColor]] color )

Example from Scripts/autostart.as:

AddColorMarker( "$RED$", [[SColor]](255, 105, 25, 5) );

This colour marker means that whenever $RED$ is included in menu text, following text will be coloured red.