WoWInterface SVN OneCompanion

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/OneCompanion/opts
    from Rev 33 to Rev 34
    Reverse comparison

Rev 33 → Rev 34

options.lua
20,6 → 20,15
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 = {
59,6 → 68,7
lockbag = false,
stratabase = "BACKGROUND",
stratabtn = "BACKGROUND",
borderstyles = "Interface\\Tooltips\\UI-Tooltip-Border"
}
}
}
314,6 → 324,15
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",
348,6 → 367,20
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
529,6 → 562,7
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)