WoWInterface SVN WhoFramedWatcherWabbit

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 25 to Rev 26
    Reverse comparison

Rev 25 → Rev 26

Who Framed Watcher Wabbit/Who Framed Watcher Wabbit.toc
1,6 → 1,6
## Interface: 60000
## Name: Who Framed Watcher Wabbit?
## Version: 2.0.2
## Version: 2.1
## Notes: Various tweaks to improve the quest watch frame
## SavedVariables: WFWWDB
## SavedVariablesPerCharacter: WFWWPCDB
Who Framed Watcher Wabbit/wfww.lua
26,7 → 26,9
local tinsert = tinsert
local MoveObjectiveTracker, SetSize, Appearance, FontChanges
 
local OTFContainer = CreateFrame("Frame", "OTFContainer", UIParent)
local OTFContainer = CreateFrame("ScrollFrame", "OTFContainer", UIParent, "UIPanelScrollFrameTemplate")
local OTFContainerBG = CreateFrame("Frame", nil, OTFContainer)
local OTFContainerScrollBar = OTFContainerScrollBar
 
local defaults = {
bg = "Solid",
40,6 → 42,7
bgColor = {r = .1, g = .1, b = .1, a = .6},
borderColor = {r = 1, g = 1, b = 1},
borderAlpha = .8,
hideArt = false,
classBorder = false,
font = "Friz Quadrata TT",
fontSize = 12,
51,6 → 54,7
hideFrame = false,
instance = false,
petBattle = false,
scrolling = true,
keybind = "",
}
 
