LibQTip-1.0

36 - Cell fonts ignored

My addon RoleCall <http://www.wowace.com/addons/rolecall/> uses LibQTip to draw talent tooltips.

It seems that r161 (MINOR = 40) renders the cell colors differently than r159 (MINOR = 38). In particular, it seems to ignore calls to :SetFont() and the font parameter in :SetCell(). I have attached screenshots to demonstrate the difference.

The tooltip code is below, but of course you could just look at the function ShowTooltip() in RoleCall.

local function ShowTooltip(frame)
    local guid = frame.guid
    if guid then
        if talents_tooltip then
            talents_tooltip:Clear()
        else
            talents_tooltip = LibQTip:Acquire("RoleCall_Tooltip", 3)
        end

        talents_tooltip.owner = frame

        talents_tooltip:AddHeader(TALENTS, MAJOR_GLYPHS, MINOR_GLYPHS)

        local talents = roster_talents[guid]
        local glyphs = roster_glyphs[guid]

        talents_tooltip:SetFont(GameFontNormal)

        if talents then
            for _, talentInfo in pairs(talents) do
                local talentTier = talentInfo.tier
                if talentTier then
                    talentArray[talentTier] = talentInfo.name_localized
                end
            end
        end

        if glyphs then
            for _, glyphInfo in pairs(glyphs) do
                local glyphName = glyphInfo.name_localized
                if glyphName then
                    local glyphType = glyphInfo.glyph_type
                    if glyphType == GLYPH_TYPE_MAJOR then
                        tinsert(majorGlyphs, glyphName)
                    elseif glyphType == GLYPH_TYPE_MINOR then
                        tinsert(minorGlyphs, glyphName)
                    end
                end
            end

            sort(majorGlyphs)
            sort(minorGlyphs)
        end

        for i = 1, max(MAX_NUM_TALENT_TIERS, 3) do
            local talentName = talentArray[i]
            local majorName = majorGlyphs[i]
            local minorName = minorGlyphs[i]

            local line = talents_tooltip:AddLine(talentName, majorName, minorName)

            if not talentName and (i <= MAX_NUM_TALENT_TIERS) then
                talents_tooltip:SetCell(line, 1, L["None"], GameFontDisable)
            end

            if not majorName and (i <= 3) then
                talents_tooltip:SetCell(line, 2, L["None"], GameFontDisable)
            end

            if not minorName and (i <= 3) then
                talents_tooltip:SetCell(line, 3, L["None"], GameFontDisable)
            end
        end

        wipe(talentArray)
        wipe(majorGlyphs)
        wipe(minorGlyphs)

        talents_tooltip:SmartAnchorTo(frame)
        talents_tooltip:Show()
    end
end
  • r159.png
    Rendering for r159
  • r161.png
    Rendering for r161
User When Change
Torhal Mar 12, 2013 at 22:13 UTC
Greltok Mar 12, 2013 at 03:40 UTC

Added attachment r161.png

Greltok Mar 12, 2013 at 03:40 UTC

Added attachment r159.png

Greltok Mar 12, 2013 at 03:38 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

Facts

Last updated
Mar 12, 2013
Reported
Mar 12, 2013
Status
Fixed - Developer made requested changes. QA should verify.
Type
Defect - A shortcoming, fault, or imperfection
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees