WoWInterface SVN OneCompanion

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 29 to Rev 30
    Reverse comparison

Rev 29 → Rev 30

OneCompanion/frames/templates.lua
65,14 → 65,11
index:SetPoint("TOPLEFT", base, "TOPLEFT", 0, 0)
index:SetPoint("TOPRIGHT", base, "TOPRIGHT", 0, 0)
index:SetBackdrop(indexBackdrop)
-- 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)
scrollindex:SetPoint("BOTTOMRIGHT", - self.db.profile.sizes.borderpad, self.db.profile.sizes.borderpad)
child:SetWidth(scrollindex:GetWidth())
-- child:SetToplevel(true)
-- child:SetFrameStrata("FULLSCREEN_DIALOG")
slider:SetOrientation("VERTICAL")
-- slider:SetHitRectInsets(0, -10, -10, -10)
slider:SetBackdrop(sliderBackdrop)
96,8 → 93,8
grip:SetHighlightTexture([[Interface\AddOns\OneCompanion\textures\grip]])
grip:SetWidth(16)
grip:SetHeight(16)
grip:SetScript("OnMouseDown", function() this:GetParent():GetParent():StartSizing() grip:SetScript("OnUpdate", function() fra:SetAnchors(base) opt:ToggleButtonScale(nil, nil, nil, nil) end) end)
grip:SetScript("OnMouseUp", function() base:SetScript("OnSizeChanged", nil) this:GetParent():GetParent():StopMovingOrSizing() grip:SetScript("OnUpdate", nil) end)
grip:SetScript("OnMouseDown", function() base:StartSizing() grip:SetScript("OnUpdate", function() fra:SetAnchors(base) opt:ToggleButtonScale(nil, nil, nil, nil) end) end)
grip:SetScript("OnMouseUp", function() base:SetScript("OnSizeChanged", nil) base:StopMovingOrSizing() grip:SetScript("OnUpdate", nil) end)
grip:SetPoint("BOTTOMRIGHT", index, "BOTTOMRIGHT", -1, 1)
grip:SetFrameLevel(30)
footerRev:SetPoint("BOTTOMRIGHT", footer, "BOTTOMRIGHT", -5, 5)
120,8 → 117,7
base:SetResizable(true)
index:SetResizable(true)
footer:SetResizable(true)
base:SetMinResize(112, 50)
-- base:SetScript("OnSizeChanged", nil)
base:SetMinResize(50, 68)
breanni:SetScript("OnClick", OneCompanion.ToggleShowHide)
cfgButton:SetScript("OnClick", OneCompanion.OpenConfig)
 
136,9 → 132,8
fra.breanni = breanni
fra.footerText = footerText
fra.footerRev = footerRev
-- fra:SetAnchors(nil)
 
opt:ToggleShowTooltips(nil)
opt:ToggleShowTooltips(nil, nil, nil)
opt:SetColor(nil, nil, nil, nil, nil)
opt:ToggleMainFrameClamp(nil)
opt:ToggleShowGrip(nil)
200,9 → 195,16
texture:SetTexture(icon)
slot:SetID(i)
btn[i] = slot
OneCompanionOptions:ToggleShowTooltips(nil, spellID, btn[i])
slot:SetScript("OnClick", function()
CallCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOff")
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("MOUNT", i);
if active then
DismissCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOn")
else
CallCompanion("MOUNT", i)
PlaySound("igMainMenuOptionCheckBoxOff")
end
end)
end
for i = 1, critter do
214,9 → 216,19
texture:SetTexture(icon)
slot:SetID(id)
btn[id] = slot
OneCompanionOptions:ToggleShowTooltips(nil, spellID, btn[id])
slot:SetScript("OnClick", function()
CallCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOff")
local creatureID, creatureName, spellID, icon, active = GetCompanionInfo("CRITTER", i)
if active then
DismissCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOn")
else
CallCompanion("CRITTER", i)
PlaySound("igMainMenuOptionCheckBoxOff")
end
end)
end
end
 
