WoWInterface SVN WhoFramedWatcherWabbit

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 19 to Rev 20
    Reverse comparison

Rev 19 → Rev 20

trunk/Who Framed Watcher Wabbit/Who Framed Watcher Wabbit.toc
1,6 → 1,6
## Interface: 50001
## Interface: 50100
## Name: Who Framed Watcher Wabbit?
## Version: 1.7.4
## Version: 1.8
## Notes: Various tweaks to improve the quest watch frame
## SavedVariables: WFWWDB
## SavedVariablesPerCharacter: WFWWPCDB
trunk/Who Framed Watcher Wabbit/wfww.lua
44,6 → 44,7
scale = 1,
hideFrame = false,
instance = false,
petBattle = true,
keybind = "",
}
 
376,20 → 377,6
type = "header",
order = 14.5,
},
keybind = {
name = "Keybinding",
desc = "Key to minimize/maximize the tracker.",
type = "keybinding",
get = function() return db.keybind end,
set = function(_,key)
SetOverrideBinding(WFContainer, false, db.keybind, nil) --clear old binding
if key ~= "" then --set new
SetOverrideBinding(WFContainer, false, key, "CLICK WatchFrameCollapseExpandButton:LeftButton")
end
db.keybind = key
end,
order = 15,
},
hideFrame = {
name = "Hide frame when empty",
desc = "Hide the watch frame when no quests or achievements are being tracked.",
405,7 → 392,7
WatchFrameCollapseExpandButton:EnableMouse(true)
end
end,
order = 15.5,
order = 15,
},
instance = {
name = "Collapse in instance",
420,6 → 407,37
WFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
end,
order = 15.2,
},
petBattle = {
name = "Collapse in pet battle",
desc = "Automatically collapses the watch frame when entering a pet battle.",
type = "toggle",
get = function() return db.petBattle end,
set = function()
db.petBattle = not db.petBattle
if db.petBattle then
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
else
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
end
end,
order = 15.5,
},
keybind = {
name = "Keybinding",
desc = "Key to minimize/maximize the tracker.",
type = "keybinding",
get = function() return db.keybind end,
set = function(_,key)
SetOverrideBinding(WFContainer, false, db.keybind, nil) --clear old binding
if key ~= "" then --set new
SetOverrideBinding(WFContainer, false, key, "CLICK WatchFrameCollapseExpandButton:LeftButton")
end
db.keybind = key
end,
order = 15.7,
},
spacer4 = {
713,15 → 731,26
if not db.instance then
WFContainer:UnregisterEvent("PLAYER_ENTERING_WORLD")
end
if not db.petBattle then
WFContainer:UnregisterEvent("PET_BATTLE_OPENING_START")
WFContainer:UnregisterEvent("PET_BATTLE_CLOSE")
end
WFContainer:RegisterEvent("QUEST_WATCH_UPDATE")
WFContainer:RegisterEvent("QUEST_AUTOCOMPLETE")
WFContainer:RegisterEvent("CVAR_UPDATE")
local notCollapsed
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...
WatchFrameCollapseExpandButton:Click() --collapse
--if you go in the instance and the WF isn't collapsed...
WatchFrameCollapseExpandButton:Click() --collapse
end
elseif event == "PET_BATTLE_OPENING_START" and not WFWWPCDB.collapsed then
notCollapsed = true
WatchFrameCollapseExpandButton:Click()
elseif event == "PET_BATTLE_CLOSE" and notCollapsed then
notCollapsed = false
WatchFrameCollapseExpandButton:Click()
elseif event == "CVAR_UPDATE" then
local cvar,value = ...
if cvar == "WATCH_FRAME_WIDTH_TEXT" then
752,6 → 781,8
end
 
WFContainer:RegisterEvent("PLAYER_ENTERING_WORLD")
WFContainer:RegisterEvent("PET_BATTLE_OPENING_START")
WFContainer:RegisterEvent("PET_BATTLE_CLOSE")
local f = CreateFrame("Frame") --need to create a slight delay to get rid of errors and glitches
f:Hide()
f.elapsed = 0