WoWInterface SVN WhoFramedWatcherWabbit

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 23 to Rev 22
    Reverse comparison

Rev 23 → Rev 22

Who Framed Watcher Wabbit/bindings.xml File deleted \ No newline at end of file
Who Framed Watcher Wabbit/Who Framed Watcher Wabbit.toc
1,6 → 1,6
## Interface: 60000
## Interface: 50200
## Name: Who Framed Watcher Wabbit?
## Version: 2.0
## Version: 1.9
## Notes: Various tweaks to improve the quest watch frame
## SavedVariables: WFWWDB
## SavedVariablesPerCharacter: WFWWPCDB
13,5 → 13,4
libs\LibSharedMedia-3.0\lib.xml
libs\AceGUI-3.0-SharedMediaWidgets\widget.xml
 
bindings.xml
wfww.lua
\ No newline at end of file
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIWidget-ColorPicker.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
ColorPicker Widget
-------------------------------------------------------------------------------]]
local Type, Version = "ColorPicker", 22
local Type, Version = "ColorPicker", 21
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
51,7 → 51,6
local self = frame.obj
if not self.disabled then
ColorPickerFrame:SetFrameStrata("FULLSCREEN_DIALOG")
ColorPickerFrame:SetFrameLevel(frame:GetFrameLevel() + 10)
ColorPickerFrame:SetClampedToScreen(true)
 
ColorPickerFrame.func = function()
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIWidget-Slider.lua
2,7 → 2,7
Slider Widget
Graphical Slider, like, for Range values.
-------------------------------------------------------------------------------]]
local Type, Version = "Slider", 21
local Type, Version = "Slider", 20
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
61,10 → 61,6
local self = frame.obj
if not frame.setup then
local newvalue = frame:GetValue()
if self.step and self.step > 0 then
local min_value = self.min or 0
newvalue = floor((newvalue - min_value) / self.step + 0.5) * self.step + min_value
end
if newvalue ~= self.value and not self.disabled then
self.value = newvalue
self:Fire("OnValueChanged", newvalue)
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIWidget-DropDown.lua
1,4 → 1,4
--[[ $Id: AceGUIWidget-DropDown.lua 1116 2014-10-12 08:15:46Z nevcairiel $ ]]--
--[[ $Id: AceGUIWidget-DropDown.lua 1029 2011-06-10 23:10:58Z nevcairiel $ ]]--
local AceGUI = LibStub("AceGUI-3.0")
 
-- Lua APIs
356,19 → 356,17
 
do
local widgetType = "Dropdown"
local widgetVersion = 30
local widgetVersion = 25
 
--[[ Static data ]]--
 
--[[ UI event handler ]]--
 
local function Control_OnEnter(this)
this.obj.button:LockHighlight()
this.obj:Fire("OnEnter")
end
 
local function Control_OnLeave(this)
this.obj.button:UnlockHighlight()
this.obj:Fire("OnLeave")
end
 
388,7 → 386,7
AceGUI:ClearFocus()
else
self.open = true
self.pullout:SetWidth(self.pulloutWidth or self.frame:GetWidth())
self.pullout:SetWidth(self.frame:GetWidth())
self.pullout:Open("TOPLEFT", self.frame, "BOTTOMLEFT", 0, self.label:IsShown() and -2 or 0)
AceGUI:SetFocus(self)
end
405,7 → 403,6
end
 
self.open = true
self:Fire("OnOpened")
end
 
local function OnPulloutClose(this)
464,7 → 461,6
self:SetHeight(44)
self:SetWidth(200)
self:SetLabel()
self:SetPulloutWidth(nil)
end
 
-- exported, AceGUI callback
494,11 → 490,9
if disabled then
self.text:SetTextColor(0.5,0.5,0.5)
self.button:Disable()
self.button_cover:Disable()
self.label:SetTextColor(0.5,0.5,0.5)
else
self.button:Enable()
self.button_cover:Enable()
self.label:SetTextColor(1,.82,0)
self.text:SetTextColor(1,1,1)
end
521,9 → 515,9
if text and text ~= "" then
self.label:SetText(text)
self.label:Show()
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-14)
self:SetHeight(40)
self.alignoffset = 26
self.dropdown:SetPoint("TOPLEFT",self.frame,"TOPLEFT",-15,-18)
self:SetHeight(44)
self.alignoffset = 30
else
self.label:SetText("")
self.label:Hide()
641,10 → 635,6
return self.multiselect
end
 
local function SetPulloutWidth(self, width)
self.pulloutWidth = width
end
 
--[[ Constructor ]]--
 
local function Constructor()
676,9 → 666,8
self.GetMultiselect = GetMultiselect
self.SetItemValue = SetItemValue
self.SetItemDisabled = SetItemDisabled
self.SetPulloutWidth = SetPulloutWidth
 
self.alignoffset = 26
self.alignoffset = 30
 
frame:SetScript("OnHide",Dropdown_OnHide)
 
