Instead of passing function names in WindowAddHotSpot, can we actually pass a true function? The whole keeping up with ids in a table and then having generic mouse functions that check this table seems complicated. Doubly complicated when you start trying to keep up with hotspots from multiple miniwindows in the same plugin.
In lua
I don't know how hard this would be, but somewhere MUSHclient has to look up the function from the string anyway, so can we cut out the middle man?
Thanks,
Bast
In lua
function somefunction (flags, hotspotid)
print("help")
end
-- New way
WindowAddHotspot(winid, winid .. ':' .. 'test',
left, top, right, bottom,
nil, -- mouseover
nil, -- cancelmouseover
nil, -- mousedown
nil, -- cancelmousedown
somefunction, -- mouseup
hint,
cursor, 0)
I don't know how hard this would be, but somewhere MUSHclient has to look up the function from the string anyway, so can we cut out the middle man?
Thanks,
Bast