2011/03/12 02:01

Lua - MessageFrame:AddMessage


ref : http://www.wowwiki.com/API_ScrollingMessageFrame_AddMessage


Outputs text to a local MessageFrame, with optional color id.- Updated in 2.4.2

MessageFrame에 문자열을 출력한다, 옵션으로 색상 아이디를 포함해서. - 2.4.2 버전부터 지원 

MessageFrame:AddMessage(text[,r,g,b[,id][,addToStart]]);

Parameters

Arguments

(String text, Number red, Number green, Number blue, Number id, Boolean addToStart)
text 
The string message to output
The intensity of the red component. A number between 0.0 and 1.0
The intensity of the green component. A number between 0.0 and 1.0
The intensity of the blue component. A number between 0.0 and 1.0
id 
A number that classifies the line of text, for later changing the color
addToStart 
Boolean - Set to true to add the message to the start of the MessageFrame as if it was the first printed message - New in 2.4.2.

Returns

nil


Example

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

Outputs "Testing" on a single line in your default chat window -- in red.

DEFAULT_CHAT_FRAME:AddMessage("AddOn Loaded!", 0.0, 1.0, 0.0, nil, true);

Outputs "AddOn Loaded!" at the start of your default chat window -- in green.

Escape Sequences

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

Set color

Syntax:

|cAARRGGBB  colored text  

Example:

|cFFFF0000This Will Be In Red

Reset color

Syntax:

|cAARRGGBB  colored text  |r  uncolored text

Example:

|cFF00FF00In Green|rDefault Color

See also



 

저작자 표시 비영리 변경 금지
크리에이티브 커먼즈 라이선스
Creative Commons License

'Program > Lua' 카테고리의 다른 글

Lua - MessageFrame:AddMessage  (0) 2011/03/12
Lua - Control Statement  (0) 2011/02/23
올블로그추천버튼 블코추천버튼 블로그뉴스추천버튼 믹시추천버튼 한RSS추가버튼 구글리더기추천버튼


이 포스팅이 도움이 되었다면 구글에서 관련 정보를 찾아 보세요 ^^


Trackback 0 Comment 0

Trackback : http://i-ruru.com/trackback/640 관련글 쓰기