diff --git a/assets/sounds/scratch_in.mp3 b/assets/sounds/scratch_in.mp3 new file mode 100644 index 0000000..f8c9b42 Binary files /dev/null and b/assets/sounds/scratch_in.mp3 differ diff --git a/assets/sounds/scratch_out.mp3 b/assets/sounds/scratch_out.mp3 new file mode 100644 index 0000000..e55b17a Binary files /dev/null and b/assets/sounds/scratch_out.mp3 differ diff --git a/css/slides.css b/css/slides.css index 453f461..b5f0676 100644 --- a/css/slides.css +++ b/css/slides.css @@ -97,6 +97,9 @@ body{ -moz-user-select: none; /* Firefox all */ -ms-user-select: none; /* IE 10+ */ user-select: none; + + transform-origin: 97.5px 27.5px; + transition: transform 0.1s ease-out; } .button #background{ position: absolute; @@ -130,6 +133,7 @@ body{ } .button[hover=yes]{ z-index: 100; + transform: scale(1.02, 1.02); } .button[hover=yes] #background{ background-position: 0px -125px !important; @@ -143,6 +147,9 @@ body{ .button[deactivated=yes] #hitbox{ display: none; } +.button[size=short]{ + transform-origin: 57.5px 27.5px; +} .button[size=short] #background{ background: url(../assets/ui/button_short.png); background-size: 100%; @@ -154,6 +161,9 @@ body{ .button[size=short] #hitbox{ width:115px; } +.button[size=long]{ + transform-origin: 172.5px 27.5px; +} .button[size=long] #background{ background: url(../assets/ui/button_long.png); background-size: 100%; @@ -166,6 +176,9 @@ body{ .button[size=long] #hitbox{ width:345px; } +.button:active{ + transform: scale(0.95, 0.95); +} /*************************/ diff --git a/index.html b/index.html index 11f3e22..2450d99 100644 --- a/index.html +++ b/index.html @@ -25,6 +25,7 @@ + diff --git a/js/core/Scratcher.js b/js/core/Scratcher.js index d071709..8caa840 100644 --- a/js/core/Scratcher.js +++ b/js/core/Scratcher.js @@ -1,3 +1,8 @@ +Loader.addToManifest(Loader.manifest,{ + scratch_in: "assets/sounds/scratch_in.mp3", + scratch_out: "assets/sounds/scratch_out.mp3" +}); + (function(exports){ var Scratcher = {}; @@ -41,6 +46,7 @@ subscribe("slideshow/scratch", Scratcher.scratch); Scratcher.scratchAnim = function(scratchIn){ + var dom = $("#scratcher"); var deferred = Q.defer(); var frame = 0; @@ -53,7 +59,14 @@ Scratcher.scratchAnim = function(scratchIn){ Scratcher.gotoFrame(scratchIn, frame); } },40); + + setTimeout(function(){ + var sound = scratchIn ? Loader.sounds.scratch_in : Loader.sounds.scratch_out; + sound.volume(0.7).play(); + },100); + return deferred.promise; + }; Scratcher.gotoFrame = function(scratchIn, frame){ var dom = $("#scratcher"); diff --git a/js/sims/Tournament.js b/js/sims/Tournament.js index af92d7f..4b5c04e 100644 --- a/js/sims/Tournament.js +++ b/js/sims/Tournament.js @@ -379,6 +379,7 @@ function Tournament(config){ // TODO: KILL ALL LISTENERS, TOO. // TODO: Don't screw up when paused or looking at new tab self.remove = function(INSTANT){ + _stopAutoPlay(); for(var i=0; i