WoWInterface SVN OneCompanion

Compare Revisions

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

Rev 27 → Rev 28

OneCompanion/frames/templates.lua
141,6 → 141,7
opt:ToggleLockBag(nil)
 
opt:ToggleButtonScale(nil, nil, nil, nil)
opt:ToggleBreanniScale(nil, nil)
opt:ToggleStrata(nil, nil)
base:Hide()
end
OneCompanion/locals/zhTW.lua
61,3 → 61,5
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,3 → 61,5
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,3 → 72,5
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,4 → 71,6
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"
OneCompanion/locals/deDE.lua
72,3 → 72,5
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,3 → 61,5
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,3 → 61,5
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/enUS.lua
61,3 → 61,5
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/opts/options.lua
32,6 → 32,7
w = 225,
h = 200,
sc = 1,
bsc = 1,
breannix = 0,
breanniy = 0,
buttonpad = 5,
114,8 → 115,8
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,
124,7 → 125,7
type = "range",
min = 112, max = 800, step = 1,
set = "ToggleMainFrameWidth",
get = "IsMainFrameWidth",
get = function() return OneCompanionFrames.base:GetWidth() end,
},
sc = {
order = 10,
133,16 → 134,25
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,
219,7 → 229,7
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,
227,7 → 237,7
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,
235,7 → 245,7
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,
243,7 → 253,7
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,
251,7 → 261,7
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,
260,7 → 270,7
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,
269,7 → 279,7
desc = L["Change the button frames strata"],
values = stratas,
set = "ToggleStrata",
get = "IsButtonStrata",
get = function() return OneCompanion.db.profile.misc.stratabtn end,
},
},
},
287,16 → 297,6
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,11 → 331,6
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
350,19 → 345,8
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
370,13 → 354,8
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
386,26 → 365,19
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
435,26 → 407,12
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
473,11 → 431,6
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
485,15 → 438,14
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
OneCompanion Property changes : Added: svn:ignore + changes.txt