Callback Hook for mouse io events

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Jugbot
Prole
Posts: 14
Joined: Mon Jun 24, 2019 9:54 pm

Callback Hook for mouse io events

Post 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. :(
Jugbot
Prole
Posts: 14
Joined: Mon Jun 24, 2019 9:54 pm

Re: Callback Hook for mouse io events

Post by Jugbot »

Spoke too soon >.>

Code: Select all

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

Who is online

Users browsing this forum: Bing [Bot] and 9 guests