WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Button types (https://www.wowinterface.com/forums/showthread.php?t=59610)

mataal 06-08-23 02:34 AM

Button types
 
1 Attachment(s)
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 :/

Fizzlemizz 06-08-23 10:38 AM

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")

mataal 06-09-23 08:51 AM

Great, thanks


All times are GMT -6. The time now is 10:53 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI