2021-05-17 16:49:54 +02:00
|
|
|
local Gladdy = LibStub("Gladdy")
|
|
|
|
local L = Gladdy.L
|
|
|
|
|
|
|
|
local XiconProfiles = Gladdy:NewModule("XiconProfiles", nil, {
|
|
|
|
})
|
|
|
|
|
|
|
|
function XiconProfiles:ApplyKlimp()
|
2021-05-18 16:34:10 +02:00
|
|
|
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKlimpProfile())
|
2021-05-17 18:22:31 +02:00
|
|
|
if deserialized then
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
2021-05-17 18:22:31 +02:00
|
|
|
end
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy:Reset()
|
|
|
|
Gladdy:HideFrame()
|
|
|
|
Gladdy:ToggleFrame(3)
|
2021-05-17 16:49:54 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function XiconProfiles:ApplyKnall()
|
2021-05-18 16:34:10 +02:00
|
|
|
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetKnallProfile())
|
2021-05-17 18:22:31 +02:00
|
|
|
if deserialized then
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
2021-05-17 18:22:31 +02:00
|
|
|
end
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy:Reset()
|
|
|
|
Gladdy:HideFrame()
|
|
|
|
Gladdy:ToggleFrame(3)
|
2021-05-17 16:49:54 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
function XiconProfiles:ApplyClassic()
|
2021-05-18 16:34:10 +02:00
|
|
|
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetClassicProfile())
|
2021-05-17 18:22:31 +02:00
|
|
|
if deserialized then
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
2021-05-17 18:22:31 +02:00
|
|
|
end
|
2021-05-18 16:34:10 +02:00
|
|
|
Gladdy:Reset()
|
|
|
|
Gladdy:HideFrame()
|
|
|
|
Gladdy:ToggleFrame(3)
|
2021-05-17 16:49:54 +02:00
|
|
|
end
|
|
|
|
|
2021-05-22 14:24:20 +02:00
|
|
|
function XiconProfiles:ApplyBlizz()
|
|
|
|
local deserialized = Gladdy.modules["ExportImport"]:Decode(Gladdy:GetBlizzardProfile())
|
|
|
|
if deserialized then
|
|
|
|
Gladdy.modules["ExportImport"]:ApplyImport(deserialized, Gladdy.db)
|
|
|
|
end
|
|
|
|
Gladdy:Reset()
|
|
|
|
Gladdy:HideFrame()
|
|
|
|
Gladdy:ToggleFrame(3)
|
|
|
|
end
|
|
|
|
|
2021-05-17 16:49:54 +02:00
|
|
|
function XiconProfiles:GetOptions()
|
|
|
|
return {
|
2021-05-22 14:24:20 +02:00
|
|
|
headerProfileBlizzard = {
|
|
|
|
type = "header",
|
|
|
|
name = L["Blizzard Profile"],
|
|
|
|
order = 2,
|
|
|
|
},
|
|
|
|
blizzardProfile = {
|
|
|
|
type = "execute",
|
|
|
|
func = function()
|
|
|
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
|
|
|
XiconProfiles:ApplyBlizz()
|
|
|
|
end,
|
|
|
|
name = " ",
|
|
|
|
desc = "Blizzard Profile",
|
|
|
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Blizz1.blp",
|
|
|
|
imageWidth = 350,
|
|
|
|
imageHeight = 175,
|
|
|
|
width = "full",
|
|
|
|
order = 3,
|
|
|
|
},
|
2021-05-17 16:49:54 +02:00
|
|
|
headerProfileClassic = {
|
|
|
|
type = "header",
|
|
|
|
name = L["Classic Profile"],
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 4,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
|
|
|
classicProfile = {
|
|
|
|
type = "execute",
|
|
|
|
func = function()
|
|
|
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
|
|
|
XiconProfiles:ApplyClassic()
|
|
|
|
end,
|
|
|
|
name = " ",
|
|
|
|
desc = "Classic Profile",
|
|
|
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Classic1.blp",
|
2021-05-20 01:23:55 +02:00
|
|
|
imageWidth = 350,
|
|
|
|
imageHeight = 175,
|
2021-05-17 16:49:54 +02:00
|
|
|
width = "full",
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 5,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
|
|
|
headerProfileKnall = {
|
|
|
|
type = "header",
|
|
|
|
name = L["Knall's Profile"],
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 6,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
|
|
|
knallProfile = {
|
|
|
|
type = "execute",
|
|
|
|
func = function()
|
|
|
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
|
|
|
XiconProfiles:ApplyKnall()
|
|
|
|
end,
|
|
|
|
name = " ",
|
|
|
|
desc = "Knall's Profile",
|
|
|
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Knall1.blp",
|
2021-05-20 01:23:55 +02:00
|
|
|
imageWidth = 350,
|
|
|
|
imageHeight = 175,
|
2021-05-17 16:49:54 +02:00
|
|
|
width = "full",
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 7,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
|
|
|
headerProfileKlimp = {
|
|
|
|
type = "header",
|
|
|
|
name = L["Klimp's Profile"],
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 8,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
|
|
|
klimpProfiles = {
|
|
|
|
type = "execute",
|
|
|
|
func = function()
|
|
|
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
|
|
|
XiconProfiles:ApplyKlimp()
|
|
|
|
end,
|
|
|
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Klimp1.blp",
|
2021-05-20 01:23:55 +02:00
|
|
|
imageWidth = 350,
|
|
|
|
imageHeight = 175,
|
2021-05-17 16:49:54 +02:00
|
|
|
name = " ",
|
|
|
|
desc = "Klimp's Profile",
|
|
|
|
width = "full",
|
2021-05-22 14:24:20 +02:00
|
|
|
order = 9,
|
2021-05-17 16:49:54 +02:00
|
|
|
},
|
2021-05-22 14:24:20 +02:00
|
|
|
|
2021-05-17 16:49:54 +02:00
|
|
|
}
|
|
|
|
end
|