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 {
margin: 20px;
}
#help-box-outer {
-webkit-transition: height ease-in 218ms;
overflow: hidden;
}
#help-box-inner {
background-color: #f9f9f9;
border-top: 1px solid #EEE;
......
......@@ -19,6 +19,7 @@ function Runner(outerContainerId, opt_config) {
this.outerContainerEl = document.querySelector(outerContainerId);
this.containerEl = null;
this.detailsButton = this.outerContainerEl.querySelector('#details-button');
this.config = opt_config || Runner.config;
......@@ -578,6 +579,7 @@ Runner.prototype = {
* @param {Event} e
*/
onKeyDown: function(e) {
if (e.target != this.detailsButton) {
if (!this.crashed && (Runner.keycodes.JUMP[String(e.keyCode)] ||
e.type == Runner.events.TOUCHSTART)) {
if (!this.activated) {
......@@ -595,6 +597,7 @@ Runner.prototype = {
e.currentTarget == this.containerEl) {
this.restart();
}
}
// Speed drop, activated only when jump key is not pressed.
if (Runner.keycodes.DUCK[e.keyCode] && this.tRex.jumping) {
......@@ -1855,7 +1858,7 @@ function Cloud(canvas, cloudImg, containerWidth) {
* @enum {number}
*/
Cloud.config = {
HEIGHT: 13,
HEIGHT: 14,
MAX_CLOUD_GAP: 400,
MAX_SKY_LEVEL: 30,
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