added files i forgot to add
This commit is contained in:
@@ -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>
|
||||
|
||||
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();
|
||||
}
|
||||
Reference in New Issue
Block a user