TraKERS :
authorbastiena
Mon, 23 Jul 2012 10:52:41 +0200
changeset 51 03ea3d7ddbe1
parent 50 d969375fbcf7
child 52 277c94533395
TraKERS : bigger text for trakers gestures in front processing help goes automatically at the bottom of the page for web gestures
front_js/gestures/gestures/js/gestures.js
front_processing/src/Trakers_gestures/Trakers_gestures.pde
front_processing/src/Trakers_gestures/TuioFunctions.pde
--- a/front_js/gestures/gestures/js/gestures.js	Fri Jul 20 11:46:38 2012 +0200
+++ b/front_js/gestures/gestures/js/gestures.js	Mon Jul 23 10:52:41 2012 +0200
@@ -30,12 +30,12 @@
     
     this.config = config;
 
-	this.help();
-    
     var textPanel = "<div id='textPanel'>Aucune gesture n'est détectée.</div>";
     var imagePanel = "<img id='imagePanel' src='./img/black.png'></img>";
     $('body').append(textPanel + imagePanel);
     
+	this.help();
+	
     $('#imagePanel').load(function()
     {
         this.imgWidth = $('#imagePanel').width();
@@ -47,6 +47,13 @@
             top: ($(window).height() - $('#help').position().top) / 2,
             left: ($(window).width() - this.imgHeight) / 2
         });
+		
+		$('#help').css(
+		{
+			position: 'absolute',
+			width: '100%',
+			top: $(window).height() - $('#help').height()
+		});
     });
     
     this.wsClient = new Client(this.config.host, this.config.port, this);
@@ -97,13 +104,5 @@
 	
 	$('body').append(help);
 	
-	$('#help').css(
-	{
-		position: 'absolute',
-		left: 0,
-		width: '100%',
-		top: $(window).height() - $('#help').height()
-	});
-	
-	console.log($(window).height() - $('#help').height());
+	console.log($(window).height() + ' ' + $('#help').height());
 }
\ No newline at end of file
--- a/front_processing/src/Trakers_gestures/Trakers_gestures.pde	Fri Jul 20 11:46:38 2012 +0200
+++ b/front_processing/src/Trakers_gestures/Trakers_gestures.pde	Mon Jul 23 10:52:41 2012 +0200
@@ -39,8 +39,8 @@
 void showMask()
 {
     background(0);
-    fill(255);
-    rect(0, 80, width, height-130);
+/*    fill(255);
+    rect(0, 80, width, height-130);*/
 }
 
 /*FONCTION D'AFFICHAGE DU CODE DE LA GESTURE DETECTEE
@@ -48,6 +48,7 @@
 Sortie : Affichage du code de la gesture*/
 void showGestureMessage(TuioString tstr)
 {
-    text("Gesture détectée : " + tstr.getMessage(), width/2 - 20, 20);
+    textSize(32);
+    text("Gesture détectée : " + tstr.getMessage(), width/2, height/2);
 }
 
--- a/front_processing/src/Trakers_gestures/TuioFunctions.pde	Fri Jul 20 11:46:38 2012 +0200
+++ b/front_processing/src/Trakers_gestures/TuioFunctions.pde	Mon Jul 23 10:52:41 2012 +0200
@@ -8,7 +8,8 @@
     if(tuioStringList == null || tuioStringList.size() <= 0)
     {
         showMask();
-        text("Gesture non détectée.", width/2 - 20, 20);
+        textSize(32);
+        text("Gesture non détectée.", width/2, height/2);
     }
     else
     {