diff RatPageModel.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 9f2d838d4f8e
children cccc7661a2e6
line wrap: on
line diff
--- a/RatPageModel.lua	Thu Apr 25 01:29:50 2013 +0000
+++ b/RatPageModel.lua	Thu Apr 25 01:29:55 2013 +0000
@@ -56,7 +56,7 @@
 		end
 
 		self.LoadData = function()
-			msg("Loading...")
+			CyborgMMO_DPrint("Loading...")
 			local data = CyborgMMO_GetSaveData()
 
 			if not data["Rat"] then
@@ -83,7 +83,7 @@
 		end
 
 		self.SaveData = function()
-			msg("Saving...")
+			CyborgMMO_DPrint("Saving...")
 			CyborgMMO_SetSaveData(self.Data, "Rat")
 		end
 
@@ -109,18 +109,18 @@
 		end
 
 		self.SetObjectOnButtonNoUpdate = function(button, mode, object)
-		--	msg("button = "..tostring(button).." mode = "..tostring(mode))
+		--	CyborgMMO_DPrint("button = "..tostring(button).." mode = "..tostring(mode))
 			self.Data[mode][button] = object
 
 			if object then
 				object.SetBinding(CyborgMMO_WowCommands[((mode-1)*RAT7.BUTTONS)+button])
 				if("callback" == object.Type) then
-					msg("trying to set texture")
+					CyborgMMO_DPrint("trying to set texture")
 					local slot = getglobal("CyborgMMO_MainPageSlotListSlot"..button)
 					slot:SetNormalTexture(object.Texture)
 				end
 			else
-				msg("clearing "..button)
+				CyborgMMO_DPrint("clearing "..button)
 				CyborgMMO_WowObject.ClearBinding(CyborgMMO_WowCommands[((mode-1)*RAT7.BUTTONS)+button])
 			end
 		end