Merge pull request #24 from nheinbaugh/nickh/refactor-game
Final Pieces of initial Pass
This commit is contained in:
@@ -1,141 +0,0 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Gemp-LotR</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<meta http-equiv="pragma" content="no-cache"/>
|
||||
<meta http-equiv="Cache-Control" content="no-cache"/>
|
||||
<meta http-equiv="Expires" content="-1">
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
font-size: 12px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.panel {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.card {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.card .img {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.card .click {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.card .border {
|
||||
position: absolute;
|
||||
border: solid #000000;
|
||||
}
|
||||
|
||||
.card .count {
|
||||
position: absolute;
|
||||
font-weight: bolder;
|
||||
display: table-cell;
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.deckPart {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="css/dark-hive/jquery-ui-1.8.16.custom.css">
|
||||
<link rel="stylesheet" type="text/css" href="js/jquery/styles/jquery.spinnercontrol.css">
|
||||
|
||||
<script type="text/javascript" src="js/jquery/jquery-1.6.2.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery-ui-1.8.16.custom.min.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.cookie.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.layout.js"></script>
|
||||
<script type="text/javascript" src="js/jquery/jquery.touchSwipe.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/gemp-022/inheritance.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/common.js"></script>
|
||||
|
||||
<script type="text/javascript" src="/generic-tcg/js/CardContainer.js"></script>
|
||||
<script type="text/javascript" src="/generic-tcg/js/CardGroup.js"></script>
|
||||
<script type="text/javascript" src="/generic-tcg/js/RowCardLayoutCardGroup.js"></script>
|
||||
<script type="text/javascript" src="/generic-tcg/js/AttachedCardsLayoutCardGroup.js"></script>
|
||||
<script type="text/javascript" src="/generic-tcg/js/jquery/jquery-sizes.js"></script>
|
||||
|
||||
<script type="text/javascript" src="js/gemp-022/communication.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/logging.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/commonUi.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/jCards.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/cardFilter2.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/DeckPanel.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/CardInformationDialog.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/deckBuildingUi2.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var ui = new GempLotrDeckBuildingUI2(
|
||||
$("#collectionFilterDiv"),
|
||||
$("#paging"),
|
||||
$("#collectionContents"),
|
||||
$("#deckDiv")
|
||||
);
|
||||
|
||||
var doLayout = function() {
|
||||
log("deckBuild2.html::doLayout");
|
||||
var collectionWidth = $("#collectionDiv").width();
|
||||
var collectionHeight = $("#collectionDiv").height();
|
||||
var deckWidth = $("#deckPanel").width();
|
||||
var deckHeight = $("#deckPanel").height();
|
||||
ui.layoutUI(collectionWidth, collectionHeight, deckWidth, deckHeight);
|
||||
};
|
||||
|
||||
$('body').layout({
|
||||
applyDefaultStyles:true,
|
||||
onresize:function () {
|
||||
doLayout();
|
||||
},
|
||||
north__minSize: 230
|
||||
});
|
||||
|
||||
$("#northPanel").layout({
|
||||
applyDefaultStyles:true,
|
||||
onresize:function() {
|
||||
doLayout();
|
||||
},
|
||||
west__minSize: 305
|
||||
|
||||
});
|
||||
|
||||
$(".ui-layout-pane").css({"background-color":"#000000"});
|
||||
|
||||
$(window).resize(function () {
|
||||
doLayout();
|
||||
});
|
||||
|
||||
doLayout();
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id='northPanel' class="ui-layout-north panel" style="padding: 0;">
|
||||
<div id="collectionFilterDiv" class="ui-layout-west panel"></div>
|
||||
<div id="collectionDiv" class="ui-layout-center panel">
|
||||
<div id="paging"></div>
|
||||
<div id="collectionContents" class="ui-widget-content" style="position: relative"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="deckPanel" class="ui-layout-center panel">
|
||||
<div id="deckDiv" class="ui-widget-content">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -49,36 +49,12 @@
|
||||
<script type="text/javascript" src="js/gemp-022/merchantUi.js"></script>
|
||||
|
||||
<!-- Audio file downloaded from https://material.io/design/sound/sound-resources.html -->
|
||||
<audio id="awaitAction" src="/gemp-lotr/awaiting_decision.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
var ui;
|
||||
var communication;
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var replay = getUrlParam("replayId");
|
||||
|
||||
ui = new GempLotrGameUI("/gemp-lotr-server", replay != null);
|
||||
|
||||
$(window).resize(function () {
|
||||
ui.windowResized();
|
||||
});
|
||||
|
||||
ui.layoutUI(true);
|
||||
|
||||
if (replay == null)
|
||||
ui.startGameSession();
|
||||
else
|
||||
ui.startReplaySession(replay);
|
||||
});
|
||||
</script>
|
||||
<audio id="awaitAction" src="/gemp-lotr/src/assets/awaiting_decision.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="src/Game/index.css">
|
||||
<script type="text/javascript" src="src/Game/game.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="main"
|
||||
style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #000000; overflow: hidden">
|
||||
</div>
|
||||
<div id="main"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
<script type="text/javascript" src="js/lib/json2html/json2html.js"></script>
|
||||
|
||||
<audio id="gamestart" src="/gemp-lotr/fanfare_x.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
<audio id="gamestart" src="/gemp-lotr/src/assets/fanfare_x.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="src/Hall/index.css">
|
||||
<script type="" src="src/Hall/GameHall.js"></script>
|
||||
|
||||
@@ -48,40 +48,13 @@
|
||||
<script type="text/javascript" src="js/gemp-022/gameAnimations.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/merchantUi.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
<link rel="stylesheet" type="text/css" href="src/Merchant/index.css">
|
||||
<script type="text/javascript" src="src/Merchant/merchant.js"></script>
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var ui = new GempLotrMerchantUI($("#cardList"), $("#cardFilter"));
|
||||
|
||||
$(window).resize(function () {
|
||||
layoutUi(ui);
|
||||
});
|
||||
|
||||
layoutUi(ui);
|
||||
});
|
||||
|
||||
function layoutUi(ui) {
|
||||
var width = $(window).width();
|
||||
var height = $(window).height();
|
||||
if (width < 800)
|
||||
width = 800;
|
||||
if (height < 400)
|
||||
height = 400;
|
||||
|
||||
var padding = 5;
|
||||
var filterHeight = 160;
|
||||
|
||||
$("#cardFilter").css({position:"absolute", left:padding, top:padding, width:width - padding * 2, height:filterHeight});
|
||||
$("#cardList").css({position:"absolute", left:padding, top:2 * padding + filterHeight, width:width - padding * 2, height:height - filterHeight - padding * 3});
|
||||
ui.layoutUI();
|
||||
}
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="main"
|
||||
style="position: absolute; left: 0; top: 0; width: 100%; height: 100%; background-color: #000000; overflow: hidden">
|
||||
<div id="main">
|
||||
<div id="cardFilter"></div>
|
||||
<div id="cardList"></div>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<title>GEMP: LotR-TCG - Draft</title>
|
||||
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="images/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="images/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="images/icons/favicon-16x16.png">
|
||||
@@ -49,39 +50,19 @@
|
||||
<script type="text/javascript" src="js/gemp-022/merchantUi.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/soloDraftUi.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var ui = new GempLotrSoloDraftUI();
|
||||
|
||||
$('body').layout({
|
||||
applyDefaultStyles:true,
|
||||
onresize:function () {
|
||||
ui.layoutUI(true);
|
||||
},
|
||||
north__minSize:"30%"
|
||||
});
|
||||
|
||||
$(".ui-layout-pane").css({"background-color":"#000000"});
|
||||
|
||||
$(window).resize(function () {
|
||||
ui.layoutUI(true);
|
||||
});
|
||||
|
||||
ui.layoutUI(true);
|
||||
});
|
||||
</script>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="src/SoloDraft/index.css">
|
||||
<script type="text/javascript" src="src/SoloDraft/soloDraft.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="topDiv" class="ui-layout-north">
|
||||
<div id="messageDiv"></div>
|
||||
<div id="picksDiv"></div>
|
||||
</div>
|
||||
<div id="bottomDiv" class="ui-layout-center">
|
||||
<div id="draftedDiv"></div>
|
||||
</div>
|
||||
<div id="topDiv" class="ui-layout-north">
|
||||
<div id="messageDiv"></div>
|
||||
<div id="picksDiv"></div>
|
||||
</div>
|
||||
<div id="bottomDiv" class="ui-layout-center">
|
||||
<div id="draftedDiv"></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
||||
20
gemp-lotr/gemp-lotr-async/src/main/web/src/Game/game.js
Normal file
20
gemp-lotr/gemp-lotr-async/src/main/web/src/Game/game.js
Normal file
@@ -0,0 +1,20 @@
|
||||
var ui;
|
||||
var communication;
|
||||
|
||||
$(document).ready(
|
||||
function () {
|
||||
var replay = getUrlParam("replayId");
|
||||
|
||||
ui = new GempLotrGameUI("/gemp-lotr-server", replay != null);
|
||||
|
||||
$(window).resize(function () {
|
||||
ui.windowResized();
|
||||
});
|
||||
|
||||
ui.layoutUI(true);
|
||||
|
||||
if (replay == null)
|
||||
ui.startGameSession();
|
||||
else
|
||||
ui.startReplaySession(replay);
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
#main {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
#main {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
overflow: hidden
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
$(document).ready(
|
||||
function () {
|
||||
var ui = new GempLotrMerchantUI($("#cardList"), $("#cardFilter"));
|
||||
|
||||
$(window).resize(function () {
|
||||
layoutUi(ui);
|
||||
});
|
||||
|
||||
layoutUi(ui);
|
||||
});
|
||||
|
||||
function layoutUi(ui) {
|
||||
var width = $(window).width();
|
||||
var height = $(window).height();
|
||||
if (width < 800)
|
||||
width = 800;
|
||||
if (height < 400)
|
||||
height = 400;
|
||||
|
||||
var padding = 5;
|
||||
var filterHeight = 160;
|
||||
|
||||
$("#cardFilter").css({position:"absolute", left:padding, top:padding, width:width - padding * 2, height:filterHeight});
|
||||
$("#cardList").css({position:"absolute", left:padding, top:2 * padding + filterHeight, width:width - padding * 2, height:height - filterHeight - padding * 3});
|
||||
ui.layoutUI();
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
$(document).ready(
|
||||
function () {
|
||||
var ui = new GempLotrSoloDraftUI();
|
||||
|
||||
$('body').layout({
|
||||
applyDefaultStyles:true,
|
||||
onresize:function () {
|
||||
ui.layoutUI(true);
|
||||
},
|
||||
north__minSize:"30%"
|
||||
});
|
||||
|
||||
$(".ui-layout-pane").css({"background-color":"#000000"});
|
||||
|
||||
$(window).resize(function () {
|
||||
ui.layoutUI(true);
|
||||
});
|
||||
|
||||
ui.layoutUI(true);
|
||||
});
|
||||
Reference in New Issue
Block a user