WoWInterface SVN OneCompanion

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 28 to Rev 27
    Reverse comparison

Rev 28 → Rev 27

OneCompanion/frames/templates.lua
141,7 → 141,6
opt:ToggleLockBag(nil)
 
opt:ToggleButtonScale(nil, nil, nil, nil)
opt:ToggleBreanniScale(nil, nil)
opt:ToggleStrata(nil, nil)
base:Hide()
end
OneCompanion/locals/enUS.lua
61,5 → 61,3
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
OneCompanion/locals/zhTW.lua
61,5 → 61,3
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"
OneCompanion/locals/ruRU.lua
61,5 → 61,3
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"
OneCompanion/locals/esES.lua
72,5 → 72,3
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"
OneCompanion/locals/frFR.lua
71,6 → 71,4
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 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 button frames strata"] = "Change la strata de la frame de chaque boutton"
OneCompanion/locals/deDE.lua
72,5 → 72,3
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"
OneCompanion/locals/zhCN.lua
61,5 → 61,3
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"
OneCompanion/locals/koKR.lua
61,5 → 61,3
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"
OneCompanion/opts/options.lua
32,7 → 32,6
w = 225,
h = 200,
sc = 1,
bsc = 1,
breannix = 0,
breanniy = 0,
buttonpad = 5,
115,8 → 114,8
desc = L["Change mainframe height"],
type = "range",
min = 100, max = 800, step = 1,
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,
set = "ToggleMainFrameHeight",
get = "IsMainFrameHeight",
},
w = {
order = 5,
125,7 → 124,7
type = "range",
min = 112, max = 800, step = 1,
set = "ToggleMainFrameWidth",
get = function() return OneCompanionFrames.base:GetWidth() end,
get = "IsMainFrameWidth",
},
sc = {
order = 10,
134,25 → 133,16
type = "range",
min = .1, max = 2, step = 0.05,
set = "ToggleButtonScale",
get = function() return OneCompanion.db.profile.sizes.sc end,
get = "IsButtonScale",
},
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 = function(_, value) OneCompanion.db.profile.sizes.buttonpad = value OneCompanionOptions:ToggleButtonScale(nil, nil, value, nil) end,
get = function() return OneCompanion.db.profile.sizes.buttonpad end,
set = "ToggleButtonPadding",
get = "IsButtonPadding",
},
--[[ borderpad = {
order = 15,
229,7 → 219,7
name = L["Clamped to screen"],
desc = L["Clamp the mainframe to the screen"],
set = "ToggleMainFrameClamp",
get = function() return OneCompanion.db.profile.misc.clamp end,
get = "IsMainFrameClamp",
},
grip = {
order = 5,
237,7 → 227,7
name = L["Hide grip"],
desc = L["Hide or show the index frame grip"],
set = "ToggleShowGrip",
get = function() return OneCompanion.db.profile.misc.grip end,
get = "IsShowGrip",
},
tip = {
order = 10,
245,7 → 235,7
name = L["Hide tooltips"],
desc = L["Hide or show the tooltips shown on mouseovering AddOn icons"],
set = "ToggleShowTooltips",
get = function() return OneCompanion.db.profile.misc.tip end,
get = "IsShowTooltips",
},
lockbreanni = {
order = 15,
253,7 → 243,7
name = L["Lock Breanni"],
desc = L["Lock the position of Breanni's icon"],
set = "ToggleLockBreanni",
get = function() return OneCompanion.db.profile.misc.lockbreanni end,
get = "IsLockBreanni",
},
lockbag = {
order = 20,
261,7 → 251,7
name = L["Lock inventory"],
desc = L["Lock the position of the companion's inventory bag"],
set = "ToggleLockBag",
get = function() return OneCompanion.db.profile.misc.lockbag end,
get = "IsLockBag",
},
stratabase = {
order = 50,
270,7 → 260,7
desc = L["Change the base frame strata"],
values = stratas,
set = "ToggleStrata",
get = function() return OneCompanion.db.profile.misc.stratabase end,
get = "IsBaseStrata",
},
stratabtn = {
order = 55,
279,7 → 269,7
desc = L["Change the button frames strata"],
values = stratas,
set = "ToggleStrata",
get = function() return OneCompanion.db.profile.misc.stratabtn end,
get = "IsButtonStrata",
},
},
},
297,6 → 287,16
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
331,6 → 331,11
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
345,8 → 350,19
end
end
 
--[[function OneCompanionOptions:ToggleBorderPadding(_, value)
function OneCompanionOptions:IsLockBreanni()
local self = OneCompanion
return self.db.profile.misc.lockbreanni
end
 
function OneCompanionOptions:ToggleButtonPadding(_, 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
354,8 → 370,13
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
365,19 → 386,26
opt:ToggleButtonScale(nil, nil, nil, nil)
end
 
function OneCompanionOptions:IsMainFrameHeight()
function OneCompanionOptions:IsMainFrameWidth()
local fra = OneCompanionFrames
local value = fra.base:GetHeight()
local value = fra.base:GetWidth()
return value
end
 
function OneCompanionOptions:ToggleBreanniScale(_, value)
function OneCompanionOptions:ToggleMainFrameHeight(_, value)
local self, fra = OneCompanion, OneCompanionFrames
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)
if value then self.db.profile.sizes.h = value end
fra.base:SetHeight(self.db.profile.sizes.h)
fra.ShowSlider()
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
407,12 → 435,26
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
431,6 → 473,11
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
438,14 → 485,15
fra.cfgButton:SetScript("OnEnter", nil)
else
fra.cfgButton:SetScript("OnEnter", function(self)
if ( GetCVar("UberTooltips") == "1" ) then
GameTooltip_SetDefaultAnchor(gam, self)
else
gam:SetOwner(self, "ANCHOR_RIGHT")
end
gam:SetOwner(self, "ANCHOR_RIGHT");
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
OneCompanion Property changes : Deleted: svn:ignore - changes.txt