function OneCompanionFrames:ShowTip(spellID)
end
\ No newline at end of file
OneCompanion/locals/enUS.lua
10,7 → 10,7
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
]]
 
if not (select(4,GetBuildInfo()) >= 30000) then return end
if not (select(4,GetBuildInfo()) >= 30000) then DEFAULT_CHAT_FRAME:AddMessage("One|cffffcc00Companion|r: wrong WoW client, OneCompanion is built for WotLK only.") return end
local MINOR_VERSION = tonumber(("$Revision$"):match("%d+"))
_G.OneCompanion_MINOR_VERSION = MINOR_VERSION
 
OneCompanion/OneCompanion.lua
10,7 → 10,7
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
]]
 
if not (select(4,GetBuildInfo()) >= 30000) then DEFAULT_CHAT_FRAME:AddMessage("One|cffffcc00Companion|r: wrong WoW client, OneCompanion is built for WotLK only.") 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
 
OneCompanion/opts/options.lua
115,7 → 115,7
name = L["Height"],
desc = L["Change mainframe height"],
type = "range",
min = 100, max = 800, step = 1,
min = 68, max = 1000, 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,
},
124,7 → 124,7
name = L["Width"],
desc = L["Change mainframe width"],
type = "range",
min = 112, max = 800, step = 1,
min = 50, max = 1000, step = 1,
set = "ToggleMainFrameWidth",
get = function() return OneCompanionFrames.base:GetWidth() end,
},
178,9 → 178,7
desc = L["Change the background color for the index window"],
type = "color",
hasAlpha = true,
get = function()
return unpack(OneCompanion.db.profile.colors.index)
end,
get = function() return unpack(OneCompanion.db.profile.colors.index) end,
set = "SetColor",
},
footer = {
189,9 → 187,7
desc = L["Change the background color for the footer window"],
type = "color",
hasAlpha = true,
get = function()
return unpack(OneCompanion.db.profile.colors.footer)
end,
get = function() return unpack(OneCompanion.db.profile.colors.footer) end,
set = "SetColor",
},
bindex = {
200,9 → 196,7
desc = L["Change the border color for the index window"],
type = "color",
hasAlpha = true,
get = function()
return unpack(OneCompanion.db.profile.colors.bindex)
end,
get = function() return unpack(OneCompanion.db.profile.colors.bindex) end,
set = "SetColor",
},
bfooter = {
211,9 → 205,7
desc = L["Change the border color for the footer window"],
type = "color",
hasAlpha = true,
get = function()
return unpack(OneCompanion.db.profile.colors.bfooter)
end,
get = function() return unpack(OneCompanion.db.profile.colors.bfooter) end,
set = "SetColor",
},
}
405,13 → 397,23
end
end
end
local f, s, p = fra.footerText:GetFont()
if fra.footer:GetWidth() < 140 then
local f, s, p, e = fra.footerText:GetFont()
local e = fra.footer:GetWidth()
if e < 94 then
fra.footerText:SetFont(f, 6, p)
fra.footerRev:SetFont(f, 6, p)
fra.footerText:SetPoint("BOTTOMRIGHT", fra.footerRev, "TOPRIGHT", 0, 0)
fra.footerText:SetText("One|cffffcc00C|r")
elseif e < 140 then
fra.footerText:SetFont(f, 8, p)
fra.footerRev:SetFont(f, 8, p)
fra.footerText:SetPoint("BOTTOMRIGHT", fra.footerRev, "TOPRIGHT", 0, 0)
fra.footerText:SetText("One|cffffcc00Companion|r")
else
fra.footerText:SetFont(f, 12, p)
fra.footerRev:SetFont(f, 8, p)
fra.footerText:SetPoint("BOTTOMRIGHT", fra.footerRev, "TOPLEFT", 0, -4)
fra.footerText:SetText("One|cffffcc00Companion|r")
end
fra.ShowSlider()
end
440,21 → 442,61
if self.db.profile.misc.grip then fra.grip:Hide() else fra.grip:Show() end
end
 
