1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Added CSS styling for layer tabs

This commit is contained in:
Acamaeda 2020-09-29 21:47:26 -04:00
parent 0b50935be1
commit b353693c89
3 changed files with 26 additions and 20 deletions

View file

@ -130,28 +130,27 @@
<canvas id="treeCanvas" class="canvas"></canvas> <canvas id="treeCanvas" class="canvas"></canvas>
</div> </div>
<div v-for="layer in LAYERS"> <div v-for="layer in LAYERS">
<div v-if="player.tab==layer && !layers[layer].tabFormat" class="col right"> <div v-if="player.tab==layer" v-bind:class="'col right'" v-bind:style="layers[layer].style ? layers[layer].style : {}">
<button class="back" onclick="showTab('tree')"></button><br><br><br> <button class="back" onclick="showTab('tree')"></button><br><br><br>
<main-display :layer="layer"></main-display> <div v-if="!layers[layer].tabFormat">
<prestige-button :layer="layer"></prestige-button> <main-display :layer="layer"></main-display>
<span v-if="layers[layer].type=='normal' && tmp.resetGain[layer].lt(100) && player[layer].points.lt(1e3)"><br>You have {{formatWhole(tmp.layerAmt[layer])}} {{layers[layer].baseResource}}</span> <prestige-button :layer="layer"></prestige-button>
<br><br> <span v-if="layers[layer].type=='normal' && tmp.resetGain[layer].lt(100) && player[layer].points.lt(1e3)"><br>You have {{formatWhole(tmp.layerAmt[layer])}} {{layers[layer].baseResource}}</span>
<span v-if="player[layer].best != undefined">Your best {{layers[layer].resource}} is {{formatWhole(player[layer].best)}}<br></span> <br><br>
<span v-if="player[layer].total != undefined">You have made a total of {{formatWhole(player[layer].total)}} {{layers[layer].resource}}<br></span> <span v-if="player[layer].best != undefined">Your best {{layers[layer].resource}} is {{formatWhole(player[layer].best)}}<br></span>
<milestones :layer="layer"></milestones> <span v-if="player[layer].total != undefined">You have made a total of {{formatWhole(player[layer].total)}} {{layers[layer].resource}}<br></span>
<br><br> <milestones :layer="layer"></milestones>
<upgrades :layer="layer"></upgrades> <br><br>
<challs :layer="layer"></challs> <upgrades :layer="layer"></upgrades>
<br><br> <challs :layer="layer"></challs>
</div> <br><br>
<div v-if="player.tab==layer && layers[layer].tabFormat" class="col right"> </div>
<button class="back" onclick="showTab('tree')"></button><br><br><br> <div v-if="layers[layer].tabFormat">
<div v-for="data in layers[layer].tabFormat"> <div v-for="data in layers[layer].tabFormat">
<div v-if="!Array.isArray(data)" v-bind:is="data" :layer= "layer"></div> <div v-if="!Array.isArray(data)" v-bind:is="data" :layer= "layer"></div>
<div v-else-if="data.length==3" v-bind:is="data[0]" :layer= "layer" :data= "data[1]" :data2="data[2]"></div> <div v-else-if="data.length==3" v-bind:is="data[0]" :layer= "layer" :data= "data[1]" :data2="data[2]"></div>
<div v-else-if="data.length==2" v-bind:is="data[0]" :layer= "layer" :data= "data[1]"></div> <div v-else-if="data.length==2" v-bind:is="data[0]" :layer= "layer" :data= "data[1]"></div>
</divs>
</div>
</div> </div>
</div> </div>
</div> </div>

View file

@ -107,7 +107,10 @@ var layers = {
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}], {"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
"blank", "blank",
["toggle", ["c", "beep"]], ["toggle", ["c", "beep"]],
"milestones", "blank", "blank", "upgrades"] "milestones", "blank", "blank", "upgrades"],
style: {
'background-color': 'blue'
},
}, },
f: { f: {

View file

@ -133,7 +133,11 @@ var layers = {
{"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}], {"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}],
"blank", "blank",
["toggle", ["c", "beep"]], ["toggle", ["c", "beep"]],
"milestones", "blank", "blank", "upgrades"] }, "milestones", "blank", "blank", "upgrades"] ,
style: {
'background-color': 'blue'
},
},
f: { // This layer contains a more minimal set of things, besides a branch and "boop" f: { // This layer contains a more minimal set of things, besides a branch and "boop"
startData() { return { startData() { return {
unl: false, unl: false,