from retail
This commit is contained in:
@@ -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