705,15 → 694,6
button:SetScript("OnLeave",Control_OnLeave)
button:SetScript("OnClick",Dropdown_TogglePullout)
 
local button_cover = CreateFrame("BUTTON",nil,self.frame)
self.button_cover = button_cover
button_cover.obj = self
button_cover:SetPoint("TOPLEFT",self.frame,"BOTTOMLEFT",0,25)
button_cover:SetPoint("BOTTOMRIGHT",self.frame,"BOTTOMRIGHT")
button_cover:SetScript("OnEnter",Control_OnEnter)
button_cover:SetScript("OnLeave",Control_OnLeave)
button_cover:SetScript("OnClick",Dropdown_TogglePullout)
 
local text = _G[dropdown:GetName() .. "Text"]
self.text = text
text.obj = self
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIWidget-EditBox.lua
1,7 → 1,7
--[[-----------------------------------------------------------------------------
EditBox Widget
-------------------------------------------------------------------------------]]
local Type, Version = "EditBox", 25
local Type, Version = "EditBox", 24
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
90,11 → 90,6
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
elseif type == "macro" then
local name = GetMacroInfo(id)
self:SetText(name)
self:Fire("OnEnterPressed", name)
ClearCursor()
end
HideButton(self)
AceGUI:ClearFocus()
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua
2,7 → 2,7
TreeGroup Container
Container that uses a tree control to switch between groups.
-------------------------------------------------------------------------------]]
local Type, Version = "TreeGroup", 36
local Type, Version = "TreeGroup", 34
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
231,7 → 231,7
if frame.obj.noupdate then return end
local self = frame.obj
local status = self.status or self.localstatus
status.scrollvalue = floor(value + 0.5)
status.scrollvalue = value
self:RefreshTree()
AceGUI:ClearFocus()
end
Who Framed Watcher Wabbit/libs/AceGUI-3.0/widgets/AceGUIWidget-Button.lua
2,7 → 2,7
Button Widget
Graphical Button.
-------------------------------------------------------------------------------]]
local Type, Version = "Button", 23
local Type, Version = "Button", 22
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
 
45,7 → 45,6
self:SetHeight(24)
self:SetWidth(200)
self:SetDisabled(false)
self:SetAutoWidth(false)
self:SetText()
end,
 
53,17 → 52,7
 
["SetText"] = function(self, text)
self.text:SetText(text)
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetAutoWidth"] = function(self, autoWidth)
self.autoWidth = autoWidth
if self.autoWidth then
self:SetWidth(self.text:GetStringWidth() + 30)
end
end,
 
["SetDisabled"] = function(self, disabled)
self.disabled = disabled
Who Framed Watcher Wabbit/libs/AceGUI-3.0/AceGUI-3.0.lua
24,8 → 24,8
-- f:AddChild(btn)
-- @class file
-- @name AceGUI-3.0
-- @release $Id: AceGUI-3.0.lua 1102 2013-10-25 14:15:23Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 34
-- @release $Id: AceGUI-3.0.lua 924 2010-05-13 15:12:20Z nevcairiel $
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 33
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
 
if not AceGUI then return end -- No upgrade needed
673,16 → 673,8
end
end)
 
local layoutrecursionblock = nil
local function safelayoutcall(object, func, ...)
layoutrecursionblock = true
object[func](object, ...)
layoutrecursionblock = nil
end
 
AceGUI:RegisterLayout("Flow",
function(content, children)
if layoutrecursionblock then return end
--used height so far
local height = 0
--width used in the current row
770,7 → 762,7
end
 
if child.width == "fill" then
safelayoutcall(child, "SetWidth", width)
child:SetWidth(width)
frame:SetPoint("RIGHT", content)
 
usedwidth = 0
784,7 → 776,7
rowoffset = child.alignoffset or (rowheight / 2)
rowstartoffset = rowoffset
elseif child.width == "relative" then
safelayoutcall(child, "SetWidth", width * child.relWidth)
child:SetWidth(width * child.relWidth)
 
if child.DoLayout then
child:DoLayout()
Who Framed Watcher Wabbit/libs/LibSharedMedia-3.0/LibSharedMedia-3.0.lua
1,6 → 1,6
--[[
Name: LibSharedMedia-3.0
Revision: $Revision: 89 $
Revision: $Revision: 74 $
Author: Elkano (elkano@gmx.de)
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
9,7 → 9,7
License: LGPL v2.1
]]
 
local MAJOR, MINOR = "LibSharedMedia-3.0", 6000201 -- 6.0.2 v1 / increase manually on changes
local MAJOR, MINOR = "LibSharedMedia-3.0", 5000402 -- 5.0.4 v2 / increase manually on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)
 
