This wiki is out of date, use the continuation of this wiki instead

Set text color

From FenixWiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 00:42, 23 April 2007 (edit)
Sandman (Talk | contribs)

← Previous diff
Revision as of 13:28, 26 April 2007 (edit) (undo)
Sandman (Talk | contribs)

Next diff →
Line 3: Line 3:
==Definition== ==Definition==
- +'''INT''' set_text_color ( <'''WORD''' color> )
-'''INT''' Set_Text_Color ( <'''INT''' color> )+
Sets the [[color]] of texts written after this [[function]] is called. Sets the [[color]] of texts written after this [[function]] is called.
== Parameters == == Parameters ==
- 
{| {|
-| '''INT''' color || - The color to use for text.+| '''WORD''' color || - The color to use for text.
|} |}
== Returns == == Returns ==
- +'''INT''' : [[true]] if successful and [[false]] if failed. (''Needs confirmation.'')
-'''INT''' : Returns [[true]] if successful and [[false]] if failed. (''Needs confirmation.'')+
== Example == == Example ==
- 
<pre> <pre>
Program awesome; Program awesome;
Line 40: Line 36:
End End
End End
- 
</pre> </pre>
-Used in example: [[write]]()+Used in example: [[write]](), [[rgb]]()

Revision as of 13:28, 26 April 2007


Contents

Definition

INT set_text_color ( <WORD color> )

Sets the color of texts written after this function is called.

Parameters

WORD color - The color to use for text.

Returns

INT : 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(), rgb()

Personal tools