Skip to content

Commit 99f37be

Browse files
committed
update toc and libs
1 parent 8917a0d commit 99f37be

File tree

5 files changed

+51
-30
lines changed

5 files changed

+51
-30
lines changed

DevTool.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Interface: 11507, 50501, 110207, 120000
1+
## Interface: 11508, 50503, 120000
22
## Title: DevTool
33
## Notes: A multipurpose tool to assist with addon development
44
## IconTexture: Interface\Icons\inv_misc_gear_08

Libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
22
-- @class file
33
-- @name AceConfigDialog-3.0
4-
-- @release $Id: AceConfigDialog-3.0.lua 1372 2025-10-05 05:38:34Z nevcairiel $
4+
-- @release $Id: AceConfigDialog-3.0.lua 1386 2025-12-11 18:25:02Z nevcairiel $
55

66
local LibStub = LibStub
77
local gui = LibStub("AceGUI-3.0")
88
local reg = LibStub("AceConfigRegistry-3.0")
99

10-
local MAJOR, MINOR = "AceConfigDialog-3.0", 89
10+
local MAJOR, MINOR = "AceConfigDialog-3.0", 92
1111
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
1212

1313
if not AceConfigDialog then return end
@@ -1083,6 +1083,11 @@ local function InjectInfo(control, options, option, path, rootframe, appName)
10831083
control:SetCallback("OnRelease", CleanUserData)
10841084
control:SetCallback("OnLeave", OptionOnMouseLeave)
10851085
control:SetCallback("OnEnter", OptionOnMouseOver)
1086+
1087+
-- forward custom arg data directly
1088+
if control.SetCustomData and option.arg then
1089+
safecall(control.SetCustomData, control, option.arg)
1090+
end
10861091
end
10871092

10881093
local function CreateControl(userControlType, fallbackControlType)
@@ -1436,12 +1441,15 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
14361441
if control then
14371442
if control.width ~= "fill" then
14381443
local width = GetOptionsMemberValue("width",v,options,path,appName)
1444+
local relWidth = GetOptionsMemberValue("relWidth",v,options,path,appName)
14391445
if width == "double" then
14401446
control:SetWidth(width_multiplier * 2)
14411447
elseif width == "half" then
14421448
control:SetWidth(width_multiplier / 2)
14431449
elseif (type(width) == "number") then
14441450
control:SetWidth(width_multiplier * width)
1451+
elseif width == "relative" and relWidth then
1452+
control:SetRelativeWidth(relWidth)
14451453
elseif width == "full" then
14461454
control.width = "fill"
14471455
else
@@ -1945,6 +1953,8 @@ else
19451953
AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
19461954
end
19471955

1956+
AceConfigDialog.BlizOptionsIDMap = AceConfigDialog.BlizOptionsIDMap or {}
1957+
19481958
local function FeedToBlizPanel(widget, event)
19491959
local path = widget:GetUserData("path")
19501960
AceConfigDialog:Open(widget:GetUserData("appName"), widget, unpack(path or emptyTbl))
@@ -1966,16 +1976,17 @@ end
19661976
-- has to be a head-level note.
19671977
--
19681978
-- This function returns a reference to the container frame registered with the Interface
1969-
-- Options. You can use this reference to open the options with the API function
1970-
-- `InterfaceOptionsFrame_OpenToCategory`.
1979+
-- Options, as well as the registered ID. You can use the ID to open the options with
1980+
-- the API function `Settings.OpenToCategory`.
19711981
-- @param appName The application name as given to `:RegisterOptionsTable()`
19721982
-- @param name A descriptive name to display in the options tree (defaults to appName)
19731983
-- @param parent The parent to use in the interface options tree.
19741984
-- @param ... The path in the options table to feed into the interface options panel.
19751985
-- @return The reference to the frame registered into the Interface Options.
1976-
-- @return The category ID to pass to Settings.OpenToCategory (or InterfaceOptionsFrame_OpenToCategory)
1986+
-- @return The category ID to pass to Settings.OpenToCategory
19771987
function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
19781988
local BlizOptions = AceConfigDialog.BlizOptions
1989+
local BlizOptionsIDMap = AceConfigDialog.BlizOptionsIDMap
19791990

19801991
local key = appName
19811992
for n = 1, select("#", ...) do
@@ -2001,29 +2012,32 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
20012012
end
20022013
group:SetCallback("OnShow", FeedToBlizPanel)
20032014
group:SetCallback("OnHide", ClearBlizPanel)
2004-
if Settings and Settings.RegisterCanvasLayoutCategory then
2005-
local categoryName = name or appName
2006-
if parent then
2007-
local category = Settings.GetCategory(parent)
2008-
if not category then
2009-
error(("The parent category '%s' was not found"):format(parent), 2)
2010-
end
2011-
local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName)
20122015

