WoW:API MessageFrame AddMessage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Spelling)
No edit summary
Line 1: Line 1:
  <center>'''AddMessage''' ''-Documentation by Jason Citron-''</center>
  <center>'''AddMessage''' ''-Documentation by Jason Citron, Additions by Dan Yankowsky-''</center>


Outputs text to a local frame in the specified color.
Outputs text to a local frame in the specified color.
Line 28: Line 28:
;''Result''
;''Result''
  Testing -- in red
  Testing -- in red
----
==Escape Sequences==
It is possible to control the text in the MessageFrame with escape sequences in text
===Set Color===
Syntax:
|cAARRGGBB  colored text 
Example:
|cFFFF0000This Will Be In Red
===Remove Color===
Syntax:
|cAARRGGBB  colored text  |r  uncolored text
Example:
|cFF00FF00In Green|rDefault Color


----
----
{{Template:WoW API}}
{{Template:WoW API}}

Revision as of 06:15, 19 November 2005

AddMessage -Documentation by Jason Citron, Additions by Dan Yankowsky-

Outputs text to a local frame in the specified color.

AddMessage(text, red, green, blue, alpha, holdTime);

Arguments
(String text, Number red, Number green, Number blue, Number alpha, Number holdTime)
text
The message to output
red
The intensity of the red component. A number between 0.0 and 1.0
green
The intensity of the green component. A number between 0.0 and 1.0
blue
The intensity of the blue component. A number between 0.0 and 1.0
alpha
The opacity of the text. A number between 0.0 and 1.0
holdTime
Time in seconds before the message fades.

Returns
nil

Example
AddMessage("Testing", 1.0, 0.0, 0.0, 1.0, 5);
Result
Testing -- in red

Escape Sequences

It is possible to control the text in the MessageFrame with escape sequences in text

Set Color

Syntax:

|cAARRGGBB  colored text  

Example:

|cFFFF0000This Will Be In Red


Remove Color

Syntax:

|cAARRGGBB  colored text  |r  uncolored text

Example:

|cFF00FF00In Green|rDefault Color



Template:WoW API