mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 01:11:46 +00:00
Fixed tooltip overlap
This commit is contained in:
parent
384269c593
commit
c0d3e08f51
6 changed files with 15 additions and 5 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
## v2.3.6 -
|
## v2.3.6 -
|
||||||
- Performance improvements.
|
- Performance improvements.
|
||||||
|
- Fixed tooltips overlapping with the top display.
|
||||||
- Added support for bulk challenge completions.
|
- Added support for bulk challenge completions.
|
||||||
- "Best" is updated automatically.
|
- "Best" is updated automatically.
|
||||||
- Fixed keeping Decimal values on reset.
|
- Fixed keeping Decimal values on reset.
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="treeOverlay" v-if="!(gameEnded && !player.keepGoing)" class="treeOverlay" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
<div id="treeOverlay" v-if="!(gameEnded && !player.keepGoing)" class="treeOverlay" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
||||||
<div id="version" onclick="showTab('changelog-tab')" class="overlayThing" style="margin-right: 13px">{{VERSION.withoutName}}</div>
|
<div id="version" onclick="showTab('changelog-tab')" class="overlayThing" style="margin-right: 13px">{{(VERSION.withoutName)}}</div>
|
||||||
<button v-if= "player.navTab == 'none' && (tmp[player.tab].row == 'side' || tmp[player.tab].row == 'otherside')" class="other-back overlayThing" onclick="goBack()">←</button>
|
<button v-if= "player.navTab == 'none' && (tmp[player.tab].row == 'side' || tmp[player.tab].row == 'otherside')" class="other-back overlayThing" onclick="goBack()">←</button>
|
||||||
<img id="optionWheel" class="overlayThing" v-if="player.tab!='options-tab'" src="options_wheel.png" onclick="showTab('options-tab')"></img>
|
<img id="optionWheel" class="overlayThing" v-if="player.tab!='options-tab'" src="options_wheel.png" onclick="showTab('options-tab')"></img>
|
||||||
<div id="info" v-if="player.tab!='info-tab'" class="overlayThing" onclick="showTab('info-tab')"><br>i</div>
|
<div id="info" v-if="player.tab!='info-tab'" class="overlayThing" onclick="showTab('info-tab')"><br>i</div>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" v-bind:style="{'z-index': (tmp.scrolled ? '999999999999' : '0')}" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<overlay-head id="fakeHead" style="visibility: hidden;">
|
<overlay-head id="fakeHead" style="visibility: hidden;">
|
||||||
</overlay-head>
|
</overlay-head>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
<layer-tab :layer="player.navTab == 'none' ? player.tab : player.navTab" :key="'left'"></layer-tab>
|
<layer-tab :layer="player.navTab == 'none' ? player.tab : player.navTab" :key="'left'"></layer-tab>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Popups -->
|
<!-- Popups -->
|
||||||
<div class="popup-container">
|
<div class="popup-container">
|
||||||
<transition-group name="fade">
|
<transition-group name="fade">
|
||||||
|
|
|
@ -61,7 +61,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
<div v-if="!(gameEnded && !player.keepGoing)" id="treeTab" v-bind:style="{'z-index': (tmp.scrolled ? '999999999999' : '0')}" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none')}">
|
||||||
<br><br><br><br>
|
<br><br><br><br>
|
||||||
<overlay-head id="fakeHead" style="visibility: hidden;">
|
<overlay-head id="fakeHead" style="visibility: hidden;">
|
||||||
</overlay-head>
|
</overlay-head>
|
||||||
|
|
|
@ -357,6 +357,7 @@ addLayer("c", {
|
||||||
tooltip() { // Optional, tooltip displays when the layer is unlocked
|
tooltip() { // Optional, tooltip displays when the layer is unlocked
|
||||||
let tooltip = formatWhole(player[this.layer].points) + " " + this.resource
|
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"
|
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
|
return tooltip
|
||||||
},
|
},
|
||||||
shouldNotify() { // Optional, layer will be highlighted on the tree if true.
|
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})
|
|
@ -1,6 +1,7 @@
|
||||||
var player;
|
var player;
|
||||||
var needCanvasUpdate = true;
|
var needCanvasUpdate = true;
|
||||||
var gameEnded = false;
|
var gameEnded = false;
|
||||||
|
var scrolled = false;
|
||||||
|
|
||||||
// Don't change this
|
// Don't change this
|
||||||
const TMT_VERSION = {
|
const TMT_VERSION = {
|
||||||
|
@ -407,6 +408,7 @@ var interval = setInterval(function() {
|
||||||
if (needCanvasUpdate){ resizeCanvas();
|
if (needCanvasUpdate){ resizeCanvas();
|
||||||
needCanvasUpdate = false;
|
needCanvasUpdate = false;
|
||||||
}
|
}
|
||||||
|
tmp.scrolled = document.getElementById('treeTab').scrollTop < 30
|
||||||
updateTemp();
|
updateTemp();
|
||||||
gameLoop(diff)
|
gameLoop(diff)
|
||||||
fixNaNs()
|
fixNaNs()
|
||||||
|
|
|
@ -21,7 +21,8 @@ function setupTemp() {
|
||||||
tmp = {}
|
tmp = {}
|
||||||
tmp.pointGen = {}
|
tmp.pointGen = {}
|
||||||
tmp.displayThings = []
|
tmp.displayThings = []
|
||||||
|
tmp.scrolled = 0
|
||||||
|
|
||||||
setupTempData(layers, tmp)
|
setupTempData(layers, tmp)
|
||||||
for (layer in layers){
|
for (layer in layers){
|
||||||
tmp[layer].resetGain = {}
|
tmp[layer].resetGain = {}
|
||||||
|
|
Loading…
Reference in a new issue