From 4de6c90c71426e98b35429df49a4399f6b475312 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Thu, 7 Jul 2011 09:16:32 +0200 Subject: [PATCH] add help --- star.js/js/star.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/star.js/js/star.js b/star.js/js/star.js index c65867a..985e6d9 100644 --- a/star.js/js/star.js +++ b/star.js/js/star.js @@ -136,9 +136,17 @@ function format_infos( state ) { infos += state.distance_travelled + " meters travelled"; return infos; } +function format_help( ) { + var help = "←↑→↓ to move around
"; + help += "Space to switch actor
"; + help += "'r' to reload
"; + help += "'n' to pass to the next level
"; + help += "'p' to go back to the previous level
"; + return help; +} function display_level( state, elt ) { - var starhtml = '
' + format_level( state, false ) + '
'; + var starhtml = '
' + format_level( state, false ) + '
'; $( elt ).html( starhtml ); }