if not lib then return end
60,13 → 60,9
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
93,10 → 89,6
if not lib.MediaTable.font then lib.MediaTable.font = {} end
local SML_MT_font = lib.MediaTable.font
--[[
All font files are currently in all clients, the following table depicts which font supports which charset as of 5.0.4
Fonts were checked using langcover.pl from DejaVu fonts (http://sourceforge.net/projects/dejavu/) and FontForge (http://fontforge.org/)
latin means check for: de, en, es, fr, it, pt
 
file name latin koKR ruRU zhCN zhTW
2002.ttf 2002 X X X - -
2002B.ttf 2002 Bold X X X - -
109,7 → 101,7
bKAI00M.ttf AR Kaiti Medium B5 - - - - X
bLEI00D.ttf AR Leisu Demi B5 - - - - X
FRIZQT__.TTF Friz Quadrata TT X - - - -
FRIZQT___CYR.TTF FrizQuadrataCTT x - X - -
FRIZQT___CYR.TTF FrizQuadrataCTT - - X - -
K_Damage.TTF YDIWingsM - X X - -
K_Pagetext.TTF MoK X X X - -
MORPHEUS.TTF Morpheus X - - - -
117,9 → 109,6
NIM_____.ttf Nimrod MT X - X - -
SKURRI.TTF Skurri X - - - -
SKURRI_CYR.TTF Skurri X - X - -
 
WARNING: Although FRIZQT___CYR is available on western clients, it doesn't support special European characters e.g. é, ï, ö
Due to this, we cannot use it as a replacement for FRIZQT__.TTF
]]
 
if locale == "koKR" then
222,7 → 211,7
error(MAJOR..":Register(mediatype, key, data, langmask) - key must be string, got "..type(key))
end
mediatype = mediatype:lower()
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
if mediatype == lib.MediaType.FONT and ((langmask and band(langmask, LOCALE_MASK) == 0) or not (langmask or locale_is_western)) then return false end
if not mediaTable[mediatype] then mediaTable[mediatype] = {} end
local mtable = mediaTable[mediatype]
if mtable[key] then return false end
Who Framed Watcher Wabbit/libs/AceConfig-3.0/AceConfigRegistry-3.0/AceConfigRegistry-3.0.lua
8,8 → 8,8
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
-- @class file
-- @name AceConfigRegistry-3.0
-- @release $Id: AceConfigRegistry-3.0.lua 1105 2013-12-08 22:11:58Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 15
-- @release $Id: AceConfigRegistry-3.0.lua 1045 2011-12-09 17:58:40Z nevcairiel $
local MAJOR, MINOR = "AceConfigRegistry-3.0", 14
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigRegistry then return end
288,8 → 288,7
-- @param appName The application name as given to `:RegisterOptionsTable()`
-- @param options The options table, OR a function reference that generates it on demand. \\
-- See the top of the page for info on arguments passed to such functions.
-- @param skipValidation Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
function AceConfigRegistry:RegisterOptionsTable(appName, options, skipValidation)
function AceConfigRegistry:RegisterOptionsTable(appName, options)
if type(options)=="table" then
if options.type~="group" then -- quick sanity checker
error(MAJOR..": RegisterOptionsTable(appName, options): 'options' - missing type='group' member in root group", 2)
297,7 → 296,7
AceConfigRegistry.tables[appName] = function(uiType, uiName, errlvl)
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
if not AceConfigRegistry.validated[uiType][appName] then
AceConfigRegistry:ValidateOptionsTable(options, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
308,7 → 307,7
errlvl=(errlvl or 0)+1
validateGetterArgs(uiType, uiName, errlvl)
local tab = assert(options(uiType, uiName, appName))
if not AceConfigRegistry.validated[uiType][appName] and not skipValidation then
if not AceConfigRegistry.validated[uiType][appName] then
AceConfigRegistry:ValidateOptionsTable(tab, appName, errlvl) -- upgradable
AceConfigRegistry.validated[uiType][appName] = true
end
Who Framed Watcher Wabbit/libs/AceConfig-3.0/AceConfigDialog-3.0/AceConfigDialog-3.0.lua
1,10 → 1,10
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
-- @class file
-- @name AceConfigDialog-3.0
-- @release $Id: AceConfigDialog-3.0.lua 1113 2014-09-11 20:18:16Z nevcairiel $
-- @release $Id: AceConfigDialog-3.0.lua 1049 2012-04-02 13:22:10Z mikk $
 
local LibStub = LibStub
local MAJOR, MINOR = "AceConfigDialog-3.0", 59
local MAJOR, MINOR = "AceConfigDialog-3.0", 57
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
if not AceConfigDialog then return end
580,7 → 580,7
t.text = message
t.button1 = ACCEPT
t.button2 = CANCEL
t.preferredIndex = STATICPOPUP_NUMDIALOGS
t.preferredIndex = 3
local dialog, oldstrata
t.OnAccept = function()
safecall(func, unpack(t))
1817,14 → 1817,6
tinsert(path, (select(n, ...)))
end
 
local option = options
if type(container) == "table" and container.type == "BlizOptionsGroup" and #path > 0 then
for i = 1, #path do
option = options.args[path[i]]
end
name = format("%s - %s", name, GetOptionsMemberValue("name", option, options, path, appName))
end
 
--if a container is given feed into that
if container then
f = container
Who Framed Watcher Wabbit/wfww.lua
1,30 → 1,26
-- STARTING OVER FROM SCRATCH!! WFWW 2.0! --
--CREDITS: Xrystal for nUI support code, seebs for line spacing code
--------------------------------------------------------------------
 
--credit line
local skin = "Interface\\AddOns\\rActionButtonStyler\\media\\gloss.tga" --the normal button skin texture
local hover = "Interface\\AddOns\\rActionButtonStyler\\media\\hover.tga" --the texture when hovering your mouse over the button
local pushed = "Interface\\AddOns\\rActionButtonStyler\\media\\pushed.tga" --the texture when pushing the button
 
--rActionButtonStyler texture lines (or see about how to register these buttons with rABS???)
 
local ObjectiveTrackerFrame = ObjectiveTrackerFrame
local minimizeButton = ObjectiveTrackerFrame.HeaderMenu.MinimizeButton
local otfHeader = ObjectiveTrackerFrame.HeaderMenu
local otfQuests = ObjectiveTrackerBlocksFrame.QuestHeader
local otfAchievements = ObjectiveTrackerBlocksFrame.AchievementHeader
local otfScenarios = ObjectiveTrackerBlocksFrame.ScenarioHeader
local WFContainer = CreateFrame("Frame", "WFContainer", UIParent)
local db, SetSize, MoveWatchFrame, Appearance, FontChanges, line --, WFWW_BF, itembtn
local nextline = 1
local nextbutton = 1
local LSM = LibStub("LibSharedMedia-3.0")
local widgetLists = AceGUIWidgetLSMlists
local GameTooltip = GameTooltip
local WatchFrameCollapseExpandButton = WatchFrameCollapseExpandButton
local positions = {"TOP", "TOPRIGHT", "TOPLEFT",
"BOTTOM", "BOTTOMRIGHT", "BOTTOMLEFT",
"RIGHT", "LEFT", "CENTER"}
local fontFlags = {"None", "Outline", "Monochrome Outline"} --, "Monochrome"}
local wideFrame = GetCVar("watchFrameWidth")
local _,class = UnitClass("player")
local db, font, classColor
local WFWWSkinnedHeaders = {}
local WFWWSkinnedLines = {}
local tinsert = tinsert
local MoveObjectiveTracker, SetSize, Appearance, FontChanges
local classColor
 
local OTFContainer = CreateFrame("Frame", "OTFContainer", UIParent)
 
local defaults = {
bg = "Solid",
34,7 → 30,7
anchorPoint = "TOPRIGHT",
xOffset = "-15",
yOffset = "-250",
height = 600,
height = 500,
bgColor = {r = .1, g = .1, b = .1, a = .6},
borderColor = {r = 1, g = 1, b = 1},
borderAlpha = .8,
83,7 → 79,7
db.anchorPoint = positions[anchor]
db.xOffset = "0"
db.yOffset = "0"
MoveObjectiveTracker()
MoveWatchFrame()
end,
order = 1,
},
97,7 → 93,7
xOffset = "0"
end
db.xOffset = xOffset
MoveObjectiveTracker()
MoveWatchFrame()
end,
order = 2,
},
111,7 → 107,7
yOffset = "0"
end
db.yOffset = yOffset
MoveObjectiveTracker()
MoveWatchFrame()
end,
order = 3,
},
165,7 → 161,8
end,
set = function(self, font)
db.font = font
FontChanges()
nextline = 1
WatchFrame_Update()
end,
order = 6,
},
179,7 → 176,8
get = function() return db.fontSize end,
set = function(_,size)
db.fontSize = size
FontChanges()
nextline = 1
WatchFrame_Update()
end,
order = 7,
},
197,7 → 195,8
end,
set = function(_,key)
db.fontFlag = fontFlags[key]
FontChanges()
nextline = 1 --start over from the beginning
WatchFrame_Update()
end,
order = 8,
},
208,6 → 207,7
get = function() return db.disableShadow end,
set = function()
db.disableShadow = not db.disableShadow
nextline = 1
FontChanges()
end,
order = 8.5,
222,12 → 222,12
get = function() return db.questSpacing end,
set = function(_,size)
db.questSpacing = size
DEFAULT_OBJECTIVE_TRACKER_MODULE.blockOffsetY = -db.questSpacing
ObjectiveTracker_Update()
WATCHFRAME_QUEST_OFFSET = size
WatchFrame_Update()
end,
order = 8.51,
},
--[[lineSpacing = {
lineSpacing = {
name = "Line Spacing",
desc = "Change the spacing between lines.",
type = "range",
237,12 → 237,11
get = function() return db.lineSpacing end,
set = function(_,size)
db.lineSpacing = size
otfQuests.module.linespacing = db.lineSpacing
otfAchievements.module.linespacing = db.lineSpacing
--ObjectiveTracker_Update()
WATCHFRAME_LINEHEIGHT = db.fontSize + size
WatchFrame_Update()
end,
order = 8.52,
},]]
},
spacer2 = {
name = " ",
type = "description",
386,11 → 385,11
set = function()
db.hideFrame = not db.hideFrame
if db.hideFrame and GetNumTrackedAchievements() == 0 and GetNumQuestWatches() == 0 then
OTFContainer:SetAlpha(0)
minimizeButton:EnableMouse(false)
WFContainer:SetAlpha(0)
WatchFrameCollapseExpandButton:EnableMouse(false)
else
OTFContainer:SetAlpha(1)
minimizeButton:EnableMouse(true)
WFContainer:SetAlpha(1)
WatchFrameCollapseExpandButton:EnableMouse(true)
end
end,
order = 15,
403,9 → 402,9
set = function()
db.instance = not db.instance
if db.instance then
OTFContainer:RegisterEvent("PLAYER_ENTERING_WORLD")
WFContainer:RegisterEvent("PLAYER_ENTERING_WORLD")
else
OTFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
WFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end,
order = 15.2,
418,11 → 417,11
set = function()
db.petBattle = not db.petBattle
if db.petBattle then
OTFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
OTFContainer:RegisterEvent("PET_BATTLE_CLOSE")
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
else
OTFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
OTFContainer:RegisterEvent("PET_BATTLE_CLOSE")
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
end
end,
order = 15.5,
433,9 → 432,9
type = "keybinding",
get = function() return db.keybind end,
set = function(_,key)
SetOverrideBinding(OTFContainer, false, db.keybind, nil) --clear old binding
SetOverrideBinding(WFContainer, false, db.keybind, nil) --clear old binding
if key ~= "" then --set new
local bound = SetOverrideBinding(OTFContainer, false, key, "WFWWCOLLAPSE")
SetOverrideBinding(WFContainer, false, key, "CLICK WatchFrameCollapseExpandButton:LeftButton")
end
db.keybind = key
end,
496,172 → 495,192
},
}
 
 
function MoveObjectiveTracker() --declared local at top of file
OTFContainer:ClearAllPoints()
OTFContainer:SetPoint(db.anchorPoint, UIParent, db.anchorPoint, db.xOffset, db.yOffset)
function MoveWatchFrame()
WFContainer:ClearAllPoints()
WFContainer:SetPoint(db.anchorPoint, UIParent, db.anchorPoint, db.xOffset, db.yOffset)
end
 
