WoW:API ScrollingMessageFrame AddMessage: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
  <center>'''AddMessage''' ''-Documentation by Jason Citron-''</center>
  <center>'''AddMessage''' ''-Documentation by Jason Citron and Allara-''</center>


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, id);


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


:(String text, Number red, Number green, Number blue)
:(String text, Number red, Number green, Number blue, Number id)


:;text : The message to output
:;text : The message to output
Line 14: Line 14:
:;green : The intensity of the green component. A clamped float between 0.0 and 1.0
:;green : The intensity of the green component. A clamped float 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 clamped float between 0.0 and 1.0
:;id : A number that classifies the line of text, for later changing the color


----
----
Line 30: Line 31:
;''Description''
;''Description''


IMPORTANT: This document is somewhat incomplete (there are additional arguments)
Any of the parameters after text are optional. ID is used internally by the chat system, in order to provide a way to later customize the color of specific lines in the chat window. By tying each type of chat to a unique ID, the ColorPicker's colorFunc can use UpdateColorByID to dynamically change the color of the lines. There does not appear to be a way to influence the alpha of chat lines, or to change or duplicate the behavior of the ScrollingMessageFrame's fading out ability. --[[User:Allara|Allara]] 02:38, 16 May 2005 (EDT)


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

Revision as of 06:38, 16 May 2005

AddMessage -Documentation by Jason Citron and Allara-

Outputs text to a local frame in the specified color.

AddMessage(text, red, green, blue, id);

Arguments
(String text, Number red, Number green, Number blue, Number id)
text
The message to output
red
The intensity of the red component. A clamped float between 0.0 and 1.0
green
The intensity of the green component. A clamped float between 0.0 and 1.0
blue
The intensity of the blue component. A clamped float between 0.0 and 1.0
id
A number that classifies the line of text, for later changing the color

Returns
nil

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

Description

Any of the parameters after text are optional. ID is used internally by the chat system, in order to provide a way to later customize the color of specific lines in the chat window. By tying each type of chat to a unique ID, the ColorPicker's colorFunc can use UpdateColorByID to dynamically change the color of the lines. There does not appear to be a way to influence the alpha of chat lines, or to change or duplicate the behavior of the ScrollingMessageFrame's fading out ability. --Allara 02:38, 16 May 2005 (EDT)


Template:WoW API