1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-24 09:21:46 +00:00

Fixed everything with branches

This commit is contained in:
Harley White 2021-06-02 18:51:33 -04:00
parent 95046d9299
commit 10e3c429a8
9 changed files with 30 additions and 11 deletions

View file

@ -98,7 +98,7 @@
<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>
<bg :layer="player.navTab == 'none' ? player.tab : player.navTab" ></bg>
</div> </div>
<!-- Popups --> <!-- Popups -->
@ -117,12 +117,15 @@
</div> </div>
</div> </div>
<div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" style="background-color:var(--background)" v-bind:class="{ fullWidth: player.navTab == 'none' || !tmp.other.splitScreen || !readData(layoutInfo.showTree), col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}"> <div v-if="player.navTab !== 'none' && player.tab !== 'none' && !(gameEnded && !player.keepGoing)" onscroll="resizeCanvas()" v-bind:class="{ fullWidth: player.navTab == 'none' || !tmp.other.splitScreen || !readData(layoutInfo.showTree), col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
<div v-for="layer in LAYERS"> <div v-for="layer in LAYERS">
<div v-if="player.tab==layer"> <div v-if="player.tab==layer">
<layer-tab :layer="layer" :back="'none'" :spacing="'50px'" :key="'left'"></layer-tab> <layer-tab :layer="layer" :back="'none'" :spacing="'50px'" :key="'left'"></layer-tab>
</div> </div>
</div> </div>
<bg :layer="player.tab" ></bg>
</div> </div>
<div class="bg2"></div>
</div> </div>
</body> </body>

View file

@ -328,6 +328,8 @@ addLayer("c", {
["display-image", "discord.png"],], ["display-image", "discord.png"],],
}, },
jail: { jail: {
style() {return {'background-color': '#222222'}},
content: [ content: [
["infobox", "coolInfo"], ["infobox", "coolInfo"],
["bar", "longBoi"], "blank", ["bar", "longBoi"], "blank",

View file

@ -50,5 +50,6 @@ addLayer("tree-tab", {
tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]], tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]],
previousTab: "", previousTab: "",
leftTab: true, leftTab: true,
style() {return {'background-color': '#222222'}},
}) })

View file

