Thread: rmod Layouts
View Single Post
Old 03/17/08, 8:52 AM   #62 (permalink)
Velveeta
Von Kaiser
 
Tauren Druid
 
Demon Soul
Originally Posted by Zavior View Post
How does one define which font to use for showing the hotkeys?

  function addon:makebuttongloss(name, i)
  
    local bu  = _G[name..i]
    local ic  = _G[name..i.."Icon"]
    local co  = _G[name..i.."Count"]
    local bo  = _G[name..i.."Border"]
    local ho  = _G[name..i.."HotKey"]
    local cd  = _G[name..i.."Cooldown"]
    local na  = _G[name..i.."Name"]
    local fl  = _G[name..i.."Flash"]
    local nt  = _G[name..i.."NormalTexture"]

    ho:Show()
    na:Hide()
    
    fl:SetTexture("Interface\\AddOns\\rTextures\\flash")
    bu:SetHighlightTexture("Interface\\AddOns\\rTextures\\hover")    
    bu:SetPushedTexture("Interface\\AddOns\\rTextures\\pushed")
    bu:SetCheckedTexture("Interface\\AddOns\\rTextures\\checked") 
    bu:SetFont("porky.TTf",14,"OUTLINE")
    nt:SetHeight(36)
    nt:SetWidth(36)
    nt:SetPoint("Center", 0, 0);

    ic:SetTexCoord(0.1,0.9,0.1,0.9)
    ic:SetPoint("TOPLEFT", bu, "TOPLEFT", 2, -2)
    ic:SetPoint("BOTTOMRIGHT", bu, "BOTTOMRIGHT", -2, 2)
I bolded what I tried, but the font it uses is the same as in the default ui. Seems it is defined somewhere else, or I just probably fail at trying to add it there.
You're on the right track, but you would use:

ho:SetFont("Fonts\\skurri", 12, OUTLINE)

That would set the hotkey fonts.
 
User is offline.
Reply With Quote