388 - Texture vertex coloring not implemented for indicators
What does the provided patch do?
Implements vertex coloring for indicator textures, as the documentation already suggests should be possible.
Please provide any additional information below.
-- The following modifications would be required in PitBull4\ModuleHandling\IndicatorModule.lua
local function call_texture_function(self, frame)
if not self.GetTexture then
-- no function, let's just return
return nil
end
-- local tex
++ local tex, red, green, blue, alpha
if frame.guid then
-- tex = self:GetTexture(frame)
++ tex, red, green, blue, alpha = self:GetTexture(frame)
end
if not tex and frame.force_show and self.GetExampleTexture then
-- tex = self:GetExampleTexture(frame)
++ tex, red, green, blue, alpha = self:GetExampleTexture(frame)
end
if not tex then
return nil
end
-- return tex
++ return tex, red, green, blue, alpha
end
--
--
--
function IndicatorModule:UpdateFrame(frame)
[email protected]@
expect(frame, 'typeof', 'frame')
[email protected]@
-- local tex = call_texture_function(self, frame)
++ local tex, red, green, blue, alpha = call_texture_function(self, frame)
if not tex then
return self:ClearFrame(frame)
end
local id = self.id
local control = frame[id]
local made_control = not control
if made_control then
control = PitBull4.Controls.MakeIcon(frame)
control:SetFrameLevel(frame:GetFrameLevel() + 3)
frame[id] = control
control:SetWidth(INDICATOR_SIZE)
control:SetHeight(INDICATOR_SIZE)
end
control:SetTexture(tex)
++ control.texture:SetVertexColor(red or 1, green or 1, blue or 1, alpha or 1)
control:SetTexCoord(call_tex_coord_function(self, frame, tex))
return made_control
end
Facts
- Last updated
- Nov 04, 2013
- Reported
- May 16, 2009
- Status
- New - Issue has not had initial review yet.
- Type
- Patch - Source code patch for review
- Priority
- Medium - Normal priority.
- Votes
- 0
- Component
- Core