Mercurial > wow > askmrrobot
comparison ui/AmrUiButton.lua @ 81:0515882856f1 v38
updated for 7.0
author | yellowfive |
---|---|
date | Tue, 19 Jul 2016 10:05:32 -0700 |
parents | 01b63b8ed811 |
children | 57c6cac5143c |
comparison
equal
deleted
inserted
replaced
80:8f235b016212 | 81:0515882856f1 |
---|---|
48 self.frame:SetNormalFontObject(font) | 48 self.frame:SetNormalFontObject(font) |
49 end, | 49 end, |
50 | 50 |
51 -- color is an object with R, G, B | 51 -- color is an object with R, G, B |
52 ["SetBackgroundColor"] = function(self, color) | 52 ["SetBackgroundColor"] = function(self, color) |
53 self.texNormal:SetTexture(color.R, color.G, color.B, 1) | 53 self.texNormal:SetColorTexture(color.R, color.G, color.B, 1) |
54 self.texPush:SetTexture(color.R, color.G, color.B, 1) | 54 self.texPush:SetColorTexture(color.R, color.G, color.B, 1) |
55 end, | 55 end, |
56 | 56 |
57 ["SetDisabled"] = function(self, disabled) | 57 ["SetDisabled"] = function(self, disabled) |
58 self.disabled = disabled | 58 self.disabled = disabled |
59 if disabled then | 59 if disabled then |
98 texPush:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 1, -1) | 98 texPush:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 1, -1) |
99 frame:SetPushedTexture(texPush) | 99 frame:SetPushedTexture(texPush) |
100 | 100 |
101 -- not perfect, but more or less achieves the effect of lightening the bg color slightly on hover | 101 -- not perfect, but more or less achieves the effect of lightening the bg color slightly on hover |
102 local texHigh = frame:CreateTexture(nil, "BORDER") | 102 local texHigh = frame:CreateTexture(nil, "BORDER") |
103 texHigh:SetTexture(1, 1, 1, 0.1) | 103 texHigh:SetColorTexture(1, 1, 1, 0.1) |
104 texHigh:SetAllPoints(true) | 104 texHigh:SetAllPoints(true) |
105 frame:SetHighlightTexture(texHigh) | 105 frame:SetHighlightTexture(texHigh) |
106 | 106 |
107 local widget = { | 107 local widget = { |
108 texNormal = texNormal, | 108 texNormal = texNormal, |