- This wiki is out of date, use the continuation of this wiki instead
Set text color
From FenixWiki
(Difference between revisions)
| Revision as of 15:17, 22 April 2007 (edit) Woody (Talk | contribs) ← Previous diff |
Revision as of 00:42, 23 April 2007 (edit) (undo) Sandman (Talk | contribs) Next diff → |
||
| Line 4: | Line 4: | ||
| ==Definition== | ==Definition== | ||
| - | '''INT''' | + | '''INT''' Set_Text_Color ( <'''INT''' color> ) |
| - | + | ||
| - | + | ||
| + | Sets the [[color]] of texts written after this [[function]] is called. | ||
| == Parameters == | == Parameters == | ||
| Line 14: | Line 13: | ||
| | '''INT''' color || - The color to use for text. | | '''INT''' color || - The color to use for text. | ||
| |} | |} | ||
| - | |||
| == Returns == | == Returns == | ||
| - | '''INT''' : Returns [[true | + | '''INT''' : Returns [[true]] if successful and [[false]] if failed. (''Needs confirmation.'') |
| - | + | ||
| == Example == | == Example == | ||
| Line 26: | Line 23: | ||
| Program awesome; | Program awesome; | ||
| Global | Global | ||
| - | red=0; | + | byte red=0; |
| - | green=255; | + | byte green=255; |
| - | blue=0; | + | byte blue=0; |
| Begin | Begin | ||
| set_text_color(rgb(red,green,blue)); | set_text_color(rgb(red,green,blue)); | ||
| - | |||
| write(0,1,1,0,"Mijn potlood is bruin"); //this text will be green as an Irishman's ejecta | write(0,1,1,0,"Mijn potlood is bruin"); //this text will be green as an Irishman's ejecta | ||
| + | |||
| + | set_text_color(rgb(255,0,0)); | ||
| + | write(0,1,11,0,"Je moeder"); //this text will be red | ||
| Loop | Loop | ||
| Line 43: | Line 42: | ||
| </pre> | </pre> | ||
| + | Used in example: [[write]]() | ||
Revision as of 00:42, 23 April 2007
Contents |
Definition
INT Set_Text_Color ( <INT color> )
Sets the color of texts written after this function is called.
Parameters
| INT color | - The color to use for text. |
Returns
INT : Returns true if successful and false if failed. (Needs confirmation.)
Example
Program awesome;
Global
byte red=0;
byte green=255;
byte blue=0;
Begin
set_text_color(rgb(red,green,blue));
write(0,1,1,0,"Mijn potlood is bruin"); //this text will be green as an Irishman's ejecta
set_text_color(rgb(255,0,0));
write(0,1,11,0,"Je moeder"); //this text will be red
Loop
frame;
End
End
Used in example: write()
