Mercurial > wow > inventory
diff Core.lua @ 76:958aba5f3297
Moved the group functions to the item data class.
Added a new subgroup under the general config group called ?extra? which will provide features such as database character removal and perhaps guild selecting.
Added a new custom .Print function to the addon object which takes two parameters: (string)text, (Color)color. The latter can be retrieved from the addon.Colors var (e.g. addon.Colors.Red).
The ItemId parameter of the ItemData class constructor is now optional.
author | Zerotorescue |
---|---|
date | Sat, 25 Dec 2010 22:07:07 +0100 |
parents | 8d11fc88ecab |
children | f885805da5d6 |
line wrap: on
line diff
--- a/Core.lua Sat Dec 25 15:33:40 2010 +0100 +++ b/Core.lua Sat Dec 25 22:07:07 2010 +0100 @@ -430,6 +430,22 @@ +-- General + +addon.Colors = { + Red = { 1, 0, 0 }, + Green = { 0, 1, 0 }, +}; -- easy to extend if more colors are needed +function addon:Print(text, color) + local red, green, blue; + + if color then + red, green, blue = color[1], color[2], color[3]; + end + + DEFAULT_CHAT_FRAME:AddMessage(text or "", red, green, blue, nil, 5); +end + -- Debug function addon:Debug(t)