function SetSize()
OTFContainer:SetHeight(db.height)
OTFContainer:SetWidth(280)
OTFContainer:SetScale(db.scale)
end
 
function OTFContainer.ExpandObjectiveTracker()
if ObjectiveTrackerFrame.collapsed then
OTFContainer:SetHeight(db.height)
OTFContainer:SetWidth(280)
ObjectiveTracker_MinimizeButton_OnClick() --default function called by OnClick
WFContainer:SetHeight(db.height)
if wideFrame == "1" then
WFContainer:SetWidth(350)
else
WFContainer:SetWidth(250)
end
 
if GetNumTrackedAchievements() == 0 and GetNumQuestWatches() == 0 and GetNumAutoQuestPopUps() == 0 then
--if our tracker is empty, still show "Objectives" text
otfHeader.Title:Show()
elseif not WFWWPCDB.collapsed then --if not empty and not collapsed
otfHeader.Title:Hide()
end
WFContainer:SetScale(db.scale)
end
local ExpandObjectiveTracker = OTFContainer.ExpandObjectiveTracker
 
function OTFContainer.CollapseObjectiveTracker()
if not ObjectiveTrackerFrame.collapsed then
OTFContainer:SetHeight(30)
OTFContainer:SetWidth(150)
ObjectiveTracker_MinimizeButton_OnClick() --default function called by OnClick
end
end
local CollapseObjectiveTracker = OTFContainer.CollapseObjectiveTracker
 
