Thread Tools Display Modes
06-08-23, 02:34 AM   #1
mataal
A Murloc Raider
Join Date: Apr 2020
Posts: 8
Question Button types

Hey all, what other options for buttons besides the below code are available?

tabButtons[1] = CreateFrame("Button", nil, frameBattleLog, "UIPanelButtonTemplate")

Would like to do a button like a tab button but don't find anything :/
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2023-06-08 at 09.26.44.png
Views:	45
Size:	22.2 KB
ID:	9824  
  Reply With Quote
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,879
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
06-09-23, 08:51 AM   #3
mataal
A Murloc Raider
Join Date: Apr 2020
Posts: 8
Great, thanks
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Button types


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off