Mercurial > wow > askmrrobot
comparison ui/Ui.lua @ 81:0515882856f1 v38
updated for 7.0
| author | yellowfive |
|---|---|
| date | Tue, 19 Jul 2016 10:05:32 -0700 |
| parents | 304d7ebb8e30 |
| children | 6bbe64d587b4 |
comparison
equal
deleted
inserted
replaced
| 80:8f235b016212 | 81:0515882856f1 |
|---|---|
| 85 end | 85 end |
| 86 | 86 |
| 87 -- helper to create a solid texture from a color with R,G,B properties | 87 -- helper to create a solid texture from a color with R,G,B properties |
| 88 function Amr.CreateTexture(parent, color, alpha, layer) | 88 function Amr.CreateTexture(parent, color, alpha, layer) |
| 89 local t = parent:CreateTexture(nil, layer or "ARTWORK") | 89 local t = parent:CreateTexture(nil, layer or "ARTWORK") |
| 90 t:SetTexture(color.R, color.G, color.B, alpha or 1) | 90 t:SetColorTexture(color.R, color.G, color.B, alpha or 1) |
| 91 return t | 91 return t |
| 92 end | 92 end |
| 93 | 93 |
| 94 -- helper to create a cheater shadow without having to create custom images | 94 -- helper to create a cheater shadow without having to create custom images |
| 95 function Amr.DropShadow(frame) | 95 function Amr.DropShadow(frame) |
| 96 local shadow = frame:CreateTexture(nil, "BACKGROUND") | 96 local shadow = frame:CreateTexture(nil, "BACKGROUND") |
| 97 shadow:SetTexture(0, 0, 0, 0.4) | 97 shadow:SetColorTexture(0, 0, 0, 0.4) |
| 98 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) | 98 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) |
| 99 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 1, -1) | 99 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 1, -1) |
| 100 | 100 |
| 101 shadow = frame:CreateTexture(nil, "BACKGROUND") | 101 shadow = frame:CreateTexture(nil, "BACKGROUND") |
| 102 shadow:SetTexture(0, 0, 0, 0.3) | 102 shadow:SetColorTexture(0, 0, 0, 0.3) |
| 103 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) | 103 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) |
| 104 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, -2) | 104 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, -2) |
| 105 | 105 |
| 106 shadow = frame:CreateTexture(nil, "BACKGROUND") | 106 shadow = frame:CreateTexture(nil, "BACKGROUND") |
| 107 shadow:SetTexture(0, 0, 0, 0.1) | 107 shadow:SetColorTexture(0, 0, 0, 0.1) |
| 108 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) | 108 shadow:SetPoint("TOPLEFT", frame, "TOPLEFT", 2, -2) |
| 109 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 3, -3) | 109 shadow:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 3, -3) |
| 110 end | 110 end |
| 111 | 111 |
| 112 | 112 |
