from retail
This commit is contained in:
@@ -903,6 +903,9 @@ function Private.ScanEvents(event, arg1, arg2, ...)
|
||||
end
|
||||
|
||||
function WeakAuras.ScanEvents(event, arg1, arg2, ...)
|
||||
if type(event) ~= "string" then
|
||||
return
|
||||
end
|
||||
scannerFrame:Queue(Private.ScanEvents, event, arg1, arg2, ...)
|
||||
end
|
||||
|
||||
|
||||
@@ -1827,9 +1827,11 @@ function Private.Modernize(data, oldSnapshot)
|
||||
-- noMerge for separator custom option doesn't make sense,
|
||||
-- and groups achieve the desired effect better,
|
||||
-- so drop the feature
|
||||
for _, optionData in ipairs(data.authorOptions) do
|
||||
if optionData.type == "header" then
|
||||
optionData.noMerge = nil
|
||||
if data.authorOptions then
|
||||
for _, optionData in ipairs(data.authorOptions) do
|
||||
if optionData.type == "header" then
|
||||
optionData.noMerge = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -487,8 +487,7 @@ function OptionsPrivate.CreateFrame()
|
||||
if OptionsPrivate.changelog then
|
||||
local changelog
|
||||
if OptionsPrivate.changelog.highlightText then
|
||||
changelog = L["Highlights"] .. "\n" .. OptionsPrivate.changelog.highlightText .. "\n"
|
||||
.. L["Commits"] .. "\n" ..OptionsPrivate.changelog.commitText
|
||||
changelog = L["Highlights"] .. "\n" .. OptionsPrivate.changelog.highlightText
|
||||
else
|
||||
changelog = OptionsPrivate.changelog.commitText
|
||||
end
|
||||
|
||||
@@ -19,6 +19,34 @@ local function createOptions(id, data)
|
||||
bigStep = 0.01,
|
||||
isPercent = true
|
||||
},
|
||||
|
||||
thumbnailIcon = {
|
||||
type = "input",
|
||||
width = WeakAuras.doubleWidth - 0.15,
|
||||
name = L["Thumbnail Icon"],
|
||||
order = 2,
|
||||
get = function()
|
||||
return data.thumbnailIcon and tostring(data.thumbnailIcon) or ""
|
||||
end,
|
||||
set = function(info, v)
|
||||
data.thumbnailIcon = v
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.UpdateThumbnail(data)
|
||||
end
|
||||
},
|
||||
chooseIcon = {
|
||||
type = "execute",
|
||||
width = 0.15,
|
||||
name = L["Choose"],
|
||||
order = 3,
|
||||
func = function()
|
||||
OptionsPrivate.OpenIconPicker(data, { [data.id] = {"thumbnailIcon"} })
|
||||
end,
|
||||
imageWidth = 24,
|
||||
imageHeight = 24,
|
||||
control = "WeakAurasIcon",
|
||||
image = "Interface\\AddOns\\WeakAuras\\Media\\Textures\\browse",
|
||||
},
|
||||
}
|
||||
|
||||
return {
|
||||
@@ -38,11 +66,20 @@ local function createThumbnail()
|
||||
border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp")
|
||||
border:SetTexCoord(0.2, 0.8, 0.2, 0.8)
|
||||
|
||||
local icon = frame:CreateTexture(nil, "OVERLAY")
|
||||
icon:SetAllPoints(frame)
|
||||
frame.icon = icon
|
||||
|
||||
return frame
|
||||
end
|
||||
|
||||
local function modifyThumbnail(parent, frame, data)
|
||||
|
||||
frame.icon:SetTexture(data.thumbnailIcon)
|
||||
if frame.icon:GetTexture() then
|
||||
frame.icon:Show()
|
||||
else
|
||||
frame.icon:Hide()
|
||||
end
|
||||
end
|
||||
|
||||
-- Register new region type options with WeakAuras
|
||||
|
||||
Reference in New Issue
Block a user