@ -550,6 +550,7 @@ function loadVue() {
Vue.component('options-tab', systemComponents['options-tab']) Vue.component('options-tab', systemComponents['options-tab'])
Vue.component('tooltip', systemComponents['tooltip']) Vue.component('tooltip', systemComponents['tooltip'])
Vue.component('particle', systemComponents['particle']) Vue.component('particle', systemComponents['particle'])
Vue.component('bg', systemComponents['bg'])
app = new Vue({ app = new Vue({

View file

@ -7,7 +7,6 @@ function retrieveCanvasData() {
let treeCanv = document.getElementById("treeCanvas") let treeCanv = document.getElementById("treeCanvas")
let treeTab = document.getElementById("treeTab") let treeTab = document.getElementById("treeTab")
if (treeCanv===undefined||treeCanv===null) return false; if (treeCanv===undefined||treeCanv===null) return false;
if (treeTab===undefined||treeTab===null) return false;
canvas = treeCanv; canvas = treeCanv;
ctx = canvas.getContext("2d"); ctx = canvas.getContext("2d");
return true; return true;
@ -52,7 +51,6 @@ function drawTree() {
function drawTreeBranch(num1, data) { // taken from Antimatter Dimensions & adjusted slightly function drawTreeBranch(num1, data) { // taken from Antimatter Dimensions & adjusted slightly
let num2 = data let num2 = data
let color_id = 1 let color_id = 1
if (Array.isArray(data)){ if (Array.isArray(data)){
num2 = data[0] num2 = data[0]
color_id = data[1] color_id = data[1]

View file

@ -51,7 +51,6 @@ function achievementStyle(layer, id){
function updateWidth() { function updateWidth() {
let screenWidth = window.innerWidth let screenWidth = window.innerWidth
let last = tmp.other.splitScreen
let splitScreen = screenWidth >= 1024 let splitScreen = screenWidth >= 1024
if (player.forceOneTab) splitScreen = false if (player.forceOneTab) splitScreen = false
if (player.navTab == "none") splitScreen = true if (player.navTab == "none") splitScreen = true
@ -60,7 +59,6 @@ function updateWidth() {
tmp.other.splitScreen = splitScreen tmp.other.splitScreen = splitScreen
tmp.other.lastPoints = player.points tmp.other.lastPoints = player.points
if (last !== tmp.other.splitScreen) needCanvasUpdate = true
} }
function updateOomps(diff) function updateOomps(diff)

View file

@ -66,7 +66,7 @@ var systemComponents = {
'layer-tab': { 'layer-tab': {
props: ['layer', 'back', 'spacing', 'embedded'], props: ['layer', 'back', 'spacing', 'embedded'],
template: `<div v-bind:style="[tmp[layer].style ? tmp[layer].style : {}, (tmp[layer].tabFormat && !Array.isArray(tmp[layer].tabFormat)) ? tmp[layer].tabFormat[player.subtabs[layer].mainTabs].style : {}]"> template: `<div v-bind:style="[tmp[layer].style ? tmp[layer].style : {}, (tmp[layer].tabFormat && !Array.isArray(tmp[layer].tabFormat)) ? tmp[layer].tabFormat[player.subtabs[layer].mainTabs].style : {}, {'background-color': 'transparent !important', '--background': 'transparent !important'}]">
<div v-if="back"><button v-bind:class="back == 'big' ? 'other-back' : 'back'" v-on:click="goBack(layer)"></button></div> <div v-if="back"><button v-bind:class="back == 'big' ? 'other-back' : 'back'" v-on:click="goBack(layer)"></button></div>
<div v-if="!tmp[layer].tabFormat"> <div v-if="!tmp[layer].tabFormat">
<div v-if="spacing" v-bind:style="{'height': spacing}" :key="this.$vnode.key + '-spacing'"></div> <div v-if="spacing" v-bind:style="{'height': spacing}" :key="this.$vnode.key + '-spacing'"></div>
@ -136,8 +136,6 @@ var systemComponents = {
The Modding Tree <a v-bind:href="'https://github.com/Acamaeda/The-Modding-Tree/blob/master/changelog.md'" target="_blank" class="link" v-bind:style = "{'font-size': '14px', 'display': 'inline'}" >{{TMT_VERSION.tmtNum}}</a> by Acamaeda The Modding Tree <a v-bind:href="'https://github.com/Acamaeda/The-Modding-Tree/blob/master/changelog.md'" target="_blank" class="link" v-bind:style = "{'font-size': '14px', 'display': 'inline'}" >{{TMT_VERSION.tmtNum}}</a> by Acamaeda
<br> <br>
The Prestige Tree made by Jacorb and Aarex The Prestige Tree made by Jacorb and Aarex
<br>
Original idea by papyrus (on discord)
<br><br> <br><br>
<div class="link" onclick="showTab('changelog-tab')">Changelog</div><br> <div class="link" onclick="showTab('changelog-tab')">Changelog</div><br>
<span v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink" target="_blank">{{modInfo.discordName}}</a><br></span> <span v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink" target="_blank">{{modInfo.discordName}}</a><br></span>
@ -211,5 +209,11 @@ var systemComponents = {
` `
}, },
'bg': {
props: ['layer'],
template: `<div class ="bg" v-bind:style="[tmp[layer].style ? tmp[layer].style : {}, (tmp[layer].tabFormat && !Array.isArray(tmp[layer].tabFormat)) ? tmp[layer].tabFormat[player.subtabs[layer].mainTabs].style : {}]"></div>
`
}
} }

View file

@ -25,6 +25,7 @@ function changeTreeQuality() {
} }
function toggleAuto(toggle) { function toggleAuto(toggle) {
player[toggle[0]][toggle[1]] = !player[toggle[0]][toggle[1]]; player[toggle[0]][toggle[1]] = !player[toggle[0]][toggle[1]];
needCanvasUpdate=true
} }
const MS_DISPLAYS = ["ALL", "LAST, AUTO, INCOMPLETE", "AUTOMATION, INCOMPLETE", "INCOMPLETE", "NONE"]; const MS_DISPLAYS = ["ALL", "LAST, AUTO, INCOMPLETE", "AUTOMATION, INCOMPLETE", "INCOMPLETE", "NONE"];

View file

@ -7,6 +7,7 @@
margin: auto; margin: auto;
-webkit-text-size-adjust: none; -webkit-text-size-adjust: none;
text-size-adjust: none; text-size-adjust: none;
} }
*:focus { *:focus {
@ -15,12 +16,12 @@
} }
body { body {
background-color: var(--background);
color: var(--color); color: var(--color);
overflow: hidden; overflow: hidden;
--background: #0f0f0f; --background: #0f0f0f;
--color: #dfdfdf; --color: #dfdfdf;
--points: #ffffff; --points: #ffffff;
background: var(--background)
} }
html, body { html, body {
@ -643,7 +644,6 @@ ul {
.overlayThing { .overlayThing {
z-index: 10000; z-index: 10000;
pointer-events:auto; pointer-events:auto;
background-color: var(--background);
} }
.sideLayers { .sideLayers {
@ -652,6 +652,8 @@ ul {
position: absolute; position: absolute;
right: 55px; right: 55px;
top: 65px; top: 65px;
background-color: transparent;
} }
button > * { button > * {
@ -754,3 +756,12 @@ button > * {
.star:after { .star:after {
transform: rotate(35deg); transform: rotate(35deg);
} }
.bg {
z-index: -9000;
width: 100%;
height: 100%;
position: absolute;
background-color: var(--background);
top: 0
}