Posted 09 December 2014 - 01:02 AM
Hello.
I'm developing a game, and the game uses windows created by the window.create method.
While developing it, I came across a problem; how can I obtain the X and Y coordinates of a mouse click when the user clicks on a window made by the window.create method?
I've tried this:
but it dosen't work.
I'm developing a game, and the game uses windows created by the window.create method.
While developing it, I came across a problem; how can I obtain the X and Y coordinates of a mouse click when the user clicks on a window made by the window.create method?
I've tried this:
ev, btn, x, y = os.pullEvent("mouse_click")
if x / windowSizeH == 1 and y / windowSizeW then
print("clicked in window")
end
but it dosen't work.