mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
More work on tab shenanigans
This commit is contained in:
parent
1a83d63711
commit
5c16bbbbbd
5 changed files with 41 additions and 48 deletions
44
demo.html
44
demo.html
|
@ -110,24 +110,7 @@
|
|||
<li><a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Main Prestige Tree server</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="overlayThing" v-if="player.tab!='gameEnded' && !(player.navTab == 'none' && (player.tab=='options' || player.tab=='info'))" style="padding-bottom:7px; width: 90%">
|
||||
<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
|
||||
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
|
||||
</span>
|
||||
<span v-if="player.offTime !== undefined" class="overlayThing">
|
||||
<br>Offline Time: {{formatTime(player.offTime.remain)}}<br>
|
||||
</span>
|
||||
<span v-if="false && !player.keepGoing" class="overlayThing">
|
||||
<br>Reach {{formatWhole(ENDGAME)}} to beat the game!<br>
|
||||
</span>
|
||||
<br>
|
||||
<span v-if="player.points.lt('1e1000')" class="overlayThing">You have </span>
|
||||
<h2 class="overlayThing" id="points">{{format(player.points)}}</h2>
|
||||
<span v-if="player.points.lt('1e1e6')" class="overlayThing"> {{modInfo.pointsName}}</span>
|
||||
<br>
|
||||
<span v-if="canGenPoints()" class="overlayThing">({{format(getPointGen())}}/sec)</span>
|
||||
<div v-for="thing in tmp.displayThings" class="overlayThing"><span v-if="thing" v-html="thing"></span></div>
|
||||
</div>
|
||||
<overlay-head v-if="player.tab!='gameEnded' && !(player.navTab == 'none' && (player.tab=='options' || player.tab=='info'))"></overlay-head>
|
||||
<div class="sideLayers" >
|
||||
<div v-for="node in OTHER_LAYERS['side']"><layer-node :layer='node' :abb='tmp[node].symbol' :size="'small'"></layer-node></div>
|
||||
</div>
|
||||
|
@ -136,25 +119,10 @@
|
|||
|
||||
<div v-if="player.navTab == 'tree' && player.tab!='gameEnded'" id="treeTab" style="z-index: 0" onscroll="resizeCanvas()" v-bind:class= "{ fullWidth: player.tab == 'none', col: player.tab != 'none', left: player.tab != 'none'}">
|
||||
<br><br><br><br>
|
||||
<div id="fakeHead" style="visibility: hidden;">
|
||||
<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
|
||||
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
|
||||
</span>
|
||||
<span v-if="player.offTime !== undefined" class="overlayThing">
|
||||
<br>Offline Time: {{formatTime(player.offTime.remain)}}<br>
|
||||
</span>
|
||||
<span v-if="false && !player.keepGoing" class="overlayThing">
|
||||
<br>Reach {{formatWhole(ENDGAME)}} to beat the game!<br>
|
||||
</span>
|
||||
<br>
|
||||
<span v-if="player.points.lt('1e1000')" class="overlayThing">You have </span>
|
||||
<h2 class="overlayThing" id="points">{{format(player.points)}}</h2>
|
||||
<span v-if="player.points.lt('1e1e6')" class="overlayThing"> {{modInfo.pointsName}}</span>
|
||||
<br>
|
||||
<span v-if="canGenPoints()" class="overlayThing">({{format(getPointGen())}}/sec)</span>
|
||||
<div v-for="thing in tmp.displayThings" class="overlayThing"><span v-if="thing" v-html="thing"></span></div>
|
||||
</div>
|
||||
<tree :data="(layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)"></tree>
|
||||
<overlay-head id="fakeHead" style="visibility: hidden;">
|
||||
</overlay-head>
|
||||
<layer-tab :layer="'tree-tab'"></layer-tab>
|
||||
|
||||
</div>
|
||||
<div v-for="layer in LAYERS" >
|
||||
<div v-if="player.navTab == 'none'" id="fakeHead" style="visibility: hidden;">
|
||||
|
@ -177,7 +145,7 @@
|
|||
</div>
|
||||
|
||||
<div v-if="player.tab==layer" v-bind:class="{ fullWidth: player.navTab == 'none', col: player.navTab != 'none', right: player.navTab != 'none', fast: true, tab: true}">
|
||||
<layer-tab :layer="layer" :back="'none'"></layer-tab>
|
||||
<layer-tab :layer="layer" :back="'none'" :spacing="'50px'"></layer-tab>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -43,10 +43,6 @@
|
|||
<h1>Oh, you are still reading this?</h1>
|
||||
<br>
|
||||
</div>
|
||||
<div v-if="player.tab=='changelog'" class="col right">
|
||||
<button class="back" onclick="showTab('none')">←</button><br><br><br>
|
||||
</div>
|
||||
|
||||
<div v-if="player.tab=='info'" class="col right">
|
||||
<button class="back" onclick="showTab('none')">←</button><br>
|
||||
<h2>{{modInfo.name}}</h2>
|
||||
|
|
|
@ -3,7 +3,7 @@ var layoutInfo = {
|
|||
startTab: "none",
|
||||
showTree: true,
|
||||
|
||||
treeLayout: ""
|
||||
//treeLayout: ""
|
||||
|
||||
|
||||
}
|
||||
|
@ -42,3 +42,7 @@ addNode("h", {
|
|||
onClick() {player.points = new Decimal(10)}
|
||||
},
|
||||
)
|
||||
|
||||
addLayer("tree-tab", {
|
||||
tabFormat: [["tree", function() {return (layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS)}]]
|
||||
})
|
|
@ -13,3 +13,7 @@ addNode("spook", {
|
|||
layerShown: "ghost",
|
||||
},
|
||||
)
|
||||
|
||||
addLayer("tree-tab", {
|
||||
tabFormat: ["tree", function() {layoutInfo.treeLayout ? layoutInfo.treeLayout : TREE_LAYERS}]
|
||||
})
|
31
js/v.js
31
js/v.js
|
@ -467,10 +467,11 @@ function loadVue() {
|
|||
})
|
||||
|
||||
Vue.component('layer-tab', {
|
||||
props: ['layer', 'back'],
|
||||
props: ['layer', 'back', 'spacing'],
|
||||
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 : {}]">
|
||||
<button v-if="back" class="back" v-on:click="showTab(back)">←</button><br><br><br>
|
||||
<div v-if="back"><button class="back" v-on:click="showTab(back)">←</button></div>
|
||||
<div v-if="!tmp[layer].tabFormat">
|
||||
<div v-if="spacing" v-bind:style="{'height': spacing}"></div>
|
||||
<info-box v-if="tmp[layer].infoboxes" :layer="layer" :data="Object.keys(tmp[layer].infoboxes)[0]"></info-box>
|
||||
<main-display v-bind:style="tmp[layer].componentStyles['main-display']" :layer="layer"></main-display>
|
||||
<div v-if="tmp[layer].type !== 'none'">
|
||||
|
@ -488,10 +489,10 @@ function loadVue() {
|
|||
<br><br>
|
||||
</div>
|
||||
<div v-if="tmp[layer].tabFormat">
|
||||
<div v-if="Array.isArray(tmp[layer].tabFormat)">
|
||||
<div v-if="Array.isArray(tmp[layer].tabFormat)"><div v-if="spacing" v-bind:style="{'height': spacing}"></div>
|
||||
<column :layer="layer" :data="tmp[layer].tabFormat"></column>
|
||||
</div>
|
||||
<div v-else v-bind:style="[{'margin-top': '-50px'}]">
|
||||
<div v-else>
|
||||
<div class="upgTable" v-bind:style="{'padding-top': '25px', 'margin-bottom': '24px'}">
|
||||
<tab-buttons v-bind:style="tmp[layer].componentStyles['tab-buttons']" :layer="layer" :data="tmp[layer].tabFormat" :name="'mainTabs'"></tab-buttons>
|
||||
</div>
|
||||
|
@ -502,7 +503,27 @@ function loadVue() {
|
|||
`
|
||||
})
|
||||
|
||||
|
||||
Vue.component('overlay-head', {
|
||||
template: ` <div class="overlayThing" style="padding-bottom:7px; width: 90%">
|
||||
<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
|
||||
<br>Dev Speed: {{format(player.devSpeed)}}x<br>
|
||||
</span>
|
||||
<span v-if="player.offTime !== undefined" class="overlayThing">
|
||||
<br>Offline Time: {{formatTime(player.offTime.remain)}}<br>
|
||||
</span>
|
||||
<span v-if="false && !player.keepGoing" class="overlayThing">
|
||||
<br>Reach {{formatWhole(ENDGAME)}} to beat the game!<br>
|
||||
</span>
|
||||
<br>
|
||||
<span v-if="player.points.lt('1e1000')" class="overlayThing">You have </span>
|
||||
<h2 class="overlayThing" id="points">{{format(player.points)}}</h2>
|
||||
<span v-if="player.points.lt('1e1e6')" class="overlayThing"> {{modInfo.pointsName}}</span>
|
||||
<br>
|
||||
<span v-if="canGenPoints()" class="overlayThing">({{format(getPointGen())}}/sec)</span>
|
||||
<div v-for="thing in tmp.displayThings" class="overlayThing"><span v-if="thing" v-html="thing"></span></div>
|
||||
</div>
|
||||
`
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue