Skip to content

Instantly share code, notes, and snippets.

@tekkub
Created October 17, 2008 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tekkub/17558 to your computer and use it in GitHub Desktop.
Save tekkub/17558 to your computer and use it in GitHub Desktop.
local function MakeButton(parent)
local butt = CreateFrame("Button", nil, parent)
butt:SetWidth(80) butt:SetHeight(22)
butt:SetHighlightFontObject(GameFontHighlightSmall)
butt:SetNormalFontObject(GameFontNormalSmall)
butt:SetNormalTexture("Interface\\Buttons\\UI-Panel-Button-Up")
butt:SetPushedTexture("Interface\\Buttons\\UI-Panel-Button-Down")
butt:SetHighlightTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
butt:SetDisabledTexture("Interface\\Buttons\\UI-Panel-Button-Disabled")
butt:GetNormalTexture():SetTexCoord(0, 0.625, 0, 0.6875)
butt:GetPushedTexture():SetTexCoord(0, 0.625, 0, 0.6875)
butt:GetHighlightTexture():SetTexCoord(0, 0.625, 0, 0.6875)
butt:GetDisabledTexture():SetTexCoord(0, 0.625, 0, 0.6875)
butt:GetHighlightTexture():SetBlendMode("ADD")
return butt
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment