diff options
Diffstat (limited to 'public/javascripts/game.js')
| -rw-r--r-- | public/javascripts/game.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/public/javascripts/game.js b/public/javascripts/game.js index cb51987..184d3a9 100644 --- a/public/javascripts/game.js +++ b/public/javascripts/game.js @@ -91,7 +91,7 @@ var UI = { } var howlong = Math.floor( (now - start) ) - delay; if (own_cursor) { - $("#waiting").html( timeInSecs( howlong ) ); + own_cursor.time.html( timeInSecs( howlong ) ); } } else { if (blurTime) { @@ -119,7 +119,10 @@ var UI = { var cursor = new Cursor( users[i] ); users[i].cursor = cursor; cursors.push(cursor); - } + } + else if (i == _id) { + own_cursor.name.html( users[i].firstname ); + } } }, @@ -141,9 +144,11 @@ function Cursor ( user ) { this.el.css('background-image', 'url(' + cursor_image + '?' + Math.floor(Math.random() * 1000) + ')'); this.name = $("<div>"); + this.name.addClass('name'); this.name.html( user.firstname ); this.time = $("<div>"); + this.time.addClass('time'); this.time.html( "0:00" ); this.el.append(this.name); |
