Mercurial > wow > reaction
comparison ReAction.lua @ 279:5b9c0164a491
Fixed a number of problems with drag corners in config mode
- Fixed button resizing via dragging not updating until a reload
- Fixed pet/stance/vehicle buttons not always displaying in config mode
- Fixed error spam when making too many pet/bag buttons
| author | Flick |
|---|---|
| date | Wed, 11 May 2011 16:19:17 -0700 |
| parents | 36a29870bf34 |
| children | 0cb6a9944497 |
comparison
equal
deleted
inserted
replaced
| 277:4e325f1ea6e1 | 279:5b9c0164a491 |
|---|---|
| 1 local _, ns = ... | 1 local _, ns = ... |
| 2 local pcall = pcall | 2 local pcall = pcall |
| 3 local pairs = pairs | 3 local pairs = pairs |
| 4 local type = type | 4 local type = type |
| 5 local geterrorhandler = geterrorhandler | 5 local geterrorhandler = geterrorhandler |
| 6 local GetTime = GetTime | |
| 6 local L = LibStub("AceLocale-3.0"):GetLocale("ReAction") | 7 local L = LibStub("AceLocale-3.0"):GetLocale("ReAction") |
| 7 local LKB = LibStub("LibKeyBound-1.0",true) | 8 local LKB = LibStub("LibKeyBound-1.0",true) |
| 8 if not LKB then | 9 if not LKB then |
| 9 LoadAddOn("LibKeyBound-1.0") | 10 LoadAddOn("LibKeyBound-1.0") |
| 10 LKB = LibStub("LibKeyBound-1.0") | 11 LKB = LibStub("LibKeyBound-1.0") |
| 169 end | 170 end |
| 170 | 171 |
| 171 | 172 |
| 172 ------ Methods ------ | 173 ------ Methods ------ |
| 173 | 174 |
| 174 function ReAction:UserError(msg) | 175 do |
| 175 UIErrorsFrame:AddMessage(msg) | 176 local lastErrorMessage |
| 177 local lastErrorTime | |
| 178 function ReAction:UserError(msg) | |
| 179 local t = GetTime() | |
| 180 if msg ~= lastErrorMessage or lastErrorTime == nil or (t - lastErrorTime > 10) then -- prevent spam | |
| 181 UIErrorsFrame:AddMessage(msg) | |
| 182 lastErrorMessage = msg | |
| 183 lastErrorTime = t | |
| 184 end | |
| 185 end | |
| 176 end | 186 end |
| 177 | 187 |
| 178 function ReAction:GetBar(arg) | 188 function ReAction:GetBar(arg) |
| 179 if type(arg) == "string" then | 189 if type(arg) == "string" then |
| 180 return self.bars[arg], arg | 190 return self.bars[arg], arg |