276,7 → 280,6
desc = "The background color and transparency.\n\nIf you wish to use a custom background texture and do not want it colored, set this to white.",
type = "color",
hasAlpha = true,
width = "double",
get = function() return db.bgColor.r, db.bgColor.g, db.bgColor.b, db.bgColor.a end,
set = function(_,r,g,b,a)
db.bgColor.r = r
287,6 → 290,17
end,
order = 10,
},
hideArt = {
name = "Hide Title Art",
desc = "Hide the textures behind the section titles in the tracker.",
type = "toggle",
get = function() return db.hideArt end,
set = function()
db.hideArt = not db.hideArt
Appearance()
end,
order = 10.5,
},
border = {
name = "Border",
desc = "Texture for the watch frame's border.",
429,6 → 443,27
end,
order = 15.5,
},
scrolling = {
name = "Scrolling Tracker",
desc = "Display a longer list that you can scroll through with your mousewheel.",
type = "toggle",
get = function() return db.scrolling end,
set = function()
db.scrolling = not db.scrolling
if db.scrolling then
OTFContainerScrollBar:SetAlpha(1)
OTFContainer:EnableMouseWheel(true)
OTFContainerBG:SetWidth(297)
ObjectiveTrackerFrame:SetHeight(980 or db.height - 20)
else
OTFContainerBG:SetWidth(280)
OTFContainerScrollBar:SetAlpha(0)
OTFContainer:EnableMouseWheel(false)
ObjectiveTrackerFrame:SetHeight(db.height - 20)
end
end,
order = 15.6,
},
keybind = {
name = "Keybinding",
desc = "Key to minimize/maximize the tracker.",
506,14 → 541,24
 
function SetSize()
OTFContainer:SetHeight(db.height)
OTFContainer:SetWidth(280)
OTFContainerBG:SetHeight(db.height + 13)
OTFContainer:SetScale(db.scale)
ObjectiveTrackerFrame:SetHeight(db.scrolling and 980 or db.height - 20)
end
 
local function ExpandObjectiveTracker()
if ObjectiveTrackerFrame.collapsed then
OTFContainer:SetHeight(db.height)
OTFContainer:SetWidth(280)
OTFContainer:SetWidth(265)
OTFContainerBG:ClearAllPoints()
OTFContainerBG:SetPoint("TOPLEFT", -5, 5)
if db.scrolling then
OTFContainerScrollBar:SetAlpha(1)
OTFContainer:EnableMouseWheel(true)
OTFContainerBG:SetSize(297, db.height + 13)
else
OTFContainerBG:SetSize(280, db.height + 13)
end
ObjectiveTracker_MinimizeButton_OnClick() --default function called by OnClick
end
 
528,24 → 573,39
local function CollapseObjectiveTracker()
if not ObjectiveTrackerFrame.collapsed then
OTFContainer:SetHeight(30)
OTFContainer:SetWidth(150)
OTFContainerBG:ClearAllPoints()
OTFContainerBG:SetPoint("TOPRIGHT", 10, -2)
OTFContainerBG:SetSize(150, 36)
OTFContainerScrollBar:SetAlpha(0)
OTFContainer:EnableMouseWheel(false)
ObjectiveTracker_MinimizeButton_OnClick() --default function called by OnClick
end
end
 
function Appearance()
OTFContainer:SetBackdrop({
OTFContainerBG:SetBackdrop({
bgFile = LSM:Fetch("background", db.bg),
edgeFile = LSM:Fetch("border", db.border),
edgeSize = db.borderWidth,
insets = {left=db.inset,right=db.inset,top=db.inset,bottom=db.inset}
})
OTFContainer:SetBackdropColor(db.bgColor.r,db.bgColor.g,db.bgColor.b,db.bgColor.a)
OTFContainerBG:SetBackdropColor(db.bgColor.r,db.bgColor.g,db.bgColor.b,db.bgColor.a)
if db.classBorder then
OTFContainer:SetBackdropBorderColor(classColor.r,classColor.g,classColor.b,db.borderAlpha)
OTFContainerBG:SetBackdropBorderColor(classColor.r,classColor.g,classColor.b,db.borderAlpha)
else
OTFContainer:SetBackdropBorderColor(db.borderColor.r,db.borderColor.g,db.borderColor.b,db.borderAlpha)
OTFContainerBG:SetBackdropBorderColor(db.borderColor.r,db.borderColor.g,db.borderColor.b,db.borderAlpha)
end
if db.hideArt then
ObjectiveTrackerBlocksFrame.QuestHeader.Background:Hide()
ObjectiveTrackerBlocksFrame.AchievementHeader.Background:Hide()
ObjectiveTrackerBlocksFrame.ScenarioHeader.Background:Hide()
BONUS_OBJECTIVE_TRACKER_MODULE.Header.Background:Hide()
else
ObjectiveTrackerBlocksFrame.QuestHeader.Background:Show()
ObjectiveTrackerBlocksFrame.AchievementHeader.Background:Show()
ObjectiveTrackerBlocksFrame.ScenarioHeader.Background:Show()
BONUS_OBJECTIVE_TRACKER_MODULE.Header.Background:Show()
end
end
 
function FontChanges()
581,6 → 641,22
end
 
local function SetUpContainer()
OTFContainer:SetWidth(265)
local OTFContainerScrollChild = CreateFrame("Frame", "OTFContainerScrollChild", OTFContainer)
OTFContainerScrollChild:SetWidth(185)
OTFContainerScrollChild:SetHeight(1000)
OTFContainer:SetScrollChild(OTFContainerScrollChild)
OTFContainerScrollBar.scrollStep = 35
OTFContainerBG:SetPoint("TOPLEFT", -5, 5)
OTFContainerBG:SetFrameStrata("BACKGROUND")
if db.scrolling then
OTFContainerBG:SetSize(297, db.height + 13)
else
OTFContainerBG:SetSize(280, db.height + 13)
OTFContainerScrollBar:SetAlpha(0)
OTFContainer:EnableMouseWheel(false)
end
 
--nUI code here if desired
 
MoveObjectiveTracker()
634,21 → 710,25
end
hooksecurefunc(SCENARIO_TRACKER_MODULE, "AddObjective", HookForUpdates)
 
ObjectiveTrackerFrame:SetParent(OTFContainer)
ObjectiveTrackerFrame:SetParent(OTFContainerScrollChild)
ObjectiveTrackerFrame:SetClampedToScreen(false)
ObjectiveTrackerFrame:ClearAllPoints()
ObjectiveTrackerFrame.ClearAllPoints = function() end
ObjectiveTrackerFrame:SetPoint("TOPLEFT", 35, -5)
ObjectiveTrackerFrame:SetPoint("BOTTOMRIGHT", -10, 5)
ObjectiveTrackerFrame.SetPoint = function() end
 
ObjectiveTrackerFrame:SetPoint("TOPLEFT", 30, -10)
local cap = ObjectiveTrackerFrame.ClearAllPoints
local sp = ObjectiveTrackerFrame.SetPoint
hooksecurefunc(ObjectiveTrackerFrame, "SetPoint", function(self)
cap(self)
sp(self, "TOPLEFT", 30, -10)
self:SetHeight(db.scrolling and 980 or db.height - 20)
end)
 
otfQuests.animateReason = 0
otfAchievements.animateReason = 0
 
minimizeButton:Show()
minimizeButton.Hide = function() end
hooksecurefunc(minimizeButton, "Hide", minimizeButton.Show)
otfHeader:Show()
otfHeader.Hide = function() end
hooksecurefunc(otfHeader, "Hide", minimizeButton.Show)
 
hooksecurefunc("ObjectiveTracker_MinimizeButton_OnClick", function()
WFWWPCDB.collapsed = ObjectiveTrackerFrame.collapsed