Added the title, description, and disabled button

This commit is contained in:
AliLaptop 2016-06-02 06:56:37 -04:00
parent 533b4a9109
commit 76a813d6dd
3 changed files with 39 additions and 5 deletions

View file

@ -7,8 +7,8 @@ var grayDiamondImage = new Image();
grayDiamondImage.src = "grayDiamond.png"; grayDiamondImage.src = "grayDiamond.png";
//From Server Variables //From Server Variables
var minimumTime = 55; var minimumTime = 59;
var diamondIsAvailable = true; var diamondIsAvailable = false;
var participants = 0; var participants = 0;
var fullPresserProbabilities; var fullPresserProbabilities;
var todaysAggregatePresserProbabilities = []; var todaysAggregatePresserProbabilities = [];
@ -53,6 +53,10 @@ window.onload = function(){
canvasContext = canvas.getContext('2d'); canvasContext = canvas.getContext('2d');
canvasContext.fillStyle = "black"; canvasContext.fillStyle = "black";
//Prevents click-through
var canvas = document.getElementById('buttonCanvas');
canvas.onselectstart = function () { return false; }
//Inner Main Loop //Inner Main Loop
setInterval(function() { setInterval(function() {
main(); main();
@ -188,8 +192,10 @@ function drawButton(){
//Inner Button //Inner Button
canvasContext.fillStyle = "#1A7FB5"; canvasContext.fillStyle = "#1A7FB5";
canvasContext.fillStyle = "#777777";
fillRoundRect(canvasContext,35+10,65+10,190-20,60-20,3); fillRoundRect(canvasContext,35+10,65+10,190-20,60-20,3);
canvasContext.fillStyle = "#2DAAEB"; //canvasContext.fillStyle = "#2DAAEB";
canvasContext.fillStyle = "#AAAAAA";
fillRoundRect(canvasContext,35+10,65+10-buttonDepth,190-20,60-20-buttonDepth,3); fillRoundRect(canvasContext,35+10,65+10-buttonDepth,190-20,60-20-buttonDepth,3);
} }

View file

@ -3,7 +3,7 @@ body {
background-repeat: repeat; background-repeat: repeat;
} }
canvas { canvas {
padding: 10; padding: 20;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
display: block; display: block;
@ -11,7 +11,20 @@ canvas {
height: 170px; height: 170px;
box-shadow: 10px 10px 5px #333333; box-shadow: 10px 10px 5px #333333;
} }
h1{
font-family: "Verdana", serif;
text-align: center;
font-size: 4em;
color: white;
text-shadow: 8px 8px 10px #222222;
}
h3{
font-family: "Verdana", serif;
text-align: center;
font-size: 1.5em;
color: white;
text-shadow: 3px 3px 3px #222222;
}
#buttonDiv { #buttonDiv {
width: 500px width: 500px
height: 170px height: 170px

View file

@ -5,8 +5,23 @@
<HEAD> <HEAD>
<LINK href="custom.css" rel="stylesheet" type="text/css"> <LINK href="custom.css" rel="stylesheet" type="text/css">
</HEAD> </HEAD>
<div id="buttonTitle">
<h1>
The Button Rebirth
</h1>
</div>
<div id="buttonDiv"> <div id="buttonDiv">
<canvas id="buttonCanvas" width="570" height = "170"></canvas> <canvas id="buttonCanvas" width="570" height = "170"></canvas>
<script src="buttonInteractive.js"></script> <script src="buttonInteractive.js"></script>
</div> </div>
<div id="joinus">
<h3>
Join the experiment at
</h3>
<h3>
<a href="https://www.reddit.com/r/thebuttonminecraft">
/r/thebuttonminecraft
</a>
</h3>
</div>
</HTML> </HTML>