diff options
Diffstat (limited to 'js')
-rw-r--r-- | js/mapspecs.js | 19 | ||||
-rw-r--r-- | js/scores.js | 13 |
2 files changed, 25 insertions, 7 deletions
diff --git a/js/mapspecs.js b/js/mapspecs.js index 5a124b1..cf2450a 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -21,6 +21,7 @@ else if (document.attachEvent) { // IE 8- var wallColor = false;
var wallEmblem = false;
+var wallOrientation = 0;
var isChallenge = false;
var isTutorial = false;
@@ -84,6 +85,13 @@ function changeWallEmblem(newEmblem) { loadSol(null);
}
+function linkEmblem(emblem, orientation) {
+ orientation = orientation - 0;
+ var url = 'images/marks/';
+ if (orientation == 0) return url+emblem;
+ return url+'rotate.php?r='+orientation+'&emblem='+emblem;
+}
+
function grid_click(obj) {
//Prepare data
@@ -141,9 +149,18 @@ function grid_click(obj) { wallEmblem = playerWallEmblem;
}
}
+ //TODO: Copy below - above w/ userObj
+ if (wallOrientation == false) {
+ if (typeof userObj !== 'undefined' && userObj.wallOrientation !== '') {
+ wallOrientation = userObj.wallOrientation;
+ }
+ }
+
obj.style.backgroundColor = wallColor;
if (wallEmblem !== false) {
- obj.style.backgroundImage="url(images/marks/"+wallEmblem+")";
+ //obj.style.backgroundImage="url(images/marks/"+wallEmblem+")";
+ //obj.style.backgroundImage="url(images/marks/rotate.php?r=1&emblem="+wallEmblem+")";
+ obj.style.backgroundImage="url("+linkEmblem(wallEmblem, wallOrientation)+")";
}
//Add Wall
diff --git a/js/scores.js b/js/scores.js index 0e81213..3e01ca8 100644 --- a/js/scores.js +++ b/js/scores.js @@ -188,7 +188,7 @@ function scoresFormatPage(JO) { }
p = p+ i+ "</td>";
p = p+ "<td style='vertical-align: middle;'>";
- p = p+ " <div class='grid_td' style='float:left; width:35px; height:35px; background:"+u.wallColor+" url(images/marks/"+u.wallEmblem+");'>";
+ p = p+ " <div class='grid_td' style='float:left; width:35px; height:35px; background:"+u.wallColor+" url("+linkEmblem(u.wallEmblem, u.wallOrientation)+");'>";
p = p+ " <div style='background-color:transparent;' class='grid_td_inner grid_td_rocks'>";
p = p+ " </div>";
p = p+ " </div>";
@@ -443,19 +443,20 @@ function membersFormatPage(JO) { var styleClass = '';
- if (previousI != i + 1)
- if (previousI < i - 1 && previousI != 0)
+ if (previousI != i + 1) {
+ if (previousI < i - 1 && previousI != 0) {
styleClass = 'border-top: 6px solid #777799;';
+ }
+ }
- if (u.wallEmblem == undefined)
- u.wallEmblem = 'blank.png';
+ if (u.wallEmblem == undefined) u.wallEmblem = 'blank.png';
p = p+ "<tr style='"+styleClass+" background-color: "+u.background+"; color:"+u.displayColor+";' title=''>";
p = p+ "<td style='text-align:left;'>";
p = p+ i+ "</td>";
p = p+ "<td style='vertical-align: middle;width:180px;'>";
- p = p+ " <div class='grid_td' style='float:left; width:35px; height:35px; background:"+u.wallColor+" url(images/marks/"+u.wallEmblem+");'>";
+ p = p+ " <div class='grid_td' style='float:left; width:35px; height:35px; background:"+u.wallColor+" url("+linkEmblem(u.wallEmblem, u.wallOrientation)+");'>";
p = p+ " <div style='background-color:transparent;' class='grid_td_inner grid_td_rocks'>";
p = p+ " </div>";
p = p+ " </div>";
|