Mercurial > wow > askmrrobot
comparison ui/AmrUiIcon.lua @ 81:0515882856f1 v38
updated for 7.0
author | yellowfive |
---|---|
date | Tue, 19 Jul 2016 10:05:32 -0700 |
parents | 01b63b8ed811 |
children |
comparison
equal
deleted
inserted
replaced
80:8f235b016212 | 81:0515882856f1 |
---|---|
53 self.icon:SetDesaturated(false) | 53 self.icon:SetDesaturated(false) |
54 end, | 54 end, |
55 | 55 |
56 ["SetIcon"] = function(self, icon) | 56 ["SetIcon"] = function(self, icon) |
57 if not icon then | 57 if not icon then |
58 self.icon:SetTexture(0, 0, 0, 0) | 58 self.icon:SetColorTexture(0, 0, 0, 0) |
59 else | 59 else |
60 self.icon:SetTexture(icon) | 60 self.icon:SetTexture(icon) |
61 end | 61 end |
62 end, | 62 end, |
63 | 63 |
64 ["SetBorderWidth"] = function(self, width) | 64 ["SetBorderWidth"] = function(self, width) |
65 setIconBorderWidth(self.frame, self.icon, width) | 65 setIconBorderWidth(self.frame, self.icon, width) |
66 end, | 66 end, |
67 | 67 |
68 ["SetIconBorderColor"] = function(self, color, a) | 68 ["SetIconBorderColor"] = function(self, color, a) |
69 self.bg:SetTexture(color.R, color.G, color.B, a or 1) | 69 self.bg:SetColorTexture(color.R, color.G, color.B, a or 1) |
70 end, | 70 end, |
71 | 71 |
72 ["HideIconBorder"] = function(self) | 72 ["HideIconBorder"] = function(self) |
73 self.bg:SetTexture(0, 0, 0, 0) | 73 self.bg:SetColorTexture(0, 0, 0, 0) |
74 end, | 74 end, |
75 | 75 |
76 ["SetStrata"] = function(self, strata) | 76 ["SetStrata"] = function(self, strata) |
77 self.frame:SetFrameStrata(strata) | 77 self.frame:SetFrameStrata(strata) |
78 end, | 78 end, |
106 | 106 |
107 local icon = frame:CreateTexture(nil, "ARTWORK", nil, 1) | 107 local icon = frame:CreateTexture(nil, "ARTWORK", nil, 1) |
108 icon:SetTexCoord(0.05, 0.95, 0.05, 0.95) | 108 icon:SetTexCoord(0.05, 0.95, 0.05, 0.95) |
109 | 109 |
110 local borderTop = frame:CreateTexture(nil, "ARTWORK", nil, 2) | 110 local borderTop = frame:CreateTexture(nil, "ARTWORK", nil, 2) |
111 borderTop:SetTexture(0, 0, 0, 1) | 111 borderTop:SetColorTexture(0, 0, 0, 1) |
112 borderTop:SetHeight(1) | 112 borderTop:SetHeight(1) |
113 borderTop:SetPoint("TOPLEFT", icon, "TOPLEFT") | 113 borderTop:SetPoint("TOPLEFT", icon, "TOPLEFT") |
114 borderTop:SetPoint("TOPRIGHT", icon, "TOPRIGHT") | 114 borderTop:SetPoint("TOPRIGHT", icon, "TOPRIGHT") |
115 | 115 |
116 local borderRight = frame:CreateTexture(nil, "ARTWORK", nil, 2) | 116 local borderRight = frame:CreateTexture(nil, "ARTWORK", nil, 2) |
117 borderRight:SetTexture(0, 0, 0, 1) | 117 borderRight:SetColorTexture(0, 0, 0, 1) |
118 borderRight:SetWidth(1) | 118 borderRight:SetWidth(1) |
119 borderRight:SetPoint("TOPRIGHT", icon, "TOPRIGHT") | 119 borderRight:SetPoint("TOPRIGHT", icon, "TOPRIGHT") |
120 borderRight:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT") | 120 borderRight:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT") |
121 | 121 |
122 local borderBottom = frame:CreateTexture(nil, "ARTWORK", nil, 2) | 122 local borderBottom = frame:CreateTexture(nil, "ARTWORK", nil, 2) |
123 borderBottom:SetTexture(0, 0, 0, 1) | 123 borderBottom:SetColorTexture(0, 0, 0, 1) |
124 borderBottom:SetHeight(1) | 124 borderBottom:SetHeight(1) |
125 borderBottom:SetPoint("BOTTOMLEFT", icon, "BOTTOMLEFT") | 125 borderBottom:SetPoint("BOTTOMLEFT", icon, "BOTTOMLEFT") |
126 borderBottom:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT") | 126 borderBottom:SetPoint("BOTTOMRIGHT", icon, "BOTTOMRIGHT") |
127 | 127 |
128 local borderLeft = frame:CreateTexture(nil, "ARTWORK", nil, 2) | 128 local borderLeft = frame:CreateTexture(nil, "ARTWORK", nil, 2) |
129 borderLeft:SetTexture(0, 0, 0, 1) | 129 borderLeft:SetColorTexture(0, 0, 0, 1) |
130 borderLeft:SetWidth(1) | 130 borderLeft:SetWidth(1) |
131 borderLeft:SetPoint("TOPLEFT", icon, "TOPLEFT") | 131 borderLeft:SetPoint("TOPLEFT", icon, "TOPLEFT") |
132 borderLeft:SetPoint("BOTTOMLEFT", icon, "BOTTOMLEFT") | 132 borderLeft:SetPoint("BOTTOMLEFT", icon, "BOTTOMLEFT") |
133 | 133 |
134 local widget = { | 134 local widget = { |