Skip to content

Commit afc45f2

Browse files
committed
AceConfigDialog-3.0: Forward the "arg" option table member to widgets
Widgets will receive the data through the SetCustomData function, if available, and can act on it as needed. This provides a clear lifecycle function before layout where the data is being made available.
1 parent bcd3113 commit afc45f2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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", 91
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)

0 commit comments

Comments
 (0)