Skip to content

Commit

Permalink
increase clickable area
Browse files Browse the repository at this point in the history
  • Loading branch information
funkydude committed Oct 28, 2016
1 parent 4910142 commit 7476cc6
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions BadBoy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ local filterFunc = function(_, _, _, _, _, _, _, _, _, _, _, _, lineId)
end

do
btn = CreateFrame("Button", nil, ChatFrame1)
btn = CreateFrame("Frame", nil, ChatFrame1)
btn:SetWidth(46)
btn:SetHeight(46)
btn:SetPoint("BOTTOMRIGHT", 18, -20)
Expand Down Expand Up @@ -818,6 +818,9 @@ do
animGroup:Play()
btn:Hide()

local reportFrame = CreateFrame("Button", nil, btn)
reportFrame:SetAllPoints(ChatFrame1)
reportFrame:SetFrameStrata("DIALOG")
local ticker = nil
local tickerFunc = function()
local canReport = false
Expand All @@ -843,7 +846,7 @@ do
ticker = nil
end
end)
btn:SetScript("OnClick", function(self)
reportFrame:SetScript("OnClick", function(self)
for k, v in next, spamCollector do
if CanComplainChat(v) then
BADBOY_BLACKLIST[k] = true
Expand All @@ -853,10 +856,10 @@ do
spamLogger[k] = nil
end
prevShow = GetTime() -- Refresh throttle so we don't risk showing again straight after reporting
self:Hide()
self:GetParent():Hide()
end)
btn:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_TOP")
reportFrame:SetScript("OnEnter", function(self)
GameTooltip:SetOwner(self, "ANCHOR_CURSOR")
GameTooltip:AddLine(reportMsg, 0.5, 0.5, 1)
if next(spamLogger) then
GameTooltip:AddLine(" ", 0.5, 0.5, 1)
Expand All @@ -866,7 +869,7 @@ do
end
GameTooltip:Show()
end)
btn:SetScript("OnLeave", GameTooltip_Hide)
reportFrame:SetScript("OnLeave", GameTooltip_Hide)
end

--[[ Add Filters ]]--
Expand Down

0 comments on commit 7476cc6

Please sign in to comment.