Maybe fixing some Game UI issues.
This commit is contained in:
@@ -543,9 +543,10 @@ var GameAnimations = Class.extend({
|
||||
var cardId = element.getAttribute("cardId");
|
||||
var opposingCardIds = element.getAttribute("otherCardIds").split(",");
|
||||
|
||||
$(".card:cardId(" + opposingCardIds + ")").each(function() {
|
||||
$(this).data("card").skirmish = true;
|
||||
});
|
||||
if (opposingCardIds.length > 0)
|
||||
$(".card:cardId(" + opposingCardIds + ")").each(function() {
|
||||
$(this).data("card").skirmish = true;
|
||||
});
|
||||
|
||||
if (cardId != null)
|
||||
$(".card:cardId(" + cardId + ")").each(function() {
|
||||
|
||||
@@ -651,21 +651,21 @@ var GempLotrGameUI = Class.extend({
|
||||
initializeDialogs: function() {
|
||||
this.smallDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 200
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: false,
|
||||
width: 400,
|
||||
height: 200
|
||||
});
|
||||
|
||||
this.cardActionDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: true,
|
||||
width: 600,
|
||||
height: 300
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: true,
|
||||
width: 600,
|
||||
height: 300
|
||||
});
|
||||
|
||||
var that = this;
|
||||
|
||||
@@ -680,11 +680,11 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
this.infoDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information"
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information"
|
||||
});
|
||||
|
||||
var swipeOptions = {
|
||||
threshold: 20,
|
||||
@@ -1165,12 +1165,12 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
if (!this.replayMode) {
|
||||
this.smallDialog.dialog("option", "buttons",
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#integerDecision").val());
|
||||
}
|
||||
});
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#integerDecision").val());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#integerDecision").SpinnerControl({ type: 'range',
|
||||
@@ -1208,12 +1208,12 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
if (!this.replayMode) {
|
||||
this.smallDialog.dialog("option", "buttons",
|
||||
{
|
||||
"OK": function() {
|
||||
that.smallDialog.dialog("close");
|
||||
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
||||
}
|
||||
});
|
||||
{
|
||||
"OK": function() {
|
||||
that.smallDialog.dialog("close");
|
||||
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
this.smallDialog.append("<br />");
|
||||
@@ -1421,7 +1421,8 @@ var GempLotrGameUI = Class.extend({
|
||||
return;
|
||||
} else {
|
||||
that.clearSelection();
|
||||
$(".card:cardId(" + selectedCardIds + ")").addClass("selectedCard");
|
||||
if (selectedCardIds.length > 0)
|
||||
$(".card:cardId(" + selectedCardIds + ")").addClass("selectedCard");
|
||||
}
|
||||
} else {
|
||||
$(".card:cardId(" + cardId + ")").removeClass("selectableCard").addClass("selectedCard");
|
||||
@@ -1600,8 +1601,8 @@ var GempLotrGameUI = Class.extend({
|
||||
$(div).find('LI.hover').removeClass('hover');
|
||||
$(this).parent().addClass('hover');
|
||||
}).mouseout(function() {
|
||||
$(div).find('LI.hover').removeClass('hover');
|
||||
});
|
||||
$(div).find('LI.hover').removeClass('hover');
|
||||
});
|
||||
|
||||
var getRidOfContextMenu = function() {
|
||||
$(div).remove();
|
||||
@@ -1765,7 +1766,8 @@ var GempLotrGameUI = Class.extend({
|
||||
return;
|
||||
} else {
|
||||
that.clearSelection();
|
||||
$(".card:cardId(" + selectedCardIds + ")").addClass("selectedCard");
|
||||
if (selectedCardIds.length > 0)
|
||||
$(".card:cardId(" + selectedCardIds + ")").addClass("selectedCard");
|
||||
}
|
||||
} else {
|
||||
$(".card:cardId(" + cardId + ")").removeClass("selectableCard").addClass("selectedCard");
|
||||
@@ -1803,12 +1805,12 @@ var GempLotrGameUI = Class.extend({
|
||||
for (var i = 0; i < freeCharacters.length; i++) {
|
||||
assignmentMap[freeCharacters[i]] = freeCharacters[i];
|
||||
}
|
||||
|
||||
$(".card:cardId(" + minions + ")").each(function() {
|
||||
var card = $(this).data("card");
|
||||
if (card.assign != null)
|
||||
assignmentMap[card.assign] += " " + card.cardId;
|
||||
});
|
||||
if (minions.length > 0)
|
||||
$(".card:cardId(" + minions + ")").each(function() {
|
||||
var card = $(this).data("card");
|
||||
if (card.assign != null)
|
||||
assignmentMap[card.assign] += " " + card.cardId;
|
||||
});
|
||||
|
||||
var assignmentArray = new Array();
|
||||
for (var i = 0; i < freeCharacters.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user