summaryrefslogtreecommitdiff
path: root/html/examples
diff options
context:
space:
mode:
authorscuri <scuri>2010-07-22 22:52:11 +0000
committerscuri <scuri>2010-07-22 22:52:11 +0000
commit3d0924e2b95af956629a15f585915b6300725315 (patch)
tree48f1e2208e4984bc071d0308391078e272fec62a /html/examples
parentc8e3c97357e0e3b551ef52e549717ba4efaffb8b (diff)
*** empty log message ***
Diffstat (limited to 'html/examples')
-rw-r--r--html/examples/show_image_touch.wlua (renamed from html/examples/show_image_tuio.wlua)9
1 files changed, 6 insertions, 3 deletions
diff --git a/html/examples/show_image_tuio.wlua b/html/examples/show_image_touch.wlua
index 97642b4..eaa9d7e 100644
--- a/html/examples/show_image_tuio.wlua
+++ b/html/examples/show_image_touch.wlua
@@ -5,10 +5,11 @@ require"iuplua"
require"iupluacd"
require"iupluatuio"
-cnv = iup.canvas{rastersize = "1024x768", border = "NO"}
+cnv = iup.canvas{rastersize = "1024x768", border = "NO", touch="Yes"}
img_x = 0
img_y = 0
+-- comment this line to NOT use the TUIO client, only Windows 7 supports multi-touch
tuio = iup.tuioclient{}
function load_image(filename)
@@ -200,8 +201,10 @@ function dlg:close_cb()
return iup.IGNORE -- because we destroy the dialog
end
-tuio.connect = "YES"
-tuio.targetcanvas = cnv
+if (tuio) then
+ tuio.connect = "YES"
+ tuio.targetcanvas = cnv
+end
dlg:show()
cnv.rastersize = nil -- remove minimum size