Working on Look of the Game UI.
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.Map;
|
||||
public class LotroCardBlueprintLibrary {
|
||||
private String[] _packageNames =
|
||||
new String[]{
|
||||
"", ".dwarven", ".elven", ".isengard", ".moria", ".shire", ".site"
|
||||
"", ".dwarven", ".elven", ".gandalf", ".gondor", ".isengard", ".moria", ".shire", ".site"
|
||||
};
|
||||
private Map<String, LotroCardBlueprint> _blueprintMap = new HashMap<String, LotroCardBlueprint>();
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="main" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #efefef;">
|
||||
<div id="main" style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #000000;">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -95,6 +95,7 @@ var GempLotrGameUI = Class.extend({
|
||||
this.specialGroup.setBounds(this.padding, this.padding, 400, 200);
|
||||
|
||||
this.gameStateElem = $("<div></div>");
|
||||
this.gameStateElem.css({"border-radius": "7px", "background-color": "#ffffff"});
|
||||
|
||||
this.gameStateElem.append("<b>Players:</b><br>");
|
||||
for (var i = 0; i < this.allPlayerIds.length; i++)
|
||||
@@ -153,52 +154,52 @@ var GempLotrGameUI = Class.extend({
|
||||
initializeDialogs: function() {
|
||||
this.dialogInstance = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: false,
|
||||
minHeight: 80
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
resizable: false,
|
||||
minHeight: 80
|
||||
});
|
||||
|
||||
this.assignmentDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
title: "Assignments",
|
||||
resizable: true,
|
||||
minHeight: 240,
|
||||
minWidth: 400,
|
||||
width: 500,
|
||||
height: 200,
|
||||
position: ["right", "bottom"]
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
title: "Assignments",
|
||||
resizable: true,
|
||||
minHeight: 240,
|
||||
minWidth: 400,
|
||||
width: 500,
|
||||
height: 200,
|
||||
position: ["right", "bottom"]
|
||||
});
|
||||
|
||||
this.skirmishDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
title: "Skirmish",
|
||||
resizable: true,
|
||||
minHeight: 240,
|
||||
minWidth: 400,
|
||||
width: 500,
|
||||
height: 200,
|
||||
position: ["right", "top"]
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: false,
|
||||
title: "Skirmish",
|
||||
resizable: true,
|
||||
minHeight: 240,
|
||||
minWidth: 400,
|
||||
width: 500,
|
||||
height: 200,
|
||||
position: ["right", "top"]
|
||||
});
|
||||
|
||||
$(".ui-dialog-titlebar-close").hide();
|
||||
|
||||
this.infoDialog = $("<div></div>")
|
||||
.dialog({
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information",
|
||||
minHeight: 80,
|
||||
minWidth: 200,
|
||||
width: 600,
|
||||
height: 300,
|
||||
maxHeight: 300
|
||||
});
|
||||
autoOpen: false,
|
||||
closeOnEscape: true,
|
||||
resizable: false,
|
||||
title: "Card information",
|
||||
minHeight: 80,
|
||||
minWidth: 200,
|
||||
width: 600,
|
||||
height: 300,
|
||||
maxHeight: 300
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
@@ -538,13 +539,13 @@ var GempLotrGameUI = Class.extend({
|
||||
this.dialogInstance
|
||||
.html(text + "<br /><input id='integerDecision' type='text' value='0'>")
|
||||
.dialog("option", "buttons",
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#integerDecision").val());
|
||||
}
|
||||
}
|
||||
)
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#integerDecision").val());
|
||||
}
|
||||
}
|
||||
)
|
||||
.dialog("option", "width", "400")
|
||||
.dialog("option", "height", "auto");
|
||||
;
|
||||
@@ -578,13 +579,13 @@ var GempLotrGameUI = Class.extend({
|
||||
this.dialogInstance
|
||||
.html(html)
|
||||
.dialog("option", "buttons",
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
||||
}
|
||||
}
|
||||
)
|
||||
{
|
||||
"OK": function() {
|
||||
$(this).dialog("close");
|
||||
that.decisionFunction(id, $("#multipleChoiceDecision").val());
|
||||
}
|
||||
}
|
||||
)
|
||||
.dialog("option", "width", "400")
|
||||
.dialog("option", "height", "auto");
|
||||
|
||||
@@ -917,13 +918,13 @@ var GempLotrGameUI = Class.extend({
|
||||
|
||||
if (this.shadowAssignGroups[characterId] == null) {
|
||||
this.shadowAssignGroups[characterId] = new NormalCardGroup(null, this.assignmentDialog, function (card) {
|
||||
return (card.zone == "SHADOW_CHARACTERS" && card.assign == characterId);
|
||||
}
|
||||
);
|
||||
return (card.zone == "SHADOW_CHARACTERS" && card.assign == characterId);
|
||||
}
|
||||
);
|
||||
this.freePeopleAssignGroups[characterId] = new NormalCardGroup(null, this.assignmentDialog, function (card) {
|
||||
return (card.cardId == characterId);
|
||||
}
|
||||
);
|
||||
return (card.cardId == characterId);
|
||||
}
|
||||
);
|
||||
|
||||
this.moveCardToElement(characterId, this.assignmentDialog);
|
||||
this.assignDialogResized();
|
||||
|
||||
@@ -112,15 +112,15 @@ var NormalCardGroup = CardGroup.extend({
|
||||
init: function(text, container, belongTest) {
|
||||
this._super(container, belongTest);
|
||||
if (text != null) {
|
||||
this.descDiv = $("<div>" + text + "</div>");
|
||||
this.descDiv = $("<div class='ui-widget-content'></div>");
|
||||
$("#main").append(this.descDiv);
|
||||
}
|
||||
},
|
||||
|
||||
setBounds: function(x, y, width, height) {
|
||||
this._super(x, y, width, height);
|
||||
this._super(x + 3, y + 3, width - 6, height - 6);
|
||||
if (this.descDiv != null)
|
||||
this.descDiv.css({left:x + "px", top:y + "px", width: width, height: height, "background-color":"#ffffff", position: "absolute", "text-align": "center"});
|
||||
this.descDiv.css({left:x + "px", top:y + "px", width: width, height: height, "background-color":"#ffffff", "border-radius":"7px", position: "absolute", "text-align": "center"});
|
||||
},
|
||||
|
||||
layoutCards: function() {
|
||||
|
||||
Reference in New Issue
Block a user