mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2025-01-18 11:41:31 +00:00
Fixed tooltip overlay issue and settings not updating
This commit is contained in:
parent
431e1a1b71
commit
fabf31ccf6
11 changed files with 25 additions and 12 deletions
|
@ -1,5 +1,8 @@
|
||||||
# The Modding Tree changelog:
|
# The Modding Tree changelog:
|
||||||
|
|
||||||
|
- Tooltips can now show over the top overlay again.
|
||||||
|
- Fixed text on two settings buttons not changing.
|
||||||
|
|
||||||
### v2.5.9.2 - 5/19/21
|
### v2.5.9.2 - 5/19/21
|
||||||
- Fixed many issues with things not updating.
|
- Fixed many issues with things not updating.
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@
|
||||||
col: (player.tab !== 'none' && player.navTab !== 'none'),
|
col: (player.tab !== 'none' && player.navTab !== 'none'),
|
||||||
left: (player.tab !== 'none' && player.navTab !== 'none')}"
|
left: (player.tab !== 'none' && player.navTab !== 'none')}"
|
||||||
:style="{'margin-top': !readData(layoutInfo.showTree) && player.tab == 'info-tab' ? '50px' : ''}">
|
:style="{'margin-top': !readData(layoutInfo.showTree) && player.tab == 'info-tab' ? '50px' : ''}">
|
||||||
<div id="version" onclick="showTab('changelog-tab')" class="overlayThing" style="margin-right: 13px">
|
<div id="version" onclick="showTab('changelog-tab')" class="overlayThing" style="margin-right: 13px" >
|
||||||
{{VERSION.withoutName}}</div>
|
{{VERSION.withoutName}}</div>
|
||||||
<button
|
<button
|
||||||
v-if="player.navTab == 'none' && (tmp[player.tab].row == 'side' || tmp[player.tab].row == 'otherside')"
|
v-if="player.navTab == 'none' && (tmp[player.tab].row == 'side' || tmp[player.tab].row == 'otherside')"
|
||||||
|
@ -93,12 +93,11 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()"
|
<div v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen)" id="treeTab" 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')}">
|
v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none'), 'front': !tmp.scrolled}">
|
||||||
<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>
|
||||||
|
|
||||||
<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>
|
||||||
|
|
|
@ -8,7 +8,7 @@ You can test your mod by opening the [index.html][/index.html] file in your brow
|
||||||
|
|
||||||
Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to, for example to add new Vue components in [components.js](/js/components.js).
|
Most of the time, you won't need to dive deep into the code to create things, but you still can if you really want to, for example to add new Vue components in [components.js](/js/components.js).
|
||||||
|
|
||||||
The Modding Tree uses [break\_eternity.js](https://github.com/Patashu/break_eternity.js) to store large values. This means that many numbers are `Decimal` objects, and must be treated differently. For example, you have to use `new Decimal(x)` to create a `Decimal` value instead of a plain number, and perform operations on them by calling functions. e.g, instead of `x = x + y`, use `x = x.add(y)`. Keep in mind this also applies to comparison operators, which should be replaced with calling the `.gt`, `.gte`, `.lt`, `.lte`, `.eq`, and `.neq` functions. See the [break\_eternity.js](https://github.com/Patashu/break_eternity.js) docs for more details on working with `Decimal` values.
|
The Modding Tree uses [break\_eternity.js](https://github.com/Patashu/break_eternity.js) to store large values. This means that many numbers are `Decimal` objects, and must be treated differently. For example, you have to use `new Decimal(x)` to create a `Decimal` value instead of a plain number (x can be a number or a string for larger values). You perform operations on them by calling functions. e.g, instead of `x = x + y`, use `x = x.add(y)`. Keep in mind this also applies to comparison operators, which should be replaced with calling the `.gt`, `.gte`, `.lt`, `.lte`, `.eq`, and `.neq` functions. See the [break\_eternity.js](https://github.com/Patashu/break_eternity.js) docs for more details on working with `Decimal` values.
|
||||||
|
|
||||||
Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.
|
Almost all values can be either a constant value, or a dynamic value. Dynamic values are defined by putting a function that returns what the value should be at any given time.
|
||||||
|
|
||||||
|
|
3
docs/making-a-mod.md
Normal file
3
docs/making-a-mod.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Making a Mod
|
||||||
|
|
||||||
|
This guide assumes you have already gone through the [getting started guide](getting-started.md). It will walk you through the basics of using TMT to create a mod.
|
|
@ -93,7 +93,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen)" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()"
|
<div v-if="!(gameEnded && !player.keepGoing) && (player.tab === 'none' || tmp.other.splitScreen)" 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')}">
|
v-bind:class="{ fullWidth: (player.tab == 'none' || player.navTab == 'none'), col: (player.tab !== 'none' && player.navTab !== 'none'), left: (player.tab !== 'none' && player.navTab !== 'none'), 'front': !tmp.scrolled}">
|
||||||
<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>
|
||||||
|
|
|
@ -369,7 +369,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 += "<br><i>" + formatWhole(player[this.layer].buyables[11]) + " Exhancers</i>"
|
if (player[this.layer].buyables[11].gt(0)) tooltip += "<br><i><br><br><br>" + formatWhole(player[this.layer].buyables[11]) + " Exhancers</i>"
|
||||||
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.
|
||||||
|
|
|
@ -567,6 +567,7 @@ function loadVue() {
|
||||||
layerunlocked,
|
layerunlocked,
|
||||||
doReset,
|
doReset,
|
||||||
buyUpg,
|
buyUpg,
|
||||||
|
buyUpgrade,
|
||||||
startChallenge,
|
startChallenge,
|
||||||
milestoneShown,
|
milestoneShown,
|
||||||
keepGoing,
|
keepGoing,
|
||||||
|
@ -575,6 +576,8 @@ function loadVue() {
|
||||||
hasAchievement,
|
hasAchievement,
|
||||||
hasChallenge,
|
hasChallenge,
|
||||||
maxedChallenge,
|
maxedChallenge,
|
||||||
|
getBuyableAmount,
|
||||||
|
getClickableState,
|
||||||
inChallenge,
|
inChallenge,
|
||||||
canAffordUpgrade,
|
canAffordUpgrade,
|
||||||
canBuyBuyable,
|
canBuyBuyable,
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
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 = {
|
||||||
|
|
|
@ -10,6 +10,8 @@ function startPlayerBase() {
|
||||||
autosave: true,
|
autosave: true,
|
||||||
notify: {},
|
notify: {},
|
||||||
msDisplay: "always",
|
msDisplay: "always",
|
||||||
|
theme: null,
|
||||||
|
hqTree: false,
|
||||||
offlineProd: true,
|
offlineProd: true,
|
||||||
versionType: modInfo.id,
|
versionType: modInfo.id,
|
||||||
version: VERSION.num,
|
version: VERSION.num,
|
||||||
|
|
|
@ -18,12 +18,12 @@ function getThemeName() {
|
||||||
return player.theme ? theme_names[player.theme] : "Default";
|
return player.theme ? theme_names[player.theme] : "Default";
|
||||||
}
|
}
|
||||||
function switchTheme() {
|
function switchTheme() {
|
||||||
if (player.theme === undefined)
|
if (player.theme === null)
|
||||||
player.theme = themes[1];
|
player.theme = themes[1];
|
||||||
else {
|
else {
|
||||||
player.theme = themes[Object.keys(themes)[player.theme] + 1];
|
player.theme = themes[Object.keys(themes)[player.theme] + 1];
|
||||||
if (!player.theme)
|
if (!player.theme)
|
||||||
delete player.theme;
|
player.theme = null;
|
||||||
}
|
}
|
||||||
changeTheme();
|
changeTheme();
|
||||||
resizeCanvas();
|
resizeCanvas();
|
||||||
|
|
|
@ -595,7 +595,7 @@ ul {
|
||||||
transition: opacity 0.5s;
|
transition: opacity 0.5s;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 99999999 !important;
|
z-index: 20000 ;
|
||||||
|
|
||||||
background-color: var(--background_tooltip);
|
background-color: var(--background_tooltip);
|
||||||
color: var(--points);
|
color: var(--points);
|
||||||
|
@ -629,6 +629,10 @@ ul {
|
||||||
overflow:hidden;
|
overflow:hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.front {
|
||||||
|
z-index: 30000
|
||||||
|
}
|
||||||
|
|
||||||
.overlayThing {
|
.overlayThing {
|
||||||
z-index: 10000;
|
z-index: 10000;
|
||||||
pointer-events:auto;
|
pointer-events:auto;
|
||||||
|
|
Loading…
Add table
Reference in a new issue