From d3d2d88586b2c817da94820d3bd6e1590d353077 Mon Sep 17 00:00:00 2001 From: "marcins78@gmail.com" Date: Tue, 6 Sep 2011 19:38:22 +0000 Subject: [PATCH] Working on Look of the Game UI. --- .../lotro/game/LotroCardBlueprintLibrary.java | 2 +- .../gemp-lotr-web/src/main/webapp/game.html | 2 +- .../src/main/webapp/js/gameUi.js | 111 +++++++++--------- .../src/main/webapp/js/jCardGroup.js | 6 +- 4 files changed, 61 insertions(+), 60 deletions(-) diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/LotroCardBlueprintLibrary.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/LotroCardBlueprintLibrary.java index 03ddff5e7..6588a80d0 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/LotroCardBlueprintLibrary.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/game/LotroCardBlueprintLibrary.java @@ -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 _blueprintMap = new HashMap(); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html index 74707c88f..b57331187 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/game.html @@ -133,7 +133,7 @@ -
+
diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js index 29eaa110d..3b0684e10 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/gameUi.js @@ -95,6 +95,7 @@ var GempLotrGameUI = Class.extend({ this.specialGroup.setBounds(this.padding, this.padding, 400, 200); this.gameStateElem = $("
"); + this.gameStateElem.css({"border-radius": "7px", "background-color": "#ffffff"}); this.gameStateElem.append("Players:
"); for (var i = 0; i < this.allPlayerIds.length; i++) @@ -153,52 +154,52 @@ var GempLotrGameUI = Class.extend({ initializeDialogs: function() { this.dialogInstance = $("
") .dialog({ - autoOpen: false, - closeOnEscape: false, - resizable: false, - minHeight: 80 - }); + autoOpen: false, + closeOnEscape: false, + resizable: false, + minHeight: 80 + }); this.assignmentDialog = $("
") .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 = $("
") .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 = $("
") .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 + "
") .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(); diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js index 5b14dacf0..ce191bc79 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/js/jCardGroup.js @@ -112,15 +112,15 @@ var NormalCardGroup = CardGroup.extend({ init: function(text, container, belongTest) { this._super(container, belongTest); if (text != null) { - this.descDiv = $("
" + text + "
"); + this.descDiv = $("
"); $("#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() {