/
local ACD = LibStub("AceConfigDialog-3.0") |
local stratas = {["BACKGROUND"]="BACKGROUND", ["LOW"]="LOW", ["MEDIUM"]="MEDIUM", ["HIGH"]="HIGH", ["DIALOG"]="DIALOG", |
["FULLSCREEN"]="FULLSCREEN", ["FULLSCREEN_DIALOG"]="FULLSCREEN_DIALOG", ["TOOLTIP"]="TOOLTIP"} |
local borderstyles = { |
[""] = "none", |
["Interface\\Tooltips\\UI-Tooltip-Border"] = "UI-Tooltip-Border", |
["Interface\\AchievementFrame\\UI-Achievement-WoodBorder"] = "UI-Achievement-WoodBorder", |
["Interface\\DialogFrame\\UI-DialogBox-Border"] = "UI-DialogBox-Border", |
["Interface\\DialogFrame\\UI-DialogBox-Gold-Border"] = "UI-DialogBox-Gold-Border", |
["Interface\\CHARACTERFRAME\\UI-Party-Border"] = "UI-Party-Border", |
["Interface\\BUTTONS\\UI-SliderBar-Border"] = "UI-SliderBar-Border", |
} |
local defaults = { |
profile = { |
lockbag = false, |
stratabase = "BACKGROUND", |
stratabtn = "BACKGROUND", |
borderstyles = "Interface\\Tooltips\\UI-Tooltip-Border" |
} |
} |
} |
set = "ToggleLockBag", |
get = function() return OneCompanion.db.profile.misc.lockbag end, |
}, |
borderstyles = { |
order = 49, |
type = "select", |
name = L["Border style"], |
desc = L["Change the border style"], |
values = borderstyles, |
set = "ToggleBorders", |
get = function() return OneCompanion.db.profile.misc.borderstyles end, |
}, |
stratabase = { |
order = 50, |
type = "select", |
OneCompanionOptions.options = options |
OneCompanionOptions.defaults = defaults |
function OneCompanionOptions:ToggleBorders(key, value) |
local self, fra, opt = OneCompanion, OneCompanionFrames, OneCompanionOptions |
if key then self.db.profile.misc[key[3]] = value end |
local defaultBackdrop = { |
bgFile = [[Interface\ChatFrame\ChatFrameBackground]], |
edgeFile = self.db.profile.misc.borderstyles, |
tile = true, tileSize = 16, edgeSize = 16, |
insets = { left = 5, right = 5, top = 5, bottom = 5 } } |
fra.model:SetBackdrop(defaultBackdrop) |
fra.footer:SetBackdrop(defaultBackdrop) |
fra.index:SetBackdrop(defaultBackdrop) |
opt:SetColor(nil, nil, nil, nil, nil) |
end |
function OneCompanionOptions:ToggleStrata(key, value) |
local self, fra, btn = OneCompanion, OneCompanionFrames, OneCompanionButtons |
if key then self.db.profile.misc[key[3]] = value end |
if value then self.db.profile.misc.tip = not self.db.profile.misc.tip end |
if self.db.profile.misc.tip then |
fra.cfgButton:SetScript("OnEnter", nil) |
fra.modButton:SetScript("OnEnter", nil) |
for i, j in ipairs(btn) do j:SetScript("OnEnter", nil) end |
else |
fra.cfgButton:SetScript("OnEnter", function(self) |
edgeFile = [[Interface\Buttons\UI-SliderBar-Border]], |
tile = true, tileSize = 8, edgeSize = 8, |
insets = { left = 3, right = 3, top = 3, bottom = 3 } } |
local defaultBackdrop = { |
bgFile = [[Interface\ChatFrame\ChatFrameBackground]], |
edgeFile = [[Interface\Tooltips\UI-Tooltip-Border]], |
tile = true, tileSize = 16, edgeSize = 16, |
insets = { left = 5, right = 5, top = 5, bottom = 5 } } |
texture:SetAllPoints(breanni) |
texture:SetTexture([[Interface\AddOns\OneCompanion\textures\breanni]]) |
breanni:SetPoint(self.db.profile.sizes.breannipt, UIParent, self.db.profile.sizes.breannirpt, self.db.profile.sizes.breannix, self.db.profile.sizes.breanniy) |
model:SetHeight(self.db.profile.sizes.mh) |
model:SetWidth(self.db.profile.sizes.mw) |
model:SetPoint("TOPLEFT", base, "TOPRIGHT", 0, 0) |
model:SetBackdrop(defaultBackdrop) |
footer:SetHeight(30) |
footer:SetWidth(self.db.profile.sizes.w) |
footer:SetPoint("BOTTOMLEFT", base, "BOTTOMLEFT", 0, 0) |
footer:SetPoint("BOTTOMRIGHT", base, "BOTTOMRIGHT", 0, 0) |
footer:SetBackdrop(defaultBackdrop) |
scrollindex:SetScrollChild(child) |
index:SetWidth(self.db.profile.sizes.w) |
index:SetPoint("BOTTOMLEFT", footer, "TOPLEFT", 0, 0) |
index:SetPoint("BOTTOMRIGHT", footer, "TOPRIGHT", 0, 0) |
index:SetPoint("TOPLEFT", base, "TOPLEFT", 0, 0) |
index:SetPoint("TOPRIGHT", base, "TOPRIGHT", 0, 0) |
index:SetBackdrop(defaultBackdrop) |
modelindex:SetPoint("BOTTOMLEFT", model, "BOTTOMLEFT", 5, 5) |
modelindex:SetPoint("BOTTOMRIGHT", model, "BOTTOMRIGHT", -5, 5) |
modelindex:SetPoint("TOPLEFT", model, "TOPLEFT", 5, -5) |
base:Hide() |
model:Hide() |
opt:ToggleBorders(nil, nil) |
opt:ToggleShowTooltips(nil, nil, nil) |
opt:SetColor(nil, nil, nil, nil, nil) |
opt:ToggleMainFrameClamp(nil) |
L["Ctrl-click any companion icon to show its 3D preview"] = true |
L["Click to open/close the Ace3 configuration window"] = true |
L["Ctrl-click to show the 3D preview"] = true |
L["Border style"] = true |
L["Change the border style"] = true |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-clic sur un compagnon pour afficher son aper\195\167u 3D" |
L["Click to open/close the Ace3 configuration window"] = "Clic pour ouvrir/fermer la fen\195\170tre de configuration Ace3" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-clic pour afficher l'aper\195\167u 3D" |
L["Border style"] = "Style bordure" |
L["Change the border style"] = "Change le style des bordures" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |
L["Ctrl-click any companion icon to show its 3D preview"] = "Ctrl-click any companion icon to show its 3D preview" |
L["Click to open/close the Ace3 configuration window"] = "Click to open/close the Ace3 configuration window" |
L["Ctrl-click to show the 3D preview"] = "Ctrl-click to show the 3D preview" |
L["Border style"] = "Border style" |
L["Change the border style"] = "Change the border style" |