Changing the layout of support areas.
This commit is contained in:
@@ -86,7 +86,7 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
this.specialGroup = new NormalCardGroup(this.dialogInstance, function(card) {
|
||||
return (card.zone == "SPECIAL");
|
||||
});
|
||||
}, false);
|
||||
this.specialGroup.setBounds(this.padding, this.padding, 400, 200);
|
||||
|
||||
this.gameStateElem = $("<div class='ui-widget-content'></div>");
|
||||
@@ -879,10 +879,9 @@ var GempLotrGameUI = Class.extend({
|
||||
}
|
||||
|
||||
if (selectedCardIds.length == max) {
|
||||
that.clearSelection();
|
||||
$(".selectableCard").removeClass("selectableCard");
|
||||
$(".card:cardId(" + cardId + ")").addClass("selectedCard");
|
||||
} else {
|
||||
|
||||
$(".card:cardId(" + cardId + ")").removeClass("selectableCard").addClass("selectedCard");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,14 +10,16 @@ var CardGroup = Class.extend({
|
||||
maxCardHeight: null,
|
||||
descDiv: null,
|
||||
|
||||
init: function(container, belongTest) {
|
||||
init: function(container, belongTest, createDiv) {
|
||||
this.container = container;
|
||||
this.belongTestFunc = belongTest;
|
||||
|
||||
this.descDiv = $("<div class='ui-widget-content'></div>");
|
||||
this.descDiv.css({"border-radius": "7px"});
|
||||
if (createDiv === undefined || createDiv) {
|
||||
this.descDiv = $("<div class='ui-widget-content'></div>");
|
||||
this.descDiv.css({"border-radius": "7px"});
|
||||
|
||||
container.append(this.descDiv);
|
||||
container.append(this.descDiv);
|
||||
}
|
||||
},
|
||||
|
||||
setBounds: function(x, y, width, height) {
|
||||
@@ -25,7 +27,8 @@ var CardGroup = Class.extend({
|
||||
this.y = y + 3;
|
||||
this.width = width - 6;
|
||||
this.height = height - 6;
|
||||
this.descDiv.css({left:x + "px", top:y + "px", width: width, height: height, position: "absolute"});
|
||||
if (this.descDiv != null)
|
||||
this.descDiv.css({left:x + "px", top:y + "px", width: width, height: height, position: "absolute"});
|
||||
this.layoutCards();
|
||||
},
|
||||
|
||||
@@ -115,8 +118,8 @@ var AdvPathCardGroup = CardGroup.extend({
|
||||
|
||||
var NormalCardGroup = CardGroup.extend({
|
||||
|
||||
init: function(container, belongTest) {
|
||||
this._super(container, belongTest);
|
||||
init: function(container, belongTest, createDiv) {
|
||||
this._super(container, belongTest, createDiv);
|
||||
},
|
||||
|
||||
layoutCards: function() {
|
||||
|
||||
Reference in New Issue
Block a user