Mercurial > wow > kbf
comparison KBF.lua @ 23:b284fd451972
move an incorrectly located EnableMouse
| author | Chris Mellon <arkanes@gmai.com> |
|---|---|
| date | Tue, 19 Oct 2010 14:08:10 -0500 |
| parents | 940628cd5bfc |
| children | 1954ee573a37 |
comparison
equal
deleted
inserted
replaced
| 22:940628cd5bfc | 23:b284fd451972 |
|---|---|
| 140 frame.filter = "HARMFUL" | 140 frame.filter = "HARMFUL" |
| 141 frame.unit = unit | 141 frame.unit = unit |
| 142 frame.index = idx | 142 frame.index = idx |
| 143 frame:SetScript("OnEnter", function() kbf:OnEnter(frame) end) | 143 frame:SetScript("OnEnter", function() kbf:OnEnter(frame) end) |
| 144 frame:SetScript("OnLeave", function() GameTooltip:Hide() end) | 144 frame:SetScript("OnLeave", function() GameTooltip:Hide() end) |
| 145 frame:EnableMouse(true) | |
| 145 buffCount = buffCount + 1 | 146 buffCount = buffCount + 1 |
| 146 else | 147 else |
| 147 -- not dirty, so no frame means we're done | 148 -- not dirty, so no frame means we're done |
| 148 if not frame then break end | 149 if not frame then break end |
| 149 end | 150 end |
| 284 local textcolor = {1, 1, 1, 1} | 285 local textcolor = {1, 1, 1, 1} |
| 285 local timertextcolor = {1, 1, 1, 1} | 286 local timertextcolor = {1, 1, 1, 1} |
| 286 if not frame then | 287 if not frame then |
| 287 frame = CreateFrame("Button", nil, UIParent) -- the "top level" frame that represents the bar as a whole | 288 frame = CreateFrame("Button", nil, UIParent) -- the "top level" frame that represents the bar as a whole |
| 288 frame:SetHeight(16) | 289 frame:SetHeight(16) |
| 289 frame:SetWidth(200 + 16) | 290 frame:SetWidth(200 + 16) |
| 290 end | 291 end |
| 291 local bar = frame | 292 local bar = frame |
| 292 bar.icon = CreateFrame("Button", nil, bar) -- the icon | 293 bar.icon = CreateFrame("Button", nil, bar) -- the icon |
| 293 bar.statusbarbg = CreateFrame("StatusBar", nil, bar) -- the bars background | 294 bar.statusbarbg = CreateFrame("StatusBar", nil, bar) -- the bars background |
| 294 bar.statusbar = CreateFrame("StatusBar", nil, bar) -- and the bars foreground | 295 bar.statusbar = CreateFrame("StatusBar", nil, bar) -- and the bars foreground |
| 336 bar.text:SetWidth((width - timertextwidth) *.9) | 337 bar.text:SetWidth((width - timertextwidth) *.9) |
| 337 bar.text:SetPoint("RIGHT", bar.statusbar, "RIGHT", 0, 0) | 338 bar.text:SetPoint("RIGHT", bar.statusbar, "RIGHT", 0, 0) |
| 338 bar.text:SetJustifyH("LEFT") | 339 bar.text:SetJustifyH("LEFT") |
| 339 bar.text:SetText("text") | 340 bar.text:SetText("text") |
| 340 bar.text:SetTextColor(textcolor[1], textcolor[2], textcolor[3], textcolor[4]) | 341 bar.text:SetTextColor(textcolor[1], textcolor[2], textcolor[3], textcolor[4]) |
| 341 | |
| 342 bar:EnableMouse(true) | |
| 343 return bar | 342 return bar |
| 344 end | 343 end |
| 345 | 344 |
| 346 function kbf:CreateAnchorFrame() | 345 function kbf:CreateAnchorFrame() |
| 347 -- give it a name so it'll remember its position | 346 -- give it a name so it'll remember its position |
