Ulydev wrote:Check out the examples in the repo
Heyya, quick question, where is all the locations your library gets the mouse position, I would like to replace it with an internal function call to get the mouse position so that I could easily swap it between love.mouse.getPosition() and something like camera:getMousePosition() for gamera and other things
Edit: Nvm
I forgot that it is passed inside the love.update call x3 Well, that's handy, thanks
Edit2: Oh hey, quick thing, you should probably pass self inside of your codes update function for the callbacks ie these:
It would be useful for accessing your own properties inside of one of those calls, say I wanted a button to move across the screen if it's pressed, as of now I'd have to have a reference to it somewhere else, where if that was passed I could do something as simple as :
Code: Select all
--Declare myButton as a local variable somewhere up here
myButton.onClick(self)
self.x,self.y = 100, 500
end
table.insert(objects, myButton)
--Now I've lost a reference to that so I'd have to search through the table of objects for it's reference to edit it's attributes
Just a suggestion