/trunk/OneCompanion/opts
Description: OneCompanion is an alternative to the default companion frame introduced in WotLK that combines all your companions and mounts into one fully customizable frame |
]] |
local WotLK = select(4,GetBuildInfo()) >= 30000 |
if not WotLK then return end |
if not (select(4,GetBuildInfo()) >= 30000) then return end |
local MINOR_VERSION = tonumber(("$Revision$"):match("%d+")) |
if MINOR_VERSION > _G.OneCompanion_MINOR_VERSION then G.OneCompanion_MINOR_VERSION = MINOR_VERSION end |
OneCompanionOptions = {} |
local L = LibStub("AceLocale-3.0"):GetLocale("OneCompanion") |
OCstop = function() fra.base:StopMovingOrSizing() fra:SetAnchors(fra.base) end |
end |
for i, j in pairs(fra) do |
if type(fra[i]) ~= "function" and i ~= "breanni" and i ~= "grip" and i ~= "slider" then |
if type(fra[i]) ~= "function" and i ~= "breanni" and i ~= "grip" and i ~= "slider" and i ~= "footerText" and i ~= "footerRev" then |
if i == "scrollindex" then fra[i]:SetFrameLevel(0) end |
fra[i]:SetScript("OnMouseDown", OCstart) |
fra[i]:SetScript("OnMouseUp", OCstop) |
end |
end |
end |
local f, s, p = fra.footerText:GetFont() |
if fra.footer:GetWidth() < 140 then |
fra.footerText:SetFont(f, 8, p) |
fra.footerText:SetPoint("BOTTOMRIGHT", fra.footerRev, "TOPRIGHT", 0, 0) |
else |
fra.footerText:SetFont(f, 12, p) |
fra.footerText:SetPoint("BOTTOMRIGHT", fra.footerRev, "TOPLEFT", 0, -4) |
end |
fra.ShowSlider() |
end |