- Selection action to use and selecting card (for example for assignments or another effect) have different card frame color now.

This commit is contained in:
marcins78@gmail.com
2012-03-15 11:39:18 +00:00
parent f0ccb0da80
commit c0d83078a2
3 changed files with 24 additions and 12 deletions

View File

@@ -128,6 +128,11 @@ body {
cursor: pointer; cursor: pointer;
} }
.actionableCard > .borderOverlay {
border-color: #0000af;
cursor: pointer;
}
.selectedCard > .borderOverlay { .selectedCard > .borderOverlay {
border-color: #009f9f; border-color: #009f9f;
} }

View File

@@ -3,6 +3,8 @@
- "Mount Doom" should finally work. - "Mount Doom" should finally work.
- In card info box in game you will see site owner. - In card info box in game you will see site owner.
- You are able to browse your Adventure Deck now during game. - You are able to browse your Adventure Deck now during game.
- Selection action to use and selecting card (for example for assignments or another effect) have different card frame
color now.
<b>14 Mar. 2012</b> <b>14 Mar. 2012</b>
- "White Hand Destroyer" no longer has "Hunter 0" when you control no sites. - "White Hand Destroyer" no longer has "Hunter 0" when you control no sites.

View File

@@ -495,7 +495,7 @@ var GempLotrGameUI = Class.extend({
if (!this.successfulDrag) { if (!this.successfulDrag) {
if (event.shiftKey) { if (event.shiftKey) {
this.displayCardInfo(selectedCardElem.data("card")); this.displayCardInfo(selectedCardElem.data("card"));
} else if (selectedCardElem.hasClass("selectableCard") && !this.replayMode) } else if ((selectedCardElem.hasClass("selectableCard") || selectedCardElem.hasClass("actionableCard")) && !this.replayMode)
this.selectionFunction(selectedCardElem.data("card").cardId, event); this.selectionFunction(selectedCardElem.data("card").cardId, event);
event.stopPropagation(); event.stopPropagation();
} }
@@ -1375,9 +1375,13 @@ var GempLotrGameUI = Class.extend({
return cardDiv; return cardDiv;
}, },
attachSelectionFunctions: function(cardIds) { attachSelectionFunctions: function(cardIds, selection) {
if (cardIds.length > 0) if (selection)
$(".card:cardId(" + cardIds + ")").addClass("selectableCard"); if (cardIds.length > 0)
$(".card:cardId(" + cardIds + ")").addClass("selectableCard");
else
if (cardIds.length > 0)
$(".card:cardId(" + cardIds + ")").addClass("actionableCard");
}, },
// Choosing cards from a predefined selection (for example stating fellowship) // Choosing cards from a predefined selection (for example stating fellowship)
@@ -1464,7 +1468,7 @@ var GempLotrGameUI = Class.extend({
processButtons(); processButtons();
}; };
that.attachSelectionFunctions(selectableCardIds); that.attachSelectionFunctions(selectableCardIds, true);
}; };
allowSelection(); allowSelection();
@@ -1602,7 +1606,7 @@ var GempLotrGameUI = Class.extend({
} }
}; };
that.attachSelectionFunctions(cardIds); that.attachSelectionFunctions(cardIds, false);
}; };
allowSelection(); allowSelection();
@@ -1733,7 +1737,7 @@ var GempLotrGameUI = Class.extend({
} }
}; };
that.attachSelectionFunctions(cardIds); that.attachSelectionFunctions(cardIds, true);
}; };
allowSelection(); allowSelection();
@@ -1745,7 +1749,7 @@ var GempLotrGameUI = Class.extend({
$('.ui-dialog :button').blur(); $('.ui-dialog :button').blur();
}, },
// Choosing some number of cards, for example to character // Choosing some number of cards, for example to wound
cardSelectionDecision: function(decision) { cardSelectionDecision: function(decision) {
var id = decision.getAttribute("id"); var id = decision.getAttribute("id");
var text = decision.getAttribute("text"); var text = decision.getAttribute("text");
@@ -1809,7 +1813,7 @@ var GempLotrGameUI = Class.extend({
processButtons(); processButtons();
}; };
that.attachSelectionFunctions(cardIds); that.attachSelectionFunctions(cardIds, true);
}; };
allowSelection(); allowSelection();
@@ -1914,15 +1918,16 @@ var GempLotrGameUI = Class.extend({
that.doAssignments(freeCharacters, minions); that.doAssignments(freeCharacters, minions);
}; };
that.attachSelectionFunctions(freeCharacters); that.attachSelectionFunctions(freeCharacters, true);
that.attachSelectionFunctions([cardId]); that.attachSelectionFunctions([cardId], true);
}; };
this.attachSelectionFunctions(minions); this.attachSelectionFunctions(minions, true);
}, },
clearSelection: function() { clearSelection: function() {
$(".selectableCard").removeClass("selectableCard").data("action", null); $(".selectableCard").removeClass("selectableCard").data("action", null);
$(".actionableCard").removeClass("actionableCard").data("action", null);
$(".selectedCard").removeClass("selectedCard"); $(".selectedCard").removeClass("selectedCard");
this.selectionFunction = null; this.selectionFunction = null;
}, },