From bda9a9af0974b3f5bbbb640c5bf5ab04921fd449 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 10 Feb 2020 13:04:10 +0100 Subject: [PATCH] More fixes and improvement at flash screen --- Canvas.js | 13 ++++--------- SplashScreen.js | 15 ++++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/Canvas.js b/Canvas.js index e42ba92c4..f0920a50f 100644 --- a/Canvas.js +++ b/Canvas.js @@ -267,27 +267,22 @@ function newCanvas () { } } - if (event.altKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') { + if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') { thisObject.cockpitSpace.toTop() return } - if (event.altKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') { + if ((event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') { thisObject.cockpitSpace.toBottom() return } - if (event.altKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowLeft' || event.altKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowRight') { - thisObject.cockpitSpace.toMiddle() - return - } - - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowUp') { + if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowLeft') { thisObject.cockpitSpace.moveUp() return } - if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowDown') { + if (event.shiftKey === true && (event.ctrlKey === true || event.metaKey === true) && event.code === 'ArrowRight') { thisObject.cockpitSpace.moveDown() return } diff --git a/SplashScreen.js b/SplashScreen.js index 1fa6b751f..b81e8352a 100644 --- a/SplashScreen.js +++ b/SplashScreen.js @@ -71,12 +71,9 @@ function newSplashScreen () { /* Set the background. */ browserCanvasContext.beginPath() - browserCanvasContext.rect(0, 0, thisObject.container.frame.width, thisObject.container.frame.height) browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.WHITE + ', ' + opacity + ')' - browserCanvasContext.closePath() - browserCanvasContext.fill() if (canDrawLogo === false) { return } @@ -100,18 +97,18 @@ function newSplashScreen () { /* Second the % of Advance. */ let label = '' + Math.trunc(stepsInitializationCounter) + ' %' - stepsInitializationCounter = stepsInitializationCounter + 5.0 + stepsInitializationCounter = stepsInitializationCounter + 2.0 if (stepsInitializationCounter > 99) { splashScreenNeeded = false stepsInitializationCounter = 99 } - let fontSize = 10 + let fontSize = 15 let labelPoint = { - x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 25, - y: thisObject.container.frame.height / 2 + fontSize / 2 + fontSize * 0.1 + 80 + yDisplacement + x: thisObject.container.frame.width / 2 - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 22, + y: thisObject.container.frame.height / 2 + fontSize / 2 + fontSize * 0.1 + 90 + yDisplacement } browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY @@ -123,13 +120,13 @@ function newSplashScreen () { /* Algo Bots Competitions Sub Title */ - fontSize = 15 + fontSize = 35 title = 'Beta' titlePoint = { x: thisObject.container.frame.width / 2 - title.length / 2 * fontSize * FONT_ASPECT_RATIO - 20, - y: thisObject.container.frame.height / 2 - fontSize * 2 + 80 + yDisplacement + y: thisObject.container.frame.height / 2 + 70 + yDisplacement } browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY