summaryrefslogtreecommitdiff
path: root/webcards/client.html
diff options
context:
space:
mode:
authorKyle Gunger <corechg@gmail.com>2020-04-03 16:44:23 -0400
committerKyle Gunger <corechg@gmail.com>2020-04-03 16:44:23 -0400
commit1697da112a9b9f529fad2f54c62aecd7bbb614e6 (patch)
tree68c7cd383107e824953b6aa213d05d9a6842b73f /webcards/client.html
parent3040a822085adeb9025ddc1a4573cf37cb37d377 (diff)
[WEBCARDS] Update some webcards stuff
Diffstat (limited to 'webcards/client.html')
-rw-r--r--webcards/client.html82
1 files changed, 64 insertions, 18 deletions
diff --git a/webcards/client.html b/webcards/client.html
index 70d7f1d..0b06712 100644
--- a/webcards/client.html
+++ b/webcards/client.html
@@ -8,37 +8,54 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles/icofont.css">
+ <link rel="stylesheet" type="text/css" href="styles/input.css">
+
<link rel="stylesheet" type="text/css" href="styles/client/base.css">
<link rel="stylesheet" type="text/css" href="styles/client/desktop.css">
<link rel="stylesheet" type="text/css" href="styles/client/tablet.css">
<link rel="stylesheet" type="text/css" href="styles/client/mobile.css">
-
- <!--<script src="scripts/libs/discord-rpc.js"></script>-->
- <script src="scripts/client/message.js"></script>
- <script src="scripts/client/sock.js"></script>
- <script src="scripts/client/lobby.js"></script>
- <script src="scripts/client/table.js"></script>
- <script src="scripts/client/client.js"></script>
+ <link rel="stylesheet" type="text/css" href="styles/client/card.css">
+
+ <link rel="icon" sizes="32x32" href="images/wc-icon-32.png">
+ <link rel="icon" sizes="48x48" href="images/wc-icon-48.png">
+ <link rel="icon" sizes="96x96" href="images/wc-icon-96.png">
+ <link rel="icon" sizes="144x144" href="images/wc-icon-144.png">
+ <link rel="icon" sizes="288x288" href="images/wc-icon-288.png">
+
+ <script src="scripts/cards/card.js"></script>
+ <script src="scripts/cards/deck.js"></script>
+ <script src="scripts/cards/drag.js"></script>
+
+ <script src="scripts/gui/input.js"></script>
+ <script src="scripts/gui/lobby.js"></script>
+ <script src="scripts/gui/table.js"></script>
+
+ <script src="scripts/socket/message.js"></script>
+ <script src="scripts/socket/sock.js"></script>
+
+ <script src="scripts/client.js"></script>
+
+ <title>WebCards - Client</title>
</head>
<body>
- <div class="table" style="visibility: hidden;">
+ <div class="table" state="closed">
</div>
<div class="topbar" style="height: auto;">
<div class="top-buttons">
- <button id="newgame" class="top-button" onclick="game.lob.newGameScreen()"></button>
- <button id="settings" class="top-button" onclick="game.lob.mobileSettingsScreen()"></button>
+ <button id="newgame" class="top-button" onclick="game.lob.newGame()"></button>
+ <button id="settings" class="top-button" onclick="game.lob.mobileSettings()"></button>
<button id="reset" class="top-button" onclick="game.reset()"></button>
</div>
<div class="new-game" style="display: none;"></div>
- <div class="mobile-settings" style="display: none;">
- <span><input type="text" id="name" placeholder="Username"/></span>
- <span><input type="color" id="usercolor" value="#f00"/></span>
+ <div class="settings mobile-settings" style="display: none;">
+ <span><input type="text" placeholder="Username"/></span>
+ <span><input type="color" value="#f00"/></span>
<button id="set">Accept Settings</button>
</div>
@@ -82,11 +99,10 @@
</div>
</div>
- <div class="settings">
- <span><input type="text" id="name" placeholder="Username"/></span>
- <span><input type="color" id="usercolor" value="#f00"/></span>
-
- <button onclick="game.acceptSettings()">Accept Settings</button>
+ <div class="settings" >
+ <div class="input-container" type="color" onclick="this.getElementsByTagName('input')[0].click()">
+ <input type="color">
+ </div>
</div>
</div>
</div>
@@ -96,6 +112,36 @@
var params = new URLSearchParams((new URL(window.location)).search);
var game = new Client(params.get("s"), params.get("g"));
setTimeout(game.init.bind(game), 100);
+
+
+ // Live testing purposes only
+ var d = new MultiDrag();
+ var c1 = new Card({
+ all: [
+ {
+ type: "image",
+ image: "assets/standard/diamond.svg"
+ }
+ ]
+ });
+ var c2 = new Card({
+ all: [
+ {
+ type: "image",
+ image: "assets/standard/heart.svg"
+ }
+ ]
+ });
+ function test() {
+ c1.e.addEventListener("mousedown", d.startDragging.bind(d));
+ c1.e.addEventListener("mouseup", d.stopDraggingAll.bind(d));
+ c2.e.addEventListener("mousedown", d.startDragging.bind(d));
+ c2.e.addEventListener("mouseup", d.stopDraggingAll.bind(d));
+
+ game.tab.root.append(c1.e);
+ game.tab.root.append(c2.e);
+ game.tab.openTable();
+ }
</script>
</body>