Skip to content

Instantly share code, notes, and snippets.

@nefftd
Created August 15, 2014 20:38
Show Gist options
  • Save nefftd/4365441bfc3017590ff8 to your computer and use it in GitHub Desktop.
Save nefftd/4365441bfc3017590ff8 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',
([[
--if newstate == 'on' then
local prevNum = #Children
wipe(Children)
self:GetParent():GetChildList(Children)
local f
for i = 1,#Children do
f = Children[i]
if strmatch(f:GetName() or '','^NamePlate%d+$') then
f:SetSize(%d,%d)
end
end
--end
]]):format(unpack(psize))
)
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