function Appearance()
OTFContainer:SetBackdrop({
WFContainer: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)
WFContainer: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)
WFContainer:SetBackdropBorderColor(classColor.r,classColor.g,classColor.b,db.borderAlpha)
else
OTFContainer:SetBackdropBorderColor(db.borderColor.r,db.borderColor.g,db.borderColor.b,db.borderAlpha)
WFContainer:SetBackdropBorderColor(db.borderColor.r,db.borderColor.g,db.borderColor.b,db.borderAlpha)
end
end
 
function FontChanges()
font = LSM:Fetch("font", db.font)
local shadow = db.disableShadow and 0 or 1
 
otfHeader.Title:SetFont(font, db.fontSize, db.fontFlag)
otfHeader.Title:SetShadowColor(0,0,0,shadow)
otfQuests.Text:SetFont(font, db.fontSize+2, db.fontFlag)
otfQuests.Text:SetShadowColor(0,0,0,shadow)
otfAchievements.Text:SetFont(font, db.fontSize+2, db.fontFlag)
otfAchievements.Text:SetShadowColor(0,0,0,shadow)
otfScenarios.Text:SetFont(font, db.fontSize+2, db.fontFlag)
otfScenarios.Text:SetShadowColor(0,0,0,shadow)
 
for k,v in pairs(WFWWSkinnedHeaders) do
v:SetFont(font, db.fontSize, db.fontFlag)
v:SetShadowColor(0,0,0,shadow)
local font = LSM:Fetch("font", db.font)
WatchFrameTitle:SetFont(font, db.fontSize, db.fontFlag)
for i = nextline, 50 do
line = _G["WatchFrameLine"..i]
if line then
line.text:SetFont(font, db.fontSize, db.fontFlag)
line.dash:SetFont(font, db.fontSize, db.fontFlag)
if db.disableShadow then
line.text:SetShadowColor(0,0,0,0)
line.dash:SetShadowColor(0,0,0,0)
else
line.text:SetShadowColor(0,0,0,1)
line.dash:SetShadowColor(0,0,0,1)
end
else
nextline = i --so we only have to change new lines during the hook
break
end
end
for k,v in pairs(WFWWSkinnedLines) do
v.Text:SetFont(font, db.fontSize, db.fontFlag)
v.Text:SetShadowColor(0,0,0,shadow)
v.Dash:SetFont(font, db.fontSize, db.fontFlag)
v.Dash:SetShadowColor(0,0,0,shadow)
end
 
local function SkinButtons()
if IsAddOnLoaded("rActionButtonStyler") then
local colorR,colorG,colorB = ActionButton1NormalTexture:GetVertexColor()
for i = nextbutton, 15 do
itembtn = _G["WatchFrameItem"..i]
if itembtn then
itembtn:SetHighlightTexture(hover)
itembtn:SetPushedTexture(pushed)
border = _G[itembtn:GetName().."NormalTexture"]
border:SetAllPoints()
border:SetTexture(skin)
border:SetVertexColor(colorR, colorG, colorB)
else
nextbutton = i
break
end
end
end
 
ObjectiveTracker_Update()
end
 
local function SetUpContainer()
--nUI code here if desired
--keep nUI from hogging the WatchFrame - thanks Xrystal!
if IsAddOnLoaded("nUI") then
nUI_ResetWatchFrame = function() end
nUI_Movers:lockFrame(WatchFrame, false, nil)
nUI_Options.movedWatchFrame = true
end
 
MoveObjectiveTracker()
MoveWatchFrame()
SetSize()
Appearance()
--SkinButtons() --add later for rABS or Masque(?) support
SkinButtons()
if db.keybind ~= "" then
SetOverrideBinding(OTFContainer, false, db.keybind, "CLICK minimizeButton:LeftButton")
end
DEFAULT_OBJECTIVE_TRACKER_MODULE.blockOffsetY = -db.questSpacing
--otfQuests.module.linespacing = db.lineSpacing
--otfAchievements.module.linespacing = db.lineSpacing
 
--make sure fonts for other modules are good, too
SetOverrideBinding(WFContainer, false, db.keybind, "CLICK WatchFrameCollapseExpandButton:LeftButton")
end
WATCHFRAME_QUEST_OFFSET = db.questSpacing
WATCHFRAME_LINEHEIGHT = db.fontSize + db.lineSpacing
 
local function HookForUpdates(module, block, objectiveKey, text, lineType, useFullHeight, hideDash, colorStyle)
local header = block.HeaderText
local line = block.lines[objectiveKey]
if not header.wfwwSkinned then
header:SetFont(font, db.fontSize, db.fontFlag)
header:SetShadowColor(0,0,0,db.disableShadow and 0 or 1)
tinsert(WFWWSkinnedHeaders, header)
header.wfwwSkinned = true
hooksecurefunc("WatchFrame_Update", function()
FontChanges()
SkinButtons()
 
if db.hideFrame then
if GetNumTrackedAchievements() == 0 and GetNumQuestWatches() == 0 then
WFContainer:SetAlpha(0)
WatchFrameCollapseExpandButton:EnableMouse(false)
else
WFContainer:SetAlpha(1)
WatchFrameCollapseExpandButton:EnableMouse(true)
end
end
if not line.wfwwSkinned then
line.Text:SetFont(font, db.fontSize, db.fontFlag)
line.Text:SetShadowColor(0,0,0,db.disableShadow and 0 or 1)
line.Dash:SetFont(font, db.fontSize, db.fontFlag)
line.Dash:SetShadowColor(0,0,0,db.disableShadow and 0 or 1)
tinsert(WFWWSkinnedLines, line)
line.wfwwSkinned = true
end)
 
WatchFrame_Update()
 
hooksecurefunc("WatchFrameLinkButtonTemplate_Highlight", function(self, enter)
if enter then
local id = self.index
local watchType = self.type
if watchType == "QUEST" then
GameTooltip:SetOwner(self)
GameTooltip:SetHyperlink(GetQuestLink(GetQuestIndexForWatch(id)))
GameTooltip:Show()
elseif watchType == "ACHIEVEMENT" then
GameTooltip:SetOwner(self)
GameTooltip:SetHyperlink(GetAchievementLink(id))
GameTooltip:Show()
end
else
GameTooltip:Hide()
end
end
for i = 1, #ObjectiveTrackerFrame.MODULES do
hooksecurefunc(ObjectiveTrackerFrame.MODULES[i], "AddObjective", HookForUpdates)
end
FontChanges()
end)
 
