在 iuplua 中使用触摸/多点触摸
使用 iuplua 3.5,以下代码应该在支持多点触控的 Windows 7 设备上抛出几个事件:
require("iuplua")
canvas = iup.canvas{rastersize = "640x480", touch = "YES"}
dialog = iup.dialog{canvas, title = "test application"}
function canvas:touch_cb(id, x, y, status)
print("TOUCH!", id, x, y, status)
end
dialog:show()
iup.MainLoop()
奇怪的是,这对我不起作用,我不知道为什么:( 有人知道如何解决这个问题吗?编辑
:我已经联系了从事 IUP 工作的 Antonio Scuri,他向我发送了该 dll 的新版本,以便在我允许的实际设备上进行测试。你知道是否尽快起作用。
Using iuplua 3.5, the following code should throw a couple of events on windows 7 devices capable of multi touch:
require("iuplua")
canvas = iup.canvas{rastersize = "640x480", touch = "YES"}
dialog = iup.dialog{canvas, title = "test application"}
function canvas:touch_cb(id, x, y, status)
print("TOUCH!", id, x, y, status)
end
dialog:show()
iup.MainLoop()
Strange enough, this does not work for me and I do not have any clue why :( Does anybody have an idea how to fix that?
Edit: I have contacted Antonio Scuri who works on IUP and it seems like there really is a bug in IUP. He has sent me a new version of the dll in order to test it on an actual device capable of multitouch. I will let you know whether it works as soon as I can.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论