Page 1 of 1

Callback Hook for mouse io events

Posted: Sun Jul 21, 2019 2:11 am
by Jugbot
https://love2d.org/forums/viewtopic.php?t=100#p1069 I'm looking for something like in this post but the solution link is dead.

A library I am using (luigi) also hooks into the love io events and passes events it doesn't use to the regular love.mousepressed (for example)
Couldn't figure out what they did by reading the source so here I am.

I don't want to call a whole list of different things in each io event callback function. :(

Re: Callback Hook for mouse io events

Posted: Sun Jul 21, 2019 2:21 am
by Jugbot
Spoke too soon >.>

Code: Select all

local old = love.mousepressed
function love.mousepressed(...)
    print("me2")
    old()
end