Mercurial > wow > cyborg-mmo7
comparison RatPageView.lua @ 15:80192bc4a108
Replaced the global msg function with CyborgMMO_DPrint:
- avoids conflicts with other addons ('msg' is too generic)
- has 'print' semantics (several values accepted, calls tostring)
- use AddMessage with a colored prefix, instead of plain SendChatMessage
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Thu, 25 Apr 2013 01:29:55 +0000 |
parents | 6cb9a2936580 |
children | cccc7661a2e6 |
comparison
equal
deleted
inserted
replaced
14:9f2d838d4f8e | 15:80192bc4a108 |
---|---|
18 --~ along with this program; if not, write to the Free Software | 18 --~ along with this program; if not, write to the Free Software |
19 --~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 19 --~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
20 | 20 |
21 CyborgMMO_RatPageView = { | 21 CyborgMMO_RatPageView = { |
22 new = function(self) | 22 new = function(self) |
23 msg("new Rat Page View") | 23 CyborgMMO_DPrint("new Rat Page View") |
24 for _,child in ipairs(self:GetChildren()) do | 24 for _,child in ipairs(self:GetChildren()) do |
25 child.Register() | 25 child.Register() |
26 end | 26 end |
27 | 27 |
28 self.SlotClicked = function(slot) | 28 self.SlotClicked = function(slot) |
29 msg("View Recieved Click") | 29 CyborgMMO_DPrint("View Recieved Click") |
30 CyborgMMO_RatPageController.Instance().SlotClicked(slot) | 30 CyborgMMO_RatPageController.Instance().SlotClicked(slot) |
31 end | 31 end |
32 | 32 |
33 self.ModeClicked = function(mode) | 33 self.ModeClicked = function(mode) |
34 msg("View Recieved Click") | 34 CyborgMMO_DPrint("View Recieved Click") |
35 CyborgMMO_RatPageController.Instance().ModeClicked(mode) | 35 CyborgMMO_RatPageController.Instance().ModeClicked(mode) |
36 end | 36 end |
37 | 37 |
38 self.RegisterMode = function() | 38 self.RegisterMode = function() |
39 msg("ModeRegistered") | 39 CyborgMMO_DPrint("ModeRegistered") |
40 end | 40 end |
41 | 41 |
42 self.RegisterSlot = function() | 42 self.RegisterSlot = function() |
43 msg("SlotRegistered") | 43 CyborgMMO_DPrint("SlotRegistered") |
44 end | 44 end |
45 | 45 |
46 return self | 46 return self |
47 end, | 47 end, |
48 } | 48 } |