/
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
local L = LibStub("AceLocale-3.0"):GetLocale("OneCompanion") |
local AC = LibStub("AceConfig-3.0") |
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 defaults = { |
profile = { |
tip = false, |
lockbreanni = false, |
lockbag = false, |
stratabase = "BACKGROUND", |
stratabtn = "BACKGROUND", |
} |
} |
} |
set = "ToggleLockBag", |
get = "IsLockBag", |
}, |
stratabase = { |
order = 50, |
type = "select", |
name = L["Base strata"], |
desc = L["Change the base frame strata"], |
values = stratas, |
set = "ToggleStrata", |
get = "IsBaseStrata", |
}, |
stratabtn = { |
order = 55, |
type = "select", |
name = L["Button strata"], |
desc = L["Change the button frames strata"], |
values = stratas, |
set = "ToggleStrata", |
get = "IsButtonStrata", |
}, |
}, |
}, |
} |
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 |
fra.base:SetFrameStrata(self.db.profile.misc.stratabase) |
for i, j in ipairs(btn) do |
j:SetToplevel(true) |
j:SetFrameStrata(self.db.profile.misc.stratabtn) |
end |
end |
function OneCompanionOptions:ToggleLockBag(value) |
local self, fra = OneCompanion, OneCompanionFrames |
local self, fra, btn = OneCompanion, OneCompanionFrames, OneCompanionButtons |
if value then self.db.profile.misc.lockbag = not self.db.profile.misc.lockbag end |
if self.db.profile.misc.lockbag then |
fra.base:SetMovable(false) |
fra[i]:SetScript("OnMouseUp", OCstop) |
end |
end |
for i, j in ipairs(btn) do |
j:SetScript("OnDragStart", OCstart) |
j:SetScript("OnDragStop", OCstop) |
end |
end |
function OneCompanionOptions:IsLockBag() |
## Interface: 30000 |
## Title: OneCompanion |cff7fff7f -Ace3-|r |
## Version: 3.0.2.wowi:revision |
## Version: 3.0.2.$Revision$ |
## X-Date: $Date$ |
## Author: Mera_LaCroisadeEcarlate |
## Notes: OneCompanion is an alternative to the default companion frame introduced in WotLK that combines all your companions and mounts into one fully customizable frame |
## X-eMail: ad@heapoverflow.com |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
OneCompanionFrames, OneCompanionButtons, OneCompanionMaxHeight = {}, {}, 0 |
local L = LibStub("AceLocale-3.0"):GetLocale("OneCompanion") |
local version = GetAddOnMetadata("OneCompanion", "Version") |
function OneCompanionFrames:build() |
local self, fra, opt = OneCompanion, OneCompanionFrames, OneCompanionOptions |
index:SetPoint("TOPLEFT", base, "TOPLEFT", 0, 0) |
index:SetPoint("TOPRIGHT", base, "TOPRIGHT", 0, 0) |
index:SetBackdrop(indexBackdrop) |
-- index:SetToplevel(true) |
-- index:SetFrameStrata("FULLSCREEN_DIALOG") |
-- base:SetFrameStrata("BACKGROUND") |
scrollindex:SetPoint("TOPLEFT", self.db.profile.sizes.borderpad, - self.db.profile.sizes.borderpad) |
scrollindex:SetPoint("TOPRIGHT", - self.db.profile.sizes.borderpad, - self.db.profile.sizes.borderpad) |
scrollindex:SetPoint("BOTTOMLEFT", self.db.profile.sizes.borderpad, self.db.profile.sizes.borderpad) |
fra.grip = grip |
fra.cfgButton = cfgButton |
fra.breanni = breanni |
fra:SetAnchors(nil) |
-- fra:SetAnchors(nil) |
opt:ToggleShowTooltips(nil) |
opt:SetColor(nil, nil, nil, nil, nil) |
opt:ToggleMainFrameClamp(nil) |
opt:ToggleShowGrip(nil) |
opt:ToggleLockBreanni(nil) |
fra:buildButtons() |
opt:ToggleLockBag(nil) |
fra:buildButtons() |
opt:ToggleButtonScale(nil, nil, nil, nil) |
opt:ToggleStrata(nil, nil) |
base:Hide() |
end |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = true |
L["Lock inventory"] = true |
L["Lock the position of the companion's inventory bag"] = true |
L["Base strata"] = true |
L["Change the base frame strata"] = true |
L["Button strata"] = true |
L["Change the button frames strata"] = true |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Bloque la position de l'ic\195\180ne de Breanni" |
L["Lock inventory"] = "Bloquer inventaire" |
L["Lock the position of the companion's inventory bag"] = "Bloque la position de la fen\195\170tre inventaire des compagnons" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |
--[[ |
Name: OneCompanion |
Version: 3.0.2.wowi:revision |
Version: 3.0.2.$Revision$ |
$Date$ |
Author(s): Mera_LaCroisadeEcarlate (ad@heapoverflow.com) |
Playing: Mera,Merae,Merah & FathisUles on EU FR-La Croisade Ecarlate ;) |
Website: http://- |
L["Lock the position of Breanni's icon"] = "Lock the position of Breanni's icon" |
L["Lock inventory"] = "Lock companion's bag" |
L["Lock the position of the companion's inventory bag"] = "Lock the position of the companion's inventory bag" |
L["Base strata"] = "Base strata" |
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" |