Thread Tools Display Modes
09-16-22, 03:38 AM   #1
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
How to build an addon settings panel?

I'm totally lost in the new way to display the settings of an addon.
I looked at the Vertical Layout example found at https://wowpedia.fandom.com/wiki/Pat....0/API_changes.
Sample code works and it is correclty displayed in my addon setttings panel but I would like to add some simple frames with texts (fontStrings), or simple buttons, to this panel.

Thank you for any help.
__________________
Zax - Addons List, not all maintained.
  Reply With Quote
09-16-22, 11:06 AM   #2
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
To be more accurate, I wonder how Combat section title is made in the following screen capture:


__________________
Zax - Addons List, not all maintained.
  Reply With Quote
09-17-22, 04:35 AM   #3
Zax
A Flamescale Wyrmkin
AddOn Author - Click to view addons
Join Date: Aug 2006
Posts: 147
Using the "Canvas" form for a settings panel, I'm unable to deal with check button:

First, it looks weird:


Second, it doesn't work
Lua Code:
  1. local chkButton = CreateFrame("CheckButton", "ChkDarkui", parentFrame, "SettingsCheckBoxControlTemplate")
  2. chkButton:SetPoint("LEFT", subFrame, "RIGHT", 40, 0)
  3. chkButton.Text:SetText("checkbox label ***")
  4. chkButton:SetScript("OnShow", function(self)
  5.     print("show button") -- printed
  6.     self:SetChecked(true) -- seems ignored !!!!!!!!!!!!!!!
  7. end)
  8. chkButton:SetScript("OnClick", function(self)
  9.     print(self:GetChecked(), "check button click TEST")-- nothing happens !!!!!!!!!!!!!!!!!
  10. end)
__________________
Zax - Addons List, not all maintained.
  Reply With Quote

WoWInterface » PTR » PTR General Discussion » How to build an addon settings panel?


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