summaryrefslogtreecommitdiffstats
path: root/js
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-02-28 23:08:28 -0800
committerPatrick Davison <snapwilliam@gmail.com>2013-02-28 23:08:28 -0800
commit60fa55b49e8f4cf8570882b5eb6ad3f9bbb7885b (patch)
tree92d6c26b01c56bc57147fdaab681c7a713750fdd /js
parent303a0b1bcda0550c74dce2cc0f4ba58aa88673fb (diff)
downloadpathery-60fa55b49e8f4cf8570882b5eb6ad3f9bbb7885b.tar.xz
Labeled checkpoints and etc in the mapDisplay
Diffstat (limited to 'js')
-rw-r--r--js/mapspecs.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js
index 0ea99db..2387a00 100644
--- a/js/mapspecs.js
+++ b/js/mapspecs.js
@@ -826,6 +826,17 @@ function displayMap(mapid, divID, goalSize, solution, moves, challengeMap, isThu
});
}
+var Tile = {
+"o" : "Open",
+"s" : "Start",
+"f" : "Finish",
+"c" : "Checkpoint",
+"r" : "Rock",
+"t" : "Teleport In",
+"u" : "Teleport Out",
+"p" : "Unbuildable",
+"x" : "Single-Path-Rock"};
+
//Map as object. If target width is NULL or False, default width is used.
function mapAsHTML(map, targetWidth, demo) {
@@ -867,7 +878,7 @@ function mapAsHTML(map, targetWidth, demo) {
mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' onClick='grid_click(this)' >";
mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
} else {
- mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='Position: "+x+","+oldy+"' id='"+idHandle+"' >";
+ mapgrid += "<div style='float:left; width:"+tileWidth+"px; height:"+tileWidth+"px; ' class='mapcell "+type+value+"' title='"+Tile[type]+" "+value+" On: "+x+","+oldy+"' id='"+idHandle+"' >";
mapgrid += "<div id='child_"+idHandle+"' class='child'></div></div>";
}
}
@@ -931,10 +942,7 @@ function mapThumbnailHTML(map, targetWidth, isActive) {
height = tileWidth * map.height;
var mapgrid = '';
-
-
var r = '';
- //r += "<div class='mapThumbnail"+mapClass+"' title='"+toolTip+"'; onclick='displayMapScores("+map.ID+")'>";
r += map.name;
mapgrid += '<div class="map" style="width:'+width+'px; height:'+height+'px">';
@@ -949,9 +957,7 @@ function mapThumbnailHTML(map, targetWidth, isActive) {
}
}
mapgrid += '</div>';
-
r += mapgrid;
- //r += '</div>';
return r;
}