The problem is it doesn't work, and that flumoxxes many newbies to codeing immediately.
I know it sounds like a bold statement, but it is true. I have written an updated version, but will not be releasing it any time soon (sorry).
In the meantime, I will give you this.
Code: Select all
function love.mouse.getX()
local x, y = love.mouse.getPosition()
return x*(multiRes.stdX/CONF_WIDTH)
end
function love.mouse.getY()
local x, y = love.mouse.getPosition()
return y*(multiRes.stdY/CONF_HEIGHT)
end
TFL doesnt't take into account mouse position, which is very important when you resize your entire screen. Addition of the above code will change that. Just remember to define the constants CONF_WIDTH and CONF_HEIGHT to the screen resolution your game is running in I.e., CONF_WIDTH = 1280, CONF_HEIGHT = 720, and multiRes.stdY / x to the resolution the game was origianally designed for.
I will add to this post.
Don't obey.