Thread: Button types
View Single Post
06-08-23, 10:38 AM   #2
Fizzlemizz
I did that?
 
Fizzlemizz's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Dec 2011
Posts: 1,903
Buttons don't look like anything until you apply textures to them (which is what the UIPanelButtonTemplate).

You can make your butons look like anything.

Lua Code:
  1. local f = CreateFrame("Button")
  2. f:SetSize(40, 40)
  3. f:SetPoint("CENTER")
  4. f:SetNormalTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Disabled")
  5. f:SetPushedTexture("Interface\\Buttons\\UI-ScrollBar-ScrollDownButton-Down")
  6. f:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight")
  7. f:GetHighlightTexture():SetAlpha(0.4)

You can also use your own textures and ther built-in tab templates.
Lua Code:
  1. local f = CreateFrame("Button", nil, UIParent, "PanelTabButtonTemplate")
  2. f:SetSize(40, 40)
  3. f:SetPoint("CENTER")
__________________
Fizzlemizz
Maintainer of Discord Unit Frames and Discord Art.
Author of FauxMazzle, FauxMazzleHUD and Move Pad Plus.

Last edited by Fizzlemizz : 06-08-23 at 10:42 AM.
  Reply With Quote