Archery totals and move count/limit added to UI.

This commit is contained in:
marcins78@gmail.com
2011-10-26 22:14:57 +00:00
parent 25947c4879
commit bda7a70709
8 changed files with 64 additions and 2 deletions

View File

@@ -46,6 +46,50 @@
border-color: #009f9f;
}
.stats {
text-align: center;
padding: 2px;
}
.fpArchery {
display: inline-block;
background-image: url('images/fpArchery.png');
background-repeat: no-repeat;
color: #007777;
text-align: center;
vertical-align: middle;
font-size: 200%;
font-weight: bolder;
width: 30px;
height: 30px;
}
.shadowArchery {
display: inline-block;
background-image: url('images/shadowArchery.png');
background-repeat: no-repeat;
color: #007777;
text-align: center;
vertical-align: middle;
font-size: 200%;
font-weight: bolder;
width: 30px;
height: 30px;
}
.move {
display: inline-block;
background-image: url('images/move.png');
background-repeat: no-repeat;
color: #007777;
text-align: center;
vertical-align: middle;
font-size: 200%;
font-weight: bolder;
width: 30px;
height: 30px;
}
.player {
color: #ffffff;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 585 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

View File

@@ -1,6 +1,7 @@
<pre style="font-size:80%">
<b>26 Oct. 2011</b>
- Added card overlay to active characters showing their current strength.
- Archery totals and move count/limit added to UI.
<b>25 Oct. 2011</b>
- "Vengeance" now correctly counts cards attached to oposing character.

View File

@@ -697,6 +697,15 @@ var GameAnimations = Class.extend({
}
}
var fellowshipArchery = element.getAttribute("fellowshipArchery");
var shadowArchery = element.getAttribute("shadowArchery");
var moveCount = element.getAttribute("moveCount");
var moveLimit = element.getAttribute("moveLimit");
$(".fpArchery").html(fellowshipArchery);
$(".shadowArchery").html(shadowArchery);
$(".move").html(moveCount + "/" + moveLimit);
var playerZones = element.getElementsByTagName("playerZones");
for (var i = 0; i < playerZones.length; i++) {
var playerZone = playerZones[i];

View File

@@ -31,6 +31,8 @@ var GempLotrGameUI = Class.extend({
deadPileDialogs: null,
deadPileGroups: null,
statsDiv: null,
skirmishGroupDiv: null,
fpStrengthDiv: null,
shadowStrengthDiv: null,
@@ -195,11 +197,15 @@ var GempLotrGameUI = Class.extend({
$("#main").append(this.alertBox);
this.statsDiv = $("<div class='ui-widget-content stats'></div>");
this.statsDiv.css({"border-radius": "7px"});
this.statsDiv.append("<div class='fpArchery'></div> <div class='shadowArchery'></div> <div class='move'></div>");
$("#main").append(this.statsDiv);
$("body").click(
function (event) {
that.clickCardFunction(event);
});
},
addBottomLeftTabPane: function() {
@@ -390,7 +396,9 @@ var GempLotrGameUI = Class.extend({
var currentPlayerTurn = (this.currentPlayerId == this.bottomPlayerId);
if (this.advPathGroup != null) {
this.advPathGroup.setBounds(padding, padding, advPathWidth, height - (padding * 3) - chatHeight);
this.statsDiv.css({position: "absolute", left: padding + "px", top: height - (padding * 2) - chatHeight - 34 + "px", width: advPathWidth, height: 34});
this.advPathGroup.setBounds(padding, padding, advPathWidth, height - (padding * 3) - chatHeight - 34 - padding);
this.supportOpponent.setBounds(advPathWidth + specialUiWidth + (padding * 2), padding + yScales[0] * heightPerScale, width - (advPathWidth + specialUiWidth + padding * 3), heightScales[0] * heightPerScale);
this.charactersOpponent.setBounds(advPathWidth + specialUiWidth + (padding * 2), padding * 2 + yScales[1] * heightPerScale, currentPlayerTurn ? charsWidth : charsWidthWithAssignments, heightScales[1] * heightPerScale);