Mercurial > wow > reaction
comparison classes/BagButton.lua @ 152:6d7ef2a3f828
Added border to bag frames for keybind mode (except keyring???)
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Fri, 08 May 2009 01:16:08 +0000 |
| parents | 57568d3ff3e6 |
| children | 8cc187143acd |
comparison
equal
deleted
inserted
replaced
| 151:57568d3ff3e6 | 152:6d7ef2a3f828 |
|---|---|
| 68 -- frame setup | 68 -- frame setup |
| 69 f:SetID(self:GetBagID()) | 69 f:SetID(self:GetBagID()) |
| 70 | 70 |
| 71 if not f.hotkey then | 71 if not f.hotkey then |
| 72 local h = f:CreateFontString(name.."HotKey","ARTWORK","NumberFontNormalSmallGray") | 72 local h = f:CreateFontString(name.."HotKey","ARTWORK","NumberFontNormalSmallGray") |
| 73 h:SetWidth(36) | 73 h:SetWidth(30) |
| 74 h:SetHeight(10) | 74 h:SetHeight(10) |
| 75 h:SetJustifyH("RIGHT") | 75 h:SetJustifyH("RIGHT") |
| 76 h:SetPoint("TOPLEFT",f,"TOPLEFT",-2,-2) | 76 h:SetPoint("TOPLEFT",f,"TOPLEFT",-2,-2) |
| 77 h:Show() | 77 h:Show() |
| 78 f.hotkey = h | 78 f.hotkey = h |
| 82 local anim = CreateFrame("Model",name.."ItemAnim",f,"ItemAnimTemplate") | 82 local anim = CreateFrame("Model",name.."ItemAnim",f,"ItemAnimTemplate") |
| 83 anim:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-10,0) | 83 anim:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-10,0) |
| 84 anim:Hide() | 84 anim:Hide() |
| 85 end | 85 end |
| 86 | 86 |
| 87 if not f.border then | |
| 88 local b = f:CreateTexture(name.."Border","OVERLAY") | |
| 89 b:SetAllPoints() | |
| 90 b:SetWidth(f:GetWidth()*(62/36)) | |
| 91 b:SetHeight(f:GetHeight()*(62/36)) | |
| 92 b:SetTexture("Interface\\Buttons\UI-ActionButton-Border") | |
| 93 b:SetBlendMode("ADD") | |
| 94 b:Hide() | |
| 95 f.border = b | |
| 96 end | |
| 97 | |
| 87 self.frames.count:SetDrawLayer("ARTWORK") | 98 self.frames.count:SetDrawLayer("ARTWORK") |
| 88 | 99 |
| 89 self.frames.hotkey = f.hotkey | 100 self.frames.hotkey = f.hotkey |
| 101 self.frames.border = _G[name.."Border"] | |
| 90 self.frames.icon = _G[name.."IconTexture"] | 102 self.frames.icon = _G[name.."IconTexture"] |
| 91 self.frames.anim = _G[name.."ItemAnim"] | 103 self.frames.anim = _G[name.."ItemAnim"] |
| 92 | 104 |
| 93 -- initial display | 105 -- initial display |
| 94 if ReAction:GetConfigMode() then | 106 if ReAction:GetConfigMode() then |
| 363 | 375 |
| 364 f:SetWidth(18) | 376 f:SetWidth(18) |
| 365 f:SetHeight(39) | 377 f:SetHeight(39) |
| 366 | 378 |
| 367 local tex = f:GetNormalTexture() | 379 local tex = f:GetNormalTexture() |
| 368 tex:SetWidth(18) | |
| 369 tex:SetHeight(39) | |
| 370 tex:ClearAllPoints() | 380 tex:ClearAllPoints() |
| 371 tex:SetPoint("CENTER") | 381 tex:SetAllPoints() |
| 372 | 382 |
| 373 f:SetNormalTexture("Interface\\Buttons\\UI-Button-KeyRing") | 383 f:SetNormalTexture("Interface\\Buttons\\UI-Button-KeyRing") |
| 374 f:SetHighlightTexture("Interface\\Buttons\\UI-Button-KeyRing-Highlight") | 384 f:SetHighlightTexture("Interface\\Buttons\\UI-Button-KeyRing-Highlight") |
| 375 f:SetPushedTexture("Interface\\Buttons\\UI-Button-KeyRing-Down") | 385 f:SetPushedTexture("Interface\\Buttons\\UI-Button-KeyRing-Down") |
| 376 f:GetNormalTexture():SetTexCoord(0,0.5625,0,0.609375) | 386 f:GetNormalTexture():SetTexCoord(0,0.5625,0,0.609375) |
