Commit 86026521 authored by edwardjung's avatar edwardjung Committed by Commit bot

+ Fix cloud sprite clipping on 2x

+ Fix clipped button highlight
+ Tweaked the text sprite to correct the poor font rendering.
+ Fix to prevent keyboard 'details' link to cause activation.

BUG=418075,417956,418494

Review URL: https://codereview.chromium.org/609853002

Cr-Commit-Position: refs/heads/master@{#297452}
parent e1c3d014
...@@ -66,11 +66,6 @@ a { ...@@ -66,11 +66,6 @@ a {
margin: 20px; margin: 20px;
} }
#help-box-outer {
-webkit-transition: height ease-in 218ms;
overflow: hidden;
}
#help-box-inner { #help-box-inner {
background-color: #f9f9f9; background-color: #f9f9f9;
border-top: 1px solid #EEE; border-top: 1px solid #EEE;
......
...@@ -19,6 +19,7 @@ function Runner(outerContainerId, opt_config) { ...@@ -19,6 +19,7 @@ function Runner(outerContainerId, opt_config) {
this.outerContainerEl = document.querySelector(outerContainerId); this.outerContainerEl = document.querySelector(outerContainerId);
this.containerEl = null; this.containerEl = null;
this.detailsButton = this.outerContainerEl.querySelector('#details-button');
this.config = opt_config || Runner.config; this.config = opt_config || Runner.config;
...@@ -578,22 +579,24 @@ Runner.prototype = { ...@@ -578,22 +579,24 @@ Runner.prototype = {
* @param {Event} e * @param {Event} e
*/ */
onKeyDown: function(e) { onKeyDown: function(e) {
if (!this.crashed && (Runner.keycodes.JUMP[String(e.keyCode)] || if (e.target != this.detailsButton) {
e.type == Runner.events.TOUCHSTART)) { if (!this.crashed && (Runner.keycodes.JUMP[String(e.keyCode)] ||
if (!this.activated) { e.type == Runner.events.TOUCHSTART)) {
this.loadSounds(); if (!this.activated) {
this.activated = true; this.loadSounds();
} this.activated = true;
}
if (!this.tRex.jumping) { if (!this.tRex.jumping) {
this.playSound(this.soundFx.BUTTON_PRESS); this.playSound(this.soundFx.BUTTON_PRESS);
this.tRex.startJump(); this.tRex.startJump();
}
} }
}
if (this.crashed && e.type == Runner.events.TOUCHSTART && if (this.crashed && e.type == Runner.events.TOUCHSTART &&
e.currentTarget == this.containerEl) { e.currentTarget == this.containerEl) {
this.restart(); this.restart();
}
} }
// Speed drop, activated only when jump key is not pressed. // Speed drop, activated only when jump key is not pressed.
...@@ -1855,7 +1858,7 @@ function Cloud(canvas, cloudImg, containerWidth) { ...@@ -1855,7 +1858,7 @@ function Cloud(canvas, cloudImg, containerWidth) {
* @enum {number} * @enum {number}
*/ */
Cloud.config = { Cloud.config = {
HEIGHT: 13, HEIGHT: 14,
MAX_CLOUD_GAP: 400, MAX_CLOUD_GAP: 400,
MAX_SKY_LEVEL: 30, MAX_SKY_LEVEL: 30,
MIN_CLOUD_GAP: 100, MIN_CLOUD_GAP: 100,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment