Text draws above coordinates
TetrisKid48 opened this issue · 4 comments
I can't get text to print. I made a quick test program to print the button pressed on screen whenever the cursor is and it doesn't seem to work, however the pointer I added is working fine so the wiimote is being detected for sure. I also tried printing text just to (0, 0) and within love.draw and that didn't work either.
Here is my code:
local wiimote, pointer
local textFont
function love.load()
wiimote = love.wiimote.getWiimotes()[1]
pointer = love.graphics.newTexture("assets/pointer.png")
textFont = love.graphics.newFont(20)
love.graphics.setFont(textFont)
love.graphics.setColor(255, 255, 255)
end
function printKey(letter)
love.graphics.print(letter, wiimote:getX(), wiimote:getY())
end
function love.update(dt)
if wiimote:isDown("b") then
printKey("b")
end
end
function love.draw()
love.graphics.print("Welcome to SuperGame", 0, 0)
love.graphics.draw(pointer, wiimote:getX(), wiimote:getY(), wiimote:getAngle(), 1, 1, 48, 48)
end
I am trying to figure out wiilove's features through reading the Wiirdle code btw.
Thanks.
Very sorry, just read one of the closed issues and now i see why printing at 0, 0 would not work, but the other line of code is still broken. I tried added code to round the positions but that didn't help.
Not sure what you mean? How do I download the version with the bug fix? The most recent release is from before then.
You would need to compile it, but the issue has been fixed in the latest commit. It will be included in the next release (which will have a compiled build).