From 818aa8599a492bf483dac89d4f60db61b4d61542 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 4 Sep 2020 10:40:21 +0200 Subject: [PATCH] Update UiObject.js --- FloatingSpace/UiObject.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/FloatingSpace/UiObject.js b/FloatingSpace/UiObject.js index f3b1885dd..d67d14733 100644 --- a/FloatingSpace/UiObject.js +++ b/FloatingSpace/UiObject.js @@ -1551,23 +1551,23 @@ function newUiObject() { function drawErrorMessage() { if (thisObject.hasError === false) { return } - drawMessage(errorMessage) + drawMessage(errorMessage, UI_COLOR.RUSTED_RED) } function drawWarningMessage() { if (thisObject.hasError === true) { return } if (thisObject.hasWarning !== true) { return } - drawMessage(warningMessage) + drawMessage(warningMessage, UI_COLOR.TITANIUM_YELLOW) } function drawInfoMessage() { if (thisObject.hasError === true) { return } if (thisObject.hasWarning === true) { return } if (thisObject.hasInfo !== true) { return } - drawMessage(infoMessage) + drawMessage(infoMessage, UI_COLOR.TURQUOISE) } - function drawMessage(message) { + function drawMessage(message, textColor) { if (canvas.floatingSpace.inMapMode === true) { return @@ -1603,11 +1603,12 @@ function newUiObject() { labelPoint = { x: position.x - label.length / 2 * fontSize * FONT_ASPECT_RATIO - 5, - y: position.y + radius * 2 / 5 + fontSize * FONT_ASPECT_RATIO + 15 + y: position.y + radius * 2 / 5 + fontSize * FONT_ASPECT_RATIO + 25 } browserCanvasContext.font = fontSize + 'px ' + UI_FONT.PRIMARY - browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.TITANIUM_YELLOW + ', 1)' + + browserCanvasContext.fillStyle = 'rgba(' + textColor + ', 1)' browserCanvasContext.fillText(label, labelPoint.x, labelPoint.y) } }