|
@ -23,6 +23,12 @@ |
|
|
position: relative; |
|
|
position: relative; |
|
|
z-index: 1; |
|
|
z-index: 1; |
|
|
} |
|
|
} |
|
|
|
|
|
#message { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
z-index: 1; |
|
|
|
|
|
top: 20px; |
|
|
|
|
|
right: 50px |
|
|
|
|
|
} |
|
|
</style> |
|
|
</style> |
|
|
</head> |
|
|
</head> |
|
|
<body> |
|
|
<body> |
|
@ -34,7 +40,10 @@ |
|
|
<canvas id="textoverlay"></canvas> |
|
|
<canvas id="textoverlay"></canvas> |
|
|
<div id="controls"></div> |
|
|
<div id="controls"></div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<form id="message" method="POST" action='#'> |
|
|
|
|
|
<input type="text" name="message_data" id="message_data" placeholder="Message"> |
|
|
|
|
|
<input type="submit" value="Send"> |
|
|
|
|
|
</form> |
|
|
|
|
|
|
|
|
<!--<h2 id="start">Press a button on your controller to start</h2>--> |
|
|
<!--<h2 id="start">Press a button on your controller to start</h2>--> |
|
|
|
|
|
|
|
@ -148,6 +157,11 @@ socket.on('data', (data) => { |
|
|
ctx.font = "24px Arial"; |
|
|
ctx.font = "24px Arial"; |
|
|
ctx.fillStyle = "blue"; |
|
|
ctx.fillStyle = "blue"; |
|
|
//ctx.fillText("Hello World", canvas.width/3, 30); |
|
|
//ctx.fillText("Hello World", canvas.width/3, 30); |
|
|
|
|
|
|
|
|
|
|
|
$('form#message').submit(function(event) { |
|
|
|
|
|
gp_socket.emit('text', {data: $('#message_data').val()}); |
|
|
|
|
|
return false; |
|
|
|
|
|
}); |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
</script> |
|
|
</script> |
|
|