Skip to content

Commit

Permalink
core: fix contextual ping on headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainrider committed Oct 31, 2023
1 parent 8739982 commit fac84fc
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions ouf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,16 @@ local function initObject(unit, style, styleFunc, header, ...)
object:SetAttribute('*type2', 'togglemenu')
object:SetAttribute('toggleForVehicle', true)

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.
By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
object:SetAttribute('ping-receiver', true)

if(isEventlessUnit(objectUnit)) then
oUF:HandleEventlessUnit(object)
else
Expand Down Expand Up @@ -346,15 +356,6 @@ local function initObject(unit, style, styleFunc, header, ...)
func(object)
end

--[[ frame.IsPingable
This boolean can be set to false to disable the frame from being pingable. Enabled by default.
--]]
--[[ Override: frame:GetContextualPingType()
Used to define which contextual ping is used for the frame.
By default this wraps `C_Ping.GetContextualPingTypeForUnit(UnitGUID(frame.unit))`.
--]]
object:SetAttribute('ping-receiver', true)
Mixin(object, PingableType_UnitFrameMixin)

-- Make Clique kinda happy
Expand Down Expand Up @@ -604,6 +605,7 @@ do
frame:SetAttribute('*type1', 'target')
frame:SetAttribute('*type2', 'togglemenu')
frame:SetAttribute('ping-receiver', true)
frame:SetAttribute('oUF-guessUnit', unit)
end
Expand Down

0 comments on commit fac84fc

Please sign in to comment.