function OneCompanionOptions:ToggleShowTooltips(value)
local self, fra, gam = OneCompanion, OneCompanionFrames, GameTooltip
function OneCompanionOptions:ToggleShowTooltips(value, spellID, b)
local self, fra, g, btn = OneCompanion, OneCompanionFrames, GameTooltip, OneCompanionButtons
if value then self.db.profile.misc.tip = not self.db.profile.misc.tip end
if self.db.profile.misc.tip then
fra.cfgButton:SetScript("OnEnter", nil)
if b then b:SetScript("OnEnter", nil)
elseif value then
for i, j in ipairs(btn) do j:SetScript("OnEnter", nil) end
end
else
fra.cfgButton:SetScript("OnEnter", function(self)
if ( GetCVar("UberTooltips") == "1" ) then
GameTooltip_SetDefaultAnchor(gam, self)
if GetCVar("UberTooltips") == "1" then
GameTooltip_SetDefaultAnchor(g, self)
else
gam:SetOwner(self, "ANCHOR_RIGHT")
g:SetOwner(self, "ANCHOR_RIGHT")
end
gam:AddLine(L["Settings"])
gam:Show()
g:AddLine(L["Settings"])
g:Show()
end)
fra.cfgButton:SetScript("OnLeave", function(self) gam:Hide() end)
fra.cfgButton:SetScript("OnLeave", function(self) g:Hide() end)
if b then
b:SetScript("OnEnter", function(self)
if GetCVar("UberTooltips") == "1" then
GameTooltip_SetDefaultAnchor(g, self)
else
g:SetOwner(self, "ANCHOR_LEFT")
end
if g:SetHyperlink("spell:" .. spellID) then
self.UpdateTooltip = self
else
self.UpdateTooltip = nil
end
end)
elseif value then
for i, j in ipairs(btn) do
local d = GetNumCompanions("MOUNT")
local creatureID, creatureName, spellID, icon, active
if i <= d then
creatureID, creatureName, spellID, icon, active = GetCompanionInfo("MOUNT", i)
else
creatureID, creatureName, spellID, icon, active = GetCompanionInfo("CRITTER", i-d)
end
j:SetScript("OnEnter", function(self)
if GetCVar("UberTooltips") == "1" then
GameTooltip_SetDefaultAnchor(g, self)
else
g:SetOwner(self, "ANCHOR_LEFT")
end
if g:SetHyperlink("spell:" .. spellID) then
self.UpdateTooltip = self
else
self.UpdateTooltip = nil
end
end)
end
end
end
end
OneCompanion Property changes : Modified: svn:externals - libs/AceAddon-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceAddon-3.0/ libs/AceConfig-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceConfig-3.0/ libs/AceConsole-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceConsole-3.0/ libs/AceDB-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceDB-3.0/ libs/AceDBOptions-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceDBOptions-3.0/ libs/AceEvent-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceEvent-3.0 libs/AceGUI-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceGUI-3.0/ libs/AceLocale-3.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/AceLocale-3.0/ libs/CallbackHandler-1.0 http://svn.wowace.com/wowace/branches/Ace3/WotLK/CallbackHandler-1.0/ libs/LibStub http://svn.wowace.com/wowace/branches/Ace3/WotLK/LibStub/ + libs/AceAddon-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceAddon-3.0/ libs/AceConfig-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceConfig-3.0/ libs/AceConsole-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceConsole-3.0/ libs/AceDB-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceDB-3.0/ libs/AceDBOptions-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceDBOptions-3.0/ libs/AceEvent-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceEvent-3.0 libs/AceGUI-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceGUI-3.0/ libs/AceLocale-3.0 http://svn.wowace.com/wowace/trunk/Ace3/AceLocale-3.0/ libs/CallbackHandler-1.0 http://svn.wowace.com/wowace/trunk/Ace3/CallbackHandler-1.0/ libs/LibStub http://svn.wowace.com/wowace/trunk/Ace3/LibStub/