Skip to content

Commit 17efbd0

Browse files
committed
local -> 0
1 parent 5b01652 commit 17efbd0

8 files changed

+127
-8
lines changed

Untitled

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* Header css file */
2+
3+
#header-container {
4+
height: 100px;
5+
background-color: #333;
6+
color: white;
7+
}

css/controllers.css

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
position: absolute;
1919
left: 10px;
2020
top: 5px;
21-
2221
}
2322

2423
.front {

css/settings.css

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#settings-container {
2+
width: 100%;
3+
height: 100%;
4+
margin-top: 50px;
5+
}
6+
7+
#settings-inner-container {
8+
width: 400px;
9+
margin: 0 auto;
10+
border: 1px solid white;
11+
padding: 15px;
12+
margin-right: auto;
13+
background-color: rgba(255, 255, 255, 0.1);
14+
border: 1px solid rgba(255, 255, 255, 0.3);
15+
border-radius: 1px;
16+
text-align: center;
17+
color: white;
18+
padding: 15px;
19+
font-size: 35px;
20+
font-weight: 700;
21+
box-shadow: 0px 0px 60px 0px rgba(0,0,0, 0.4);
22+
}
23+
24+
#settings-title {
25+
width:100%;
26+
text-align: center;
27+
margin-bottom: 15px;
28+
font-size: 22px;
29+
color: white;
30+
}
31+
32+
#settings-content {
33+
color: white;
34+
}
35+
36+
.settings-row {
37+
margin: 10px 0;
38+
height: 40px;
39+
width: 100%;
40+
z-index: 10;
41+
font-size: 16px;
42+
font-weight: normal;
43+
}
44+
45+
.settings-row-label {
46+
float: left;
47+
color: white;
48+
}
49+
50+
.settings-row-setting {
51+
float: right;
52+
font-weight: normal;
53+
}

css/slotmachine.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
height: 100px;
44
padding: 0px 0px 0px;
55
margin: 0 auto;
6-
border: 5px solid rgba(0, 13, 29, 0.9);
6+
border: px solid rgba(0, 13, 29, 0.9);
77
border-radius: 10px;
88
-webkit-transition: all ease 1s;
99
-moz-transition: all ease 1s;

include/controllers.html

+17-4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
<div id="btn-join-game" class="button">
3535
Join Multiplayer Game
3636
</div>
37+
<div id="btn-settings" class="button">
38+
Multiplayer Settings
39+
</div>
3740
</div>
3841
<div id="btn-join-container">
3942
<div id='btn-join-popup' class='button'>
@@ -71,13 +74,23 @@
7174
</div>
7275
<div id="status-create-game">
7376
</div>
74-
<script src="js/virtualJoystick.js"></script>
77+
<script src="js/virtualJoystick.js"></script>
7578
<script src="js/nipplejs.min.js"></script>
7679
<script src="js/slotmachine.js"></script>
77-
80+
81+
<script>
82+
$('#btn-settings').on('click', function() {
83+
$('#main').html(' ').promise().done(function() {
84+
var time = new Date();
85+
var e = time.getTime();
86+
$('#main').load('include/settings.html?' + e);
87+
});
88+
});
89+
</script>
90+
7891
<!-- Include demo version of the car controllers -->
7992
<script>
80-
var time = new Date();
81-
var e = time.getTime();
93+
var time = new Date();
94+
var e = time.getTime();
8295
$.getScript( "js/demo.js?t=" + e);
8396
</script>

include/settings.html

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<div id="settings-container">
2+
<div id="settings-inner-container">
3+
<div id="settings-title">
4+
Settings
5+
</div>
6+
<div id="settings-content">
7+
<div class="settings-row">
8+
<div class="settings-row-label">
9+
Time from create to start
10+
</div>
11+
<div class="settings-row-setting">
12+
<div id="settings-timeToJoin" class="settings-contenteditable" contenteditable="true">
13+
</div>
14+
</div>
15+
</div>
16+
<div class="settings-row">
17+
<div class="settings-row-label">
18+
Setting 2
19+
</div>
20+
<div class="settings-row-setting">
21+
Box
22+
</div>
23+
</div>
24+
<div class="settings-row">
25+
<div class="settings-row-label">
26+
Setting 3
27+
</div>
28+
<div class="settings-row-setting">
29+
Box
30+
</div>
31+
</div>
32+
<div class="settings-row">
33+
<div class="settings-row-label">
34+
Setting 4
35+
</div>
36+
<div class="settings-row-setting">
37+
Box
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
</div>

index.html

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<script type="text/javascript" src="js/jquery.mobile-events.js"></script>
1010
<script src="js/gatt.js"></script>
1111
<script src="js/setBit.js"></script>
12-
<link rel="stylesheet" type="text/css" href="css/slotmachine.css"></link>
12+
<link rel="stylesheet" type="text/css" href="css/slotmachine.css"></link>
1313
<link rel="stylesheet" type="text/css" href="css/stylesheet.css?"></link>
1414
<link rel="stylesheet" type="text/css" href="css/controllers.css"></link>
1515

@@ -101,6 +101,11 @@ <h2 onclick="disconnect();" id='disconnect'class="button">About</h2>
101101
toggleFullscreen();
102102
});
103103

104+
(function() {
105+
var time = new Date();
106+
var e = time.getTime();
107+
$('head').append('<link rel="stylesheet" href="css/settings.css?' + e + '" type="text/css" />');
108+
})();
104109

105110

106111
</script>

js/demo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var allowJoin = true;
4242
var vibratePossible = "vibrate" in navigator;
4343

4444
//** For local testing, set local to 1 to avoid Web Bluetooth errors
45-
var local = 1;
45+
var local = 0;
4646

4747

4848
//**

0 commit comments

Comments
 (0)