Skip to content

Instantly share code, notes, and snippets.

@nefftd
Created August 22, 2014 18:34
Show Gist options
  • Save nefftd/eac4e1aa255cab527195 to your computer and use it in GitHub Desktop.
Save nefftd/eac4e1aa255cab527195 to your computer and use it in GitHub Desktop.
local sizer = CreateFrame('Frame',nil,WorldFrame,'SecureHandlerStateTemplate')
sizer:SetAllPoints(true)
sizer:Execute('children = newtable()')
sizer:SetAttribute('_onstate-mousestate',[[
wipe(children)
self:GetParent():GetChildList(children)
local f,c
for i = 1,#children do
f = children[i]
if strmatch((f:GetName() or ''),'^NamePlate%d+$') then
c = f:GetChildren()
c:SetWidth(]]..psize[1]..[[)
c:SetHeight(]]..psize[2]..[[)
end
end
]])
RegisterStateDriver(sizer,'mousestate','[@mouseover,exists] on; off')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment