From c0d3e08f51e92aab2597f90d3a8d86b918fe50a5 Mon Sep 17 00:00:00 2001 From: Harley White Date: Sun, 24 Jan 2021 19:05:01 -0500 Subject: [PATCH] Fixed tooltip overlap --- changelog.md | 1 + demo.html | 6 +++--- index.html | 2 +- js/Demo/demoLayers.js | 6 ++++++ js/game.js | 2 ++ js/technical/temp.js | 3 ++- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/changelog.md b/changelog.md index 6cd0616..a518092 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,7 @@ ## v2.3.6 - - Performance improvements. +- Fixed tooltips overlapping with the top display. - Added support for bulk challenge completions. - "Best" is updated automatically. - Fixed keeping Decimal values on reset. diff --git a/demo.html b/demo.html index bc389dc..b51e6dd 100644 --- a/demo.html +++ b/demo.html @@ -43,7 +43,7 @@
-
{{VERSION.withoutName}}
+
{{(VERSION.withoutName)}}

i
@@ -61,7 +61,7 @@
-
+




@@ -69,7 +69,7 @@
- +
-
+




diff --git a/js/Demo/demoLayers.js b/js/Demo/demoLayers.js index 8f9050b..ff8cb22 100644 --- a/js/Demo/demoLayers.js +++ b/js/Demo/demoLayers.js @@ -357,6 +357,7 @@ addLayer("c", { tooltip() { // Optional, tooltip displays when the layer is unlocked let tooltip = formatWhole(player[this.layer].points) + " " + this.resource if (player[this.layer].buyables[11].gt(0)) tooltip += "\n" + formatWhole(player[this.layer].buyables[11]) + " Exhancers" + tooltip += "\nmomomo\m oo\nommom\nyeyeyeye" return tooltip }, shouldNotify() { // Optional, layer will be highlighted on the tree if true. @@ -513,3 +514,8 @@ addLayer("a", { }, }, ) + +addLayer('qq', {row: 2}) +addLayer('rr', {row: 3}) +addLayer('ss', {row: 4}) +addLayer('tt', {row: 5}) \ No newline at end of file diff --git a/js/game.js b/js/game.js index a560763..2716420 100644 --- a/js/game.js +++ b/js/game.js @@ -1,6 +1,7 @@ var player; var needCanvasUpdate = true; var gameEnded = false; +var scrolled = false; // Don't change this const TMT_VERSION = { @@ -407,6 +408,7 @@ var interval = setInterval(function() { if (needCanvasUpdate){ resizeCanvas(); needCanvasUpdate = false; } + tmp.scrolled = document.getElementById('treeTab').scrollTop < 30 updateTemp(); gameLoop(diff) fixNaNs() diff --git a/js/technical/temp.js b/js/technical/temp.js index ead0c8e..0867f9d 100644 --- a/js/technical/temp.js +++ b/js/technical/temp.js @@ -21,7 +21,8 @@ function setupTemp() { tmp = {} tmp.pointGen = {} tmp.displayThings = [] - + tmp.scrolled = 0 + setupTempData(layers, tmp) for (layer in layers){ tmp[layer].resetGain = {}