WoW:API MessageFrame AddMessage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
m (Spelling)
Line 3: Line 3:
Outputs text to a local frame in the specified color.
Outputs text to a local frame in the specified color.


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


----
----
;''Arguments''
;''Arguments''


:(String text, Number red, Number green, Number blue)
:(String text, Number red, Number green, Number blue, Number alpha, Number holdTime)


:;text : The message to output
:;text : The message to output
:;red : The intensity of the red component. A clamped float between 0.0 and 1.0
:;red : The intensity of the red component. A number between 0.0 and 1.0
:;green : The intensity of the green component. A clamped float 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 clamped float 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.


----
----
Line 22: Line 24:
----
----
;''Example''
;''Example''
  AddMessage("Testing", 1.0, 0.0, 0.0);
  AddMessage("Testing", 1.0, 0.0, 0.0, 1.0, 5);


;''Result''
;''Result''
  Testing -- in red
  Testing -- in red
----
;''Description''
IMPORTANT: This document is somewhat incomplete (there are additional arguments, AND It's not the same as the ScrollingMessageFrame one!)


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

Revision as of 01:47, 29 July 2005

AddMessage -Documentation by Jason Citron-

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

Template:WoW API