# HG changeset patch
# User Nenue
# Date 1508273858 14400
# Node ID 8dc0c1917890fa4176c34de70d205e393287d545
# Parent f8ed212558c1d35dfdbbc2ffc39bf7e310fe2d17
- Test fix for frames getting stuck in hidden state when zoning on the move
diff -r f8ed212558c1 -r 8dc0c1917890 Console.lua
--- a/Console.lua Mon Apr 10 13:22:20 2017 -0400
+++ b/Console.lua Tue Oct 17 16:57:38 2017 -0400
@@ -26,6 +26,7 @@
self:RegisterEvent('PLAYER_STARTED_MOVING')
self:RegisterEvent('PLAYER_STOPPED_MOVING')
+ self:RegisterEvent('PLAYER_ENTERING_WORLD')
UIDropDownMenu_Initialize(self.DropdownFrame, function()
local info = UIDropDownMenu_CreateInfo()
diff -r f8ed212558c1 -r 8dc0c1917890 Devent.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Devent.lua Tue Oct 17 16:57:38 2017 -0400
@@ -0,0 +1,148 @@
+--
+-- Created by IntelliJ IDEA.
+-- User: Nick
+-- Date: 4/12/2017
+-- Time: 5:07 PM
+-- To change this template use File | Settings | File Templates.
+--
+local tooltip = GameTooltip
+local traces = {} -- frames
+local eventLog = {} -- events received
+local selectedEvents = {} -- events selected
+local print = function(...) print('Devent', ...) end
+
+--print('Devent script')
+--print('Devent:OnLoad()')
+SLASH_DTRACE1 = "/dtrace"
+
+SlashCmdList.DTRACE = function(args)
+ if #traces == 0 then
+ local trace = CreateFrame('Frame', 'DevianTraceLog'.. (#traces+1), UIParent, 'DevianEventTraceTemplate')
+ tinsert(traces, trace)
+ trace:Setup()
+ end
+
+ traces[1]:Show()
+end
+DevianEventTraceMixin = {
+ events = {},
+ selected = {},
+}
+local tracer = DevianEventTraceMixin
+
+function tracer:OnLoad()
+ self:SetMaxResize(GetScreenWidth(), GetScreenHeight())
+ self:SetMinResize(100, 24)
+ self:EnableMouse(true)
+ self:RegisterForDrag('LeftButton')
+ self:SetMovable(true)
+ self:SetResizable(true)
+ self:SetClampedToScreen(true)
+ self:SetFont("Interface\\Addons\\Devian\\font\\SourceCodePro-Regular.ttf", 13, 'NORMAL')
+ self:SetJustifyH('LEFT')
+ self:SetHyperlinksEnabled(true)
+ self:SetPoint('CENTER')
+ self:SetSize(400,400)
+end
+
+function tracer:Setup(info)
+ if not info then
+ self:RegisterAllEvents()
+ return
+ end
+
+ for _, event in ipairs(self.events) do
+ self:UnregisterEvent(event)
+ end
+
+ for _, event in ipairs(info.events) do
+ self:RegisterEvent(event)
+ end
+end
+
+function tracer:OnHyperlinkEnter(linkdata, link)
+ local messageID = tonumber(linkdata:match('%d+'))
+ if messageID and self.events[messageID] then
+ local data = self.events[messageID]
+ tooltip:SetOwner(self, 'ANCHOR_RIGHT')
+ tooltip:AddLine(data.event)
+ for i, arg in ipairs(data.args) do
+ local argtype = data.argtypes[i]
+ tooltip:AddLine('|cFFAAAAAA'..tostring(argtype)..'|r ' .. tostring(arg))
+ end
+ tooltip:Show()
+ end
+
+end
+
+function tracer:OnHyperlinkLeave(linkdata, link)
+end
+
+function tracer:OnHyperlinkClick(linkdata, link)
+
+ local messageID = tonumber(linkdata:match('%d+'))
+ if messageID and self.events[messageID] then
+ local data = self.events[messageID]
+
+ if self.selected[data.event] then
+ self.selected[data.event] = nil
+ else
+ self.selected[data.event] = true
+ end
+ end
+ self:Update()
+end
+
+function tracer:OnLeave()
+ if tooltip:IsOwned(self) then
+ tooltip:Hide()
+ end
+end
+
+function tracer:OnEvent(event, ...)
+ local entry = {
+ index = #self.events + 1,
+ ts = time(),
+ event = event,
+ args = {},
+ argtypes = {}
+ }
+ for i = 1, select('#', ...) do
+ local arg = select(i,...)
+ entry.argtypes[i] = type(arg)
+ entry.args[i] = tostring(arg)
+ end
+ self.events[entry.index] = entry
+ self:Update()
+end
+
+function tracer:Update()
+ local startingLine = self.CurrentLine or #self.events
+ local prevLine
+ for i = 0, 20 do
+ local index = startingLine - i
+ local line = self.lines[i]
+ if not line then
+ line = self:CreateFontString('EventLine'..i)
+ line:SetFont([[Fonts\ARIALN__.TTF]], 14, 'THIN')
+ line:SetTextColor(1,1,1)
+ self.lines[i] = line
+ end
+ local entry = self.events[index]
+
+ if entry then
+ line:SetText('|Hdevent:'..entry.index..'|h'..entry.event..'|h')
+ line:ClearAllPoints()
+ if prevLine then
+ line:SetPoint('BOTTOMLEFT', prevLine, 'TOPLEFT', 0, 0)
+ else
+ line:SetPoint('BOTTOMLEFT', self, 'BOTTOMLEFT')
+ end
+ line:Show()
+ prevLine = line
+ else
+ line:Hide()
+ end
+ end
+
+end
diff -r f8ed212558c1 -r 8dc0c1917890 Devent.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Devent.xml Tue Oct 17 16:57:38 2017 -0400
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r f8ed212558c1 -r 8dc0c1917890 Devian.lua
--- a/Devian.lua Mon Apr 10 13:22:20 2017 -0400
+++ b/Devian.lua Tue Oct 17 16:57:38 2017 -0400
@@ -33,6 +33,7 @@
function DevianCore:OnLoad ()
self:RegisterEvent('ADDON_LOADED')
self:RegisterEvent('PLAYER_LOGIN')
+
self:SetShown(true)
end
diff -r f8ed212558c1 -r 8dc0c1917890 Devian.toc
--- a/Devian.toc Mon Apr 10 13:22:20 2017 -0400
+++ b/Devian.toc Tue Oct 17 16:57:38 2017 -0400
@@ -6,6 +6,7 @@
## SavedVariables: DevianDB, DevianLoadMessage
Devian.xml
Console.xml
+Devent.xml
Dock.xml
Locale.lua
UI.lua
diff -r f8ed212558c1 -r 8dc0c1917890 Dock.xml
--- a/Dock.xml Mon Apr 10 13:22:20 2017 -0400
+++ b/Dock.xml Tue Oct 17 16:57:38 2017 -0400
@@ -36,7 +36,7 @@
-