- Players can now (using Settings tab) specify which form of answer selection to use - buttons or drop-down.
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<pre style="font-size:80%">
|
||||
<b>12 Jan. 2012</b>
|
||||
- Players can now (using Settings tab) specify which form of answer selection to use - buttons or drop-down.
|
||||
|
||||
<b>11 Jan. 2012</b>
|
||||
- "Isengard Sword" now correctly gives -2 Strength to character in skirmish against its bearer.
|
||||
- Players now can setup auto-pass option per phase, by default game auto-passes on all phases except for Shadow
|
||||
|
||||
@@ -55,6 +55,7 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
settingsAutoPass: false,
|
||||
settingsAutoAccept: false,
|
||||
settingsAlwaysDropDown: false,
|
||||
|
||||
windowWidth: null,
|
||||
windowHeight: null,
|
||||
@@ -387,6 +388,20 @@ var GempLotrGameUI = Class.extend({
|
||||
$.cookie("autoAccept", "" + selected, { expires: 365 });
|
||||
});
|
||||
|
||||
$("#settingsBox").append("<input id='alwaysDropDown' type='checkbox' value='selected' /><label for='alwaysDropDown'>Always display drop-down in answer selection</label><br />");
|
||||
|
||||
var alwaysDropDown = $.cookie("alwaysDropDown");
|
||||
if (alwaysDropDown == "true") {
|
||||
$("#alwaysDropDown").prop("checked", true);
|
||||
this.settingsAlwaysDropDown = true;
|
||||
}
|
||||
|
||||
$("#alwaysDropDown").bind("change", function() {
|
||||
var selected = $("#alwaysDropDown").prop("checked");
|
||||
that.settingsAlwaysDropDown = selected;
|
||||
$.cookie("alwaysDropDown", "" + selected, { expires: 365 });
|
||||
});
|
||||
|
||||
$("#settingsBox").append("Phases when game auto-passes for you, if you have no phase actions to play<br />");
|
||||
$("#settingsBox").append("<input id='autoPassFELLOWSHIP' type='checkbox' value='selected' /><label for='autoPassFELLOWSHIP'>Fellowship</label> ");
|
||||
$("#settingsBox").append("<input id='autoPassSHADOW' type='checkbox' value='selected' /><label for='autoPassSHADOW'>Shadow</label> ");
|
||||
@@ -636,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;
|
||||
|
||||
@@ -665,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,
|
||||
@@ -1140,12 +1155,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',
|
||||
@@ -1174,7 +1189,7 @@ var GempLotrGameUI = Class.extend({
|
||||
this.smallDialog
|
||||
.html(text);
|
||||
|
||||
if (results.length > 2) {
|
||||
if (results.length > 2 || this.settingsAlwaysDropDown) {
|
||||
var html = "<br /><select id='multipleChoiceDecision' selectedIndex='0'>";
|
||||
for (var i = 0; i < results.length; i++)
|
||||
html += "<option value='" + i + "'>" + results[i] + "</option>";
|
||||
@@ -1183,12 +1198,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 />");
|
||||
@@ -1573,8 +1588,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();
|
||||
|
||||
Reference in New Issue
Block a user