WoW:API ScrollingMessageFrame AddMessage: Difference between revisions

m
notoc
m (notoc)
Line 1: Line 1:
{{widgetmethod}}
{{widgetmethod}} __NOTOC__
 
<center>'''ScrollingMessageFrame:AddMessage''' ''-Documentation by Jason Citron and Allara, Fixes by Beladona-''</center><br/><br/>


Outputs text to a local MessageFrame, with optional color id.
Outputs text to a local MessageFrame, with optional color id.
Line 7: Line 5:
  MessageFrame:AddMessage(text[,r,g,b[,id]]);
  MessageFrame:AddMessage(text[,r,g,b[,id]]);


 
== Parameters ==
----
=== Arguments ===
;''Arguments''


:(String text, Number red, Number green, Number blue, Number id)
:(String text, Number red, Number green, Number blue, Number id)
Line 19: Line 16:
:;id : A number that classifies the line of text, for later changing the color
:;id : A number that classifies the line of text, for later changing the color


----
=== Returns ===
;''Returns''
:;nil
 
 
== Example ==


:;nil
DEFAULT_CHAT_FRAME:AddMessage("Testing", 1.0, 0.0, 0.0, 123);


----
Outputs "Testing" on a single line in your default chat window -- in red.
;''Example''
DEFAULT_CHAT_FRAME:AddMessage("Testing", 1.0, 0.0, 0.0, 1.0);


;''Result''
Testing -- in red


----
==Escape Sequences==
==Escape Sequences==
It is possible to control the text in the MessageFrame with escape sequences in text
It is also possible to control the text of parts of lines in the MessageFrame with escape sequences in text.


See [[UI Escape Sequences]] for more information
<div style="margin-left:3%;">
 
===Set color===
===Set Color===
Syntax:
Syntax:
  |cAARRGGBB  colored text   
  |cAARRGGBB  colored text   
Line 43: Line 37:
  |cFFFF0000This Will Be In Red
  |cFFFF0000This Will Be In Red


 
===Reset color===
===Remove Color===
Syntax:
Syntax:
  |cAARRGGBB  colored text  |r  uncolored text
  |cAARRGGBB  colored text  '''|r''' uncolored text
Example:
Example:
  |cFF00FF00In Green|rDefault Color
  |cFF00FF00In Green'''|r'''Default Color
 
</div>
 
{{AlsoSee|[[UI Escape Sequences]]}}
Anonymous user