added objection button and some new buzzers

This commit is contained in:
Samuel Kent
2023-01-05 22:40:58 +11:00
parent 3bcc2710c9
commit c8db4aef17
20 changed files with 132 additions and 5 deletions
+20 -2
View File
@@ -38,7 +38,19 @@
});
$("#unregisterUsers").click(function() {
socket.emit("unregisterUsers", 2);
socket.emit("unregisterUsers");
});
socket.on("objectionToClient", (userName) => {
objectionToClient(userName);
$("#objection").append("<button id='clearObjection' type='button' style='height: 30px;'>Clear Objections</button>");
$("#clearObjection").click(function() {
socket.emit("clearObjectionToServer");
});
});
socket.on("clearObjectionToClient", () => {
clearObjectionToClient();
});
});
</script>
@@ -56,9 +68,15 @@
<p style="font-size: 11px; margin: 5px;">(all points buttons clear buzzers)</p>
<!-- <br> -->
<p id="firstBuzz"></p>
<br><br><br>
<p id="objection">
</p>
<br>
<br>
<br>
<br>
<button id="unregisterUsers" type="button" style="height: 30px;">Remove all players</button>
<!-- <input type="text" id="bufferInput" placeholder="Buffer"> -->
</div>
<div id="userListPanel">
<div id="PlayersList">
+32 -1
View File
@@ -17,7 +17,7 @@
$("#message").html("hi "+userName+" :]")
let teamName = queryString.searchParams.get("team");
let buzzerOptions = ["Kirbeep","MPYosh","MPDog","MPCat","EBWow","Ooh","MarioBoing","TheNumberEight","EBAttack1","SaturnHonk","PuffRest","AAHoldIt","EmergencyMeeting","Mystery"];
let buzzerOptions = ["Kirbeep","MPYosh","MPDog","MPCat","EBWow","EBAttack1","Ooh","TheNumberEight","MarioBoing","MarioCoin","SaturnHonk","PuffRest","AAHoldIt","EmergencyMeeting","PikminThrow","MGSAlert","FF9Moogle","Mystery"];
buzzerOptions.forEach((buzzerId) => {
$("#buzzerOptions").append("<img id='"+buzzerId+"' src='"+buzzerId+".png'>");
});
@@ -86,6 +86,26 @@
$("#buzzer").attr("src", buzzerId+".png" );
buzzerSound.play();
});
$("#contestAnswer").find("img").mousedown(function() {
socket.emit("objectionToServer", userName);
});
$("#contestAnswer").find("img").hover(
function() {
$(this).attr("src", "AAEvidence.gif");
}, function() {
$(this).attr("src", "AAEvidence.png");
}
);
socket.on("objectionToClient", (userName) => {
objectionToClient(userName);
});
socket.on("clearObjectionToClient", () => {
clearObjectionToClient();
});
});
</script>
</head>
@@ -99,6 +119,8 @@
<img id="buzzer" alt="The buzzer">
<br>
<p id="firstBuzz"></p>
<div id="objection">
</div>
</div>
<div id="userListPanel">
<div id="PlayersList">
@@ -112,5 +134,14 @@
</div>
<div id="buzzerOptions">
</div>
<div id="contestAnswer">
<img src="AAEvidence.png" >
<p>
Click to contest an answer marked incorrectly.
<br>
(please use sparingly)
</p>
<div>
</body>
</html>