2013-
-- force the generated ID to be used for subcategories, as these can have very simple names like "Profiles"
2014-
group:SetName(subcategory.ID, parent)
2015-
else
2016-
local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName)
2017-
-- using appName here would be cleaner, but would not be 100% compatible
2018-
-- but for top-level categories it should be fine, as these are typically addon names
2019-
category.ID = categoryName
2020-
group:SetName(categoryName, parent)
2021-
Settings.RegisterAddOnCategory(category)
2016+
local categoryName = name or appName
2017+
if parent then
2018+
local parentID = BlizOptionsIDMap[parent] or parent
2019+
local category = Settings.GetCategory(parentID)
2020+
if not category then
2021+
error(("The parent category '%s' was not found"):format(parent), 2)
20222022
end
2023+
local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName)
2024+
group:SetName(subcategory.ID, parentID)
20232025
else
2024-
group:SetName(name or appName, parent)
2025-
InterfaceOptions_AddCategory(group.frame)
2026+
if BlizOptionsIDMap[categoryName] then
2027+
error(("%s has already been added to the Blizzard Options Window with the given name: %s"):format(appName, categoryName), 2)
2028+
end
2029+
2030+
local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName)
2031+
if not (C_SettingsUtil and C_SettingsUtil.OpenSettingsPanel) then
2032+
-- override the ID so the name can be used in Settings.OpenToCategory
2033+
-- unfortunately with incoming API changes in 12.0 (and likely classic at some point) this override is no longer possible
2034+
category.ID = categoryName
2035+
end
2036+
group:SetName(category.ID)
2037+
BlizOptionsIDMap[categoryName] = category.ID
2038+
Settings.RegisterAddOnCategory(category)
20262039
end
2040+
20272041
return group.frame, group.frame.name
20282042
else
20292043
error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)

Libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
99
-- @class file
1010
-- @name AceConfigRegistry-3.0
11-
-- @release $Id: AceConfigRegistry-3.0.lua 1296 2022-11-04 18:50:10Z nevcairiel $
11+
-- @release $Id: AceConfigRegistry-3.0.lua 1385 2025-12-06 11:26:20Z nevcairiel $
1212
local CallbackHandler = LibStub("CallbackHandler-1.0")
1313

14-
local MAJOR, MINOR = "AceConfigRegistry-3.0", 21
14+
local MAJOR, MINOR = "AceConfigRegistry-3.0", 22
1515
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
1616

1717
if not AceConfigRegistry then return end
@@ -92,6 +92,7 @@ local basekeys={
9292
func=optmethodfalse,
9393
arg={["*"]=true},
9494
width=optstringnumber,
95+
relWidth=optnumber,
9596
}
9697

9798
local typedkeys={

Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
TreeGroup Container
33
Container that uses a tree control to switch between groups.
44
-------------------------------------------------------------------------------]]
5-
local Type, Version = "TreeGroup", 48
5+
local Type, Version = "TreeGroup", 49
66
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
77
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
88

@@ -206,7 +206,7 @@ local function Button_OnEnter(frame)
206206
tooltip:SetOwner(frame, "ANCHOR_NONE")
207207
tooltip:ClearAllPoints()
208208
tooltip:SetPoint("LEFT",frame,"RIGHT")
209-
tooltip:SetText(frame.text:GetText() or "", 1, .82, 0, true)
209+
tooltip:SetText(frame.text:GetText() or "", 1, .82, 0, 1, true)
210210

211211
tooltip:Show()
212212
end

Libs/AceGUI-3.0/widgets/AceGUIWidget-Keybinding.lua

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Keybinding Widget
33
Set Keybindings in the Config UI.
44
-------------------------------------------------------------------------------]]
5-
local Type, Version = "Keybinding", 26
5+
local Type, Version = "Keybinding", 27
66
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
77
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
88

@@ -31,12 +31,14 @@ local function Keybinding_OnClick(frame, button)
3131
if self.waitingForKey then
3232
frame:EnableKeyboard(false)
3333
frame:EnableMouseWheel(false)
34+
frame:EnableGamePadButton(false)
3435
self.msgframe:Hide()
3536
frame:UnlockHighlight()
3637
self.waitingForKey = nil
3738
else
3839
frame:EnableKeyboard(true)
3940
frame:EnableMouseWheel(true)
41+
frame:EnableGamePadButton(true)
4042
self.msgframe:Show()
4143
frame:LockHighlight()
4244
self.waitingForKey = true
@@ -72,6 +74,7 @@ local function Keybinding_OnKeyDown(frame, key)
7274

7375
frame:EnableKeyboard(false)
7476
frame:EnableMouseWheel(false)
77+
frame:EnableGamePadButton(false)
7578
self.msgframe:Hide()
7679
frame:UnlockHighlight()
7780
self.waitingForKey = nil
@@ -119,6 +122,7 @@ local methods = {
119122
self:SetDisabled(false)
120123
self.button:EnableKeyboard(false)
121124
self.button:EnableMouseWheel(false)
125+
self.button:EnableGamePadButton(false)
122126
end,
123127

124128
-- ["OnRelease"] = nil,
@@ -195,10 +199,12 @@ local function Constructor()
195199
button:SetScript("OnKeyDown", Keybinding_OnKeyDown)
196200
button:SetScript("OnMouseDown", Keybinding_OnMouseDown)
197201
button:SetScript("OnMouseWheel", Keybinding_OnMouseWheel)
202+
button:SetScript("OnGamePadButtonDown", Keybinding_OnKeyDown)
198203
button:SetPoint("BOTTOMLEFT")
199204
button:SetPoint("BOTTOMRIGHT")
200205
button:SetHeight(24)
201206
button:EnableKeyboard(false)
207+
button:EnableGamePadButton(false)
202208

203209
local text = button:GetFontString()
204210
text:SetPoint("LEFT", 7, 0)

0 commit comments

Comments
 (0)