Changeset 84 for pycodeshooter/trunk/index.html
- Timestamp:
- 01/01/11 14:42:26 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pycodeshooter/trunk/index.html
r83 r84 16 16 17 17 function start(id, list) { 18 var msg = document.getElementById("message"); 18 19 var player = { 19 20 "name": document.getElementById("name").value, … … 31 32 continue; 32 33 if (!player[n] || player[n] < 0) { 33 debugMsgSet("Invalid Input Data");34 setMessage(msg, "Invalid Input Data"); 34 35 return; 35 36 } 37 } 38 39 if (titleIntervalId) { 40 clearInterval(titleIntervalId); 41 titleIntervalId = 0; 36 42 } 37 43 … … 40 46 document.onkeypress = function (ev) { setKeyPress(ev.charCode); }; 41 47 42 initGame(document.getElementById("screen"), id, list[id], player);48 initGame(document.getElementById("screen"), msg, id, list[id], player); 43 49 } 44 50 … … 54 60 55 61 document.getElementById("bossSelection").onchange = function (ev) { 56 if (titleIntervalId) {57 clearInterval(titleIntervalId);58 titleIntervalId = 0;59 }60 62 start(this[this.selectedIndex].value, list); 61 63 }; 62 }63 64 function debugMsgSet(msg) {65 document.getElementById("message").innerHTML = msg;66 }67 68 function debugMsgAdd(msg) {69 document.getElementById("message").innerHTML += msg;70 64 } 71 65
Note: See TracChangeset
for help on using the changeset viewer.