ObjectiveTrackerFrame:SetParent(OTFContainer)
ObjectiveTrackerFrame:SetClampedToScreen(false)
ObjectiveTrackerFrame:ClearAllPoints()
ObjectiveTrackerFrame.ClearAllPoints = function() end
ObjectiveTrackerFrame:SetPoint("TOPLEFT", 35, -5)
ObjectiveTrackerFrame:SetPoint("BOTTOMRIGHT", -10, 5)
ObjectiveTrackerFrame.SetPoint = function() end
WatchFrame:SetParent(WFContainer)
WatchFrame:SetClampedToScreen(false)
WatchFrame:ClearAllPoints()
WatchFrame.ClearAllPoints = function() end
WatchFrame:SetPoint("TOPLEFT", 32,-2.5)
WatchFrame:SetPoint("BOTTOMRIGHT", 4,0)
WatchFrame.SetPoint = function() end
 
otfQuests.animateReason = 0
otfAchievements.animateReason = 0
WatchFrameTitle:SetParent(WFContainer)
WatchFrameCollapseExpandButton:SetParent(WFContainer)
WatchFrameCollapseExpandButton:Raise() --let us click it even if header text is too big
WatchFrameTitle:Show()
WatchFrameCollapseExpandButton:Show()
WatchFrameTitle.Hide = function() end
WatchFrameCollapseExpandButton.Hide = function() WatchFrameTitle:SetText(OBJECTIVES_TRACKER_LABEL)end
WatchFrameCollapseExpandButton:Enable()
WatchFrameCollapseExpandButton.Disable = function() end
 
minimizeButton:Show()
minimizeButton.Hide = function() end
otfHeader:Show()
otfHeader.Hide = function() end
 
hooksecurefunc("ObjectiveTracker_MinimizeButton_OnClick", function()
WFWWPCDB.collapsed = ObjectiveTrackerFrame.collapsed
end)
 
if WFWWPCDB.collapsed then --recall if watchframe was collapsed on last logout
CollapseObjectiveTracker()
else
ExpandObjectiveTracker()
if WFWWPCDB.collapsed then --remember if watchframe was collapsed on last logout
WatchFrame_CollapseExpandButton_OnClick() --default function called by OnClick
WFContainer:SetHeight(30)
WFContainer:SetWidth(150)
end
 
