/
opt:ToggleLockBag(nil) |
opt:ToggleButtonScale(nil, nil, nil, nil) |
opt:ToggleBreanniScale(nil, nil) |
opt:ToggleStrata(nil, nil) |
base:Hide() |
end |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
L["Base strata"] = "Strata base" |
L["Change the base frame strata"] = "Change la strata de la frame de base" |
L["Button strata"] = "Strata boutton" |
L["Change the button frames strata"] = "Change la strata de la frame de chaque boutton" |
L["Change the button frames strata"] = "Change la strata de la frame de chaque bouton" |
L["Breanni scale"] = "\195\137chelle de Breanni" |
L["Change the Breanni's button scale"] = "Change l'\195\169chelle du bouton Breanni" |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
L["Change the base frame strata"] = true |
L["Button strata"] = true |
L["Change the button frames strata"] = true |
L["Breanni scale"] = true |
L["Change the Breanni's button scale"] = true |
L["Change the base frame strata"] = "Change the base frame strata" |
L["Button strata"] = "Button strata" |
L["Change the button frames strata"] = "Change the button frames strata" |
L["Breanni scale"] = "Breanni scale" |
L["Change the Breanni's button scale"] = "Change the Breanni's button scale" |
w = 225, |
h = 200, |
sc = 1, |
bsc = 1, |
breannix = 0, |
breanniy = 0, |
buttonpad = 5, |
desc = L["Change mainframe height"], |
type = "range", |
min = 100, max = 800, step = 1, |
set = "ToggleMainFrameHeight", |
get = "IsMainFrameHeight", |
set = function(_, value) OneCompanion.db.profile.sizes.h = value OneCompanionFrames.base:SetHeight(OneCompanion.db.profile.sizes.h) OneCompanionFrames.ShowSlider() end, |
get = function() return OneCompanionFrames.base:GetHeight() end, |
}, |
w = { |
order = 5, |
type = "range", |
min = 112, max = 800, step = 1, |
set = "ToggleMainFrameWidth", |
get = "IsMainFrameWidth", |
get = function() return OneCompanionFrames.base:GetWidth() end, |
}, |
sc = { |
order = 10, |
type = "range", |
min = .1, max = 2, step = 0.05, |
set = "ToggleButtonScale", |
get = "IsButtonScale", |
get = function() return OneCompanion.db.profile.sizes.sc end, |
}, |
bsc = { |
order = 11, |
name = L["Breanni scale"], |
desc = L["Change the Breanni's button scale"], |
type = "range", |
min = .1, max = 2, step = 0.05, |
set = "ToggleBreanniScale", |
get = function() return OneCompanion.db.profile.sizes.bsc end, |
}, |
buttonpad = { |
order = 15, |
name = L["Button padding"], |
desc = L["Change the size between each button"], |
type = "range", |
min = 0, max = 20, step = 0.1, |
set = "ToggleButtonPadding", |
get = "IsButtonPadding", |
set = function(_, value) OneCompanion.db.profile.sizes.buttonpad = value OneCompanionOptions:ToggleButtonScale(nil, nil, value, nil) end, |
get = function() return OneCompanion.db.profile.sizes.buttonpad end, |
}, |
--[[ borderpad = { |
order = 15, |
name = L["Clamped to screen"], |
desc = L["Clamp the mainframe to the screen"], |
set = "ToggleMainFrameClamp", |
get = "IsMainFrameClamp", |
get = function() return OneCompanion.db.profile.misc.clamp end, |
}, |
grip = { |
order = 5, |
name = L["Hide grip"], |
desc = L["Hide or show the index frame grip"], |
set = "ToggleShowGrip", |
get = "IsShowGrip", |
get = function() return OneCompanion.db.profile.misc.grip end, |
}, |
tip = { |
order = 10, |
name = L["Hide tooltips"], |
desc = L["Hide or show the tooltips shown on mouseovering AddOn icons"], |
set = "ToggleShowTooltips", |
get = "IsShowTooltips", |
get = function() return OneCompanion.db.profile.misc.tip end, |
}, |
lockbreanni = { |
order = 15, |
name = L["Lock Breanni"], |
desc = L["Lock the position of Breanni's icon"], |
set = "ToggleLockBreanni", |
get = "IsLockBreanni", |
get = function() return OneCompanion.db.profile.misc.lockbreanni end, |
}, |
lockbag = { |
order = 20, |
name = L["Lock inventory"], |
desc = L["Lock the position of the companion's inventory bag"], |
set = "ToggleLockBag", |
get = "IsLockBag", |
get = function() return OneCompanion.db.profile.misc.lockbag end, |
}, |
stratabase = { |
order = 50, |
desc = L["Change the base frame strata"], |
values = stratas, |
set = "ToggleStrata", |
get = "IsBaseStrata", |
get = function() return OneCompanion.db.profile.misc.stratabase end, |
}, |
stratabtn = { |
order = 55, |
desc = L["Change the button frames strata"], |
values = stratas, |
set = "ToggleStrata", |
get = "IsButtonStrata", |
get = function() return OneCompanion.db.profile.misc.stratabtn end, |
}, |
}, |
}, |
OneCompanionOptions.options = options |
OneCompanionOptions.defaults = defaults |
function OneCompanionOptions:IsBaseStrata() |
local self = OneCompanion |
return self.db.profile.misc.stratabase |
end |
function OneCompanionOptions:IsButtonStrata() |
local self = OneCompanion |
return self.db.profile.misc.stratabtn |
end |
function OneCompanionOptions:ToggleStrata(key, value) |
local self, fra, btn = OneCompanion, OneCompanionFrames, OneCompanionButtons |
if key then self.db.profile.misc[key[3]] = value end |
end |
end |
function OneCompanionOptions:IsLockBag() |
local self = OneCompanion |
return self.db.profile.misc.lockbag |
end |
function OneCompanionOptions:ToggleLockBreanni(value) |
local self, fra = OneCompanion, OneCompanionFrames |
if value then self.db.profile.misc.lockbreanni = not self.db.profile.misc.lockbreanni end |
end |
end |
function OneCompanionOptions:IsLockBreanni() |
local self = OneCompanion |
return self.db.profile.misc.lockbreanni |
end |
function OneCompanionOptions:ToggleButtonPadding(_, value) |
--[[function OneCompanionOptions:ToggleBorderPadding(_, value) |
local self, opt = OneCompanion, OneCompanionOptions |
if value then self.db.profile.sizes.buttonpad = value end |
opt:ToggleButtonScale(nil, nil, value, nil) |
end |
function OneCompanionOptions:ToggleBorderPadding(_, value) |
local self, opt = OneCompanion, OneCompanionOptions |
if value then self.db.profile.sizes.borderpad = value end |
opt:ToggleButtonScale(nil, nil, nil, value) |
end |
function OneCompanionOptions:IsBorderPadding() |
local self = OneCompanion |
return self.db.profile.sizes.borderpad |
end |
end]] |
function OneCompanionOptions:IsButtonPadding() |
local self = OneCompanion |
return self.db.profile.sizes.buttonpad |
end |
function OneCompanionOptions:ToggleMainFrameWidth(_, value) |
local self, fra, opt = OneCompanion, OneCompanionFrames, OneCompanionOptions |
if value then self.db.profile.sizes.w = value end |
opt:ToggleButtonScale(nil, nil, nil, nil) |
end |
function OneCompanionOptions:IsMainFrameWidth() |
function OneCompanionOptions:IsMainFrameHeight() |
local fra = OneCompanionFrames |
local value = fra.base:GetWidth() |
local value = fra.base:GetHeight() |
return value |
end |
function OneCompanionOptions:ToggleMainFrameHeight(_, value) |
function OneCompanionOptions:ToggleBreanniScale(_, value) |
local self, fra = OneCompanion, OneCompanionFrames |
if value then self.db.profile.sizes.h = value end |
fra.base:SetHeight(self.db.profile.sizes.h) |
fra.ShowSlider() |
if value then self.db.profile.sizes.bsc = value end |
fra.breanni:SetScale(self.db.profile.sizes.bsc) |
fra.breanni:SetPoint(self.db.profile.sizes.breannipt, UIParent, self.db.profile.sizes.breannirpt, self.db.profile.sizes.breannix / self.db.profile.sizes.bsc, self.db.profile.sizes.breanniy / self.db.profile.sizes.bsc) |
end |
function OneCompanionOptions:IsMainFrameHeight() |
local fra = OneCompanionFrames |
local value = fra.base:GetHeight() |
return value |
end |
function OneCompanionOptions:ToggleButtonScale(_, v, w, x) |
local self, fra, btn, starter, l = OneCompanion, OneCompanionFrames, OneCompanionButtons, 1, 0 |
if v then self.db.profile.sizes.sc = v else v = self.db.profile.sizes.sc end |
fra.ShowSlider() |
end |
function OneCompanionOptions:IsButtonScale() |
local btn = OneCompanionButtons |
if btn[1] then |
value = btn[1]:GetScale() |
else value = 0 end |
return value |
end |
function OneCompanionOptions:ToggleMainFrameClamp(value) |
local self, fra = OneCompanion, OneCompanionFrames |
if value then self.db.profile.misc.clamp = not self.db.profile.misc.clamp end |
fra.base:SetClampedToScreen(self.db.profile.misc.clamp) |
end |
function OneCompanionOptions:IsMainFrameClamp() |
local self = OneCompanion |
return self.db.profile.misc.clamp |
end |
function OneCompanionOptions:SetColor(key, r, g, b, a) |
local self, fra = OneCompanion, OneCompanionFrames |
if key then |
if self.db.profile.misc.grip then fra.grip:Hide() else fra.grip:Show() end |
end |
function OneCompanionOptions:IsShowGrip() |
local self = OneCompanion |
return self.db.profile.misc.grip |
end |
function OneCompanionOptions:ToggleShowTooltips(value) |
local self, fra, gam = OneCompanion, OneCompanionFrames, GameTooltip |
if value then self.db.profile.misc.tip = not self.db.profile.misc.tip end |
fra.cfgButton:SetScript("OnEnter", nil) |
else |
fra.cfgButton:SetScript("OnEnter", function(self) |
gam:SetOwner(self, "ANCHOR_RIGHT"); |
if ( GetCVar("UberTooltips") == "1" ) then |
GameTooltip_SetDefaultAnchor(gam, self) |
else |
gam:SetOwner(self, "ANCHOR_RIGHT") |
end |
gam:AddLine(L["Settings"]) |
gam:Show() |
end) |
fra.cfgButton:SetScript("OnLeave", function(self) gam:Hide() end) |
end |
end |
function OneCompanionOptions:IsShowTooltips() |
local self = OneCompanion |
return self.db.profile.misc.tip |
end |