- This wiki is out of date, use the continuation of this wiki instead
Get text color
From FenixWiki
(Difference between revisions)
| Revision as of 18:39, 23 July 2007 (edit) Rincewind (Talk | contribs) (New Article) ← Previous diff |
Revision as of 18:47, 23 July 2007 (edit) (undo) Rincewind (Talk | contribs) (get_rpg works also for 8 bit colors) Next diff → |
||
| Line 5: | Line 5: | ||
| '''INT''' get_text_color() | '''INT''' get_text_color() | ||
| - | Gets the current text color (the color where texts will be written in). When you're running in 8 bit color mode, this function will return the palette index | + | Gets the current text color (the color where texts will be written in). When you're running in 8 bit color mode, this function will return the palette index and when you're in 16 bit mode it will return a RGB number. Both can be turned into color components using [[get_RGB]](). |
| == Parameters == | == Parameters == | ||
Revision as of 18:47, 23 July 2007
Contents |
Definition
INT get_text_color()
Gets the current text color (the color where texts will be written in). When you're running in 8 bit color mode, this function will return the palette index and when you're in 16 bit mode it will return a RGB number. Both can be turned into color components using get_RGB().
Parameters
None.
Returns
<If someone knows, please edit!>
Notes
None.
Errors
<If someone knows, please edit!>
Example
Program test;
Global
My_text;
Text_color;
Begin
Set_text_color(120);
Write(0,320/2,200/2,4,"The color of this text is:");
Text_color=Get_text_color();
Write_int(0,320/2+100,200/2,4,offset Text_color);
Loop
Frame;
End
End
Used in example: set_text_color(), write(), write_int()