minimizeButton:RegisterForClicks("AnyDown")
minimizeButton:SetScript("OnClick", function(self,btn)
WatchFrameCollapseExpandButton:RegisterForClicks("AnyDown")
WatchFrameCollapseExpandButton:SetScript("OnClick", function(self,btn)
if IsShiftKeyDown() then
ToggleAchievementFrame()
elseif IsAltKeyDown() then
InterfaceOptionsFrame_OpenToCategory("Who Framed Watcher Wabbit?")
InterfaceOptionsFrame_OpenToCategory("Who Framed Watcher Wabbit?")
elseif btn == "RightButton" then
ToggleFrame(WorldMapFrame)
ToggleFrame(QuestLogFrame)
else
WatchFrame_CollapseExpandButton_OnClick() --default function called by OnClick
if not WFWWPCDB.collapsed then --if the container's not collapsed, collapse it
CollapseObjectiveTracker()
WFContainer:SetHeight(30)
WFContainer:SetWidth(150)
WFWWPCDB.collapsed = true
else
ExpandObjectiveTracker()
WFContainer:SetHeight(db.height)
if wideFrame == "1" then
WFContainer:SetWidth(350)
else
WFContainer:SetWidth(250)
end
WFWWPCDB.collapsed = false
end
end
end)
 
minimizeButton:SetScript("OnEnter", function(self)
 
--keep the watch frame and container in sync with each other
hooksecurefunc("WatchFrame_Expand", function(self)
if WFWWPCDB.collapsed and GetNumAutoQuestPopUps() == 0 then
WatchFrame_Collapse(self)
end
end)
 
WatchFrameCollapseExpandButton:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_TOP")
GameTooltip:AddLine("Who Framed Watcher Wabbit?",1,1,1)
if ObjectiveTrackerFrame.collapsed then
if WatchFrame.collapsed then
GameTooltip:AddLine("Left-click to expand the objectives tracker.")
else
GameTooltip:AddLine("Left-click to minimize the objectives tracker.")
671,9 → 690,7
GameTooltip:AddLine("Alt-click to open the Who Framed Watcher Wabbit? options.")
GameTooltip:Show()
end)
minimizeButton:SetScript("OnLeave", function() GameTooltip:Hide() end)
 
ObjectiveTracker_Update()
WatchFrameCollapseExpandButton:SetScript("OnLeave", function() GameTooltip:Hide() end)
end
 
local function SetUpDB()
707,11 → 724,8
SetUpDB()
 
LibStub("AceConfig-3.0"):RegisterOptionsTable("Who Framed Watcher Wabbit?", options)
OTFContainer.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Who Framed Watcher Wabbit?", "Who Framed Watcher Wabbit?")
SlashCmdList["WFWW"] = function()
InterfaceOptionsFrame_OpenToCategory("Who Framed Watcher Wabbit?")
InterfaceOptionsFrame_OpenToCategory("Who Framed Watcher Wabbit?")
end
WFContainer.optionsFrame = LibStub("AceConfigDialog-3.0"):AddToBlizOptions("Who Framed Watcher Wabbit?", "Who Framed Watcher Wabbit?")
SlashCmdList["WFWW"] = function() InterfaceOptionsFrame_OpenToCategory("Who Framed Watcher Wabbit?") end
SLASH_WFWW1 = "/wfww"
 
classColor = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
724,61 → 738,73
end
 
if not db.instance then
OTFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
WFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
if db.petBattle then
OTFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
OTFContainer:RegisterEvent("PET_BATTLE_CLOSE")
if not db.petBattle then
WFContainer:UnregisterEvent("PET_BATTLE_OPENING_START")
WFContainer:UnregisterEvent("PET_BATTLE_CLOSE")
end
OTFContainer:RegisterEvent("QUEST_AUTOCOMPLETE")
OTFContainer:RegisterEvent("QUEST_WATCH_LIST_CHANGED")
OTFContainer:RegisterEvent("TRACKED_ACHIEVEMENT_LIST_CHANGED")
WFContainer:RegisterEvent("QUEST_WATCH_UPDATE")
WFContainer:RegisterEvent("QUEST_AUTOCOMPLETE")
WFContainer:RegisterEvent("CVAR_UPDATE")
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
 
local notCollapsed
OTFContainer:SetScript("OnEvent", function(_, event, ...)
WFContainer:SetScript("OnEvent", function(_,event,...)
if event == "PLAYER_ENTERING_WORLD" then
if IsInInstance() and not WFWWPCDB.collapsed then
--if you go in the instance and the WF isn't collapsed...
CollapseObjectiveTracker() --collapse
WatchFrameCollapseExpandButton:Click() --collapse
end
elseif event == "PET_BATTLE_OPENING_START" and not WFWWPCDB.collapsed then
notCollapsed = true --if it was open before pet battle
CollapseObjectiveTracker()
notCollapsed = true
WatchFrameCollapseExpandButton:Click()
elseif event == "PET_BATTLE_CLOSE" and notCollapsed then
ExpandObjectiveTracker() --open again after pet battle if it was open before
notCollapsed = false
elseif event == "QUEST_WATCH_LIST_CHANGED" or event == "TRACKED_ACHIEVEMENT_LIST_CHANGED" then
if GetNumTrackedAchievements() == 0 and GetNumQuestWatches() == 0 and GetNumAutoQuestPopUps() == 0 then
--if our tracker is empty
otfHeader.Title:Show()
if db.hideFrame then
OTFContainer:SetAlpha(0)
minimizeButton:EnableMouse(false)
WatchFrameCollapseExpandButton:Click()
elseif event == "CVAR_UPDATE" then
local cvar,value = ...
if cvar == "WATCH_FRAME_WIDTH_TEXT" then
if not WatchFrame.userCollapsed then
if value == "1" then
WFContainer:SetWidth(350)
else
WFContainer:SetWidth(250)
end
end
elseif not WFWWPCDB.collapsed then --if not empty and not collapsed
otfHeader.Title:Hide()
if db.hideFrame then
OTFContainer:SetAlpha(1)
minimizeButton:EnableMouse(true)
end
wideFrame = value
end
else
local index = ...
if event == "QUEST_AUTOCOMPLETE" or index == 0 then
if WFWWPCDB.collapsed then
if IsInInstance() and db.instance then
return
WFContainer:SetHeight(db.height)
if wideFrame == "1" then
WFContainer:SetWidth(350)
else
ExpandObjectiveTracker()
WFContainer:SetWidth(250)
end
WFWWPCDB.collapsed = false
end
end
end
end)
 
end
 
OTFContainer:RegisterEvent("PLAYER_ENTERING_WORLD")
OTFContainer:SetScript("OnEvent", function()
WFContainer:RegisterEvent("PLAYER_ENTERING_WORLD")
--local f = CreateFrame("Frame") --need to create a slight delay to get rid of errors and glitches
--f:Hide()
--f.elapsed = 0
--[[f:SetScript("OnUpdate", function(self, elapsed)
f.elapsed = f.elapsed + elapsed
if f.elapsed > .5 then
SetUpContainer()
f:Hide()
end
end)]]
WFContainer:SetScript("OnEvent", function()
Initialize()
SetUpContainer()
SetUpContainer() --see if we can get away with this here now
--f:Show()
end)
\ No newline at end of file
Who Framed Watcher Wabbit Property changes : Deleted: svn:ignore - wfww-OLD.lua