diff --git a/index.html b/index.html index f570fc3..933ce7b 100644 --- a/index.html +++ b/index.html @@ -124,8 +124,7 @@



- You have

{{formatWhole(player[layer].points)}}

{{layers[layer].resource}}, {{layers[layer].effectDescription()}} -

+
You have {{formatWhole(tmp.layerAmt[layer])}} {{layers[layer].baseResource}}


@@ -139,8 +138,6 @@



- You have

{{formatWhole(player[layer].points)}}

{{layers[layer].resource}}, {{layers[layer].effectDescription()}} -

diff --git a/js/layers.js b/js/layers.js index ee79290..35e5786 100644 --- a/js/layers.js +++ b/js/layers.js @@ -99,7 +99,7 @@ var layers = { incr_order: [], // Array of layer names to have their order increased when this one is first unlocked // Optional, lets you format the tab yourself by listing components. You can create your own components in v.js. - tabFormat: [["colored-text", function() {return 'I have ' + format(player.points) + ' pointy points!'}, "red"], "blank", ["toggle", ["c", "beep"]], "milestones", "blank", "blank", "upgrades"] + tabFormat: ["main-display", ["prestige-button", function(){return "Melt your points into "}], ["raw-html", function() {return ""}], ["display-text", function() {return 'I have ' + format(player.points) + ' pointy points!'}, {"color": "red", "font-size": "32px", "font-family": "Comic Sans MS"}], "blank", ["toggle", ["c", "beep"]], "milestones", "blank", "blank", "upgrades"] }, f: { diff --git a/js/v.js b/js/v.js index 394fd66..926f452 100644 --- a/js/v.js +++ b/js/v.js @@ -81,31 +81,41 @@ function loadVue() { ` }) - + // data = function to return the text describing the reset before the amount gained (optional) Vue.component('prestige-button', { - props: ['layer'], - template: ` - - - ` - }) - - // data = content - Vue.component('display-text', { props: ['layer', 'data'], template: ` - {{data()}} + + + + ` }) - // text, colorful and with the shadowy effect. You can probably do other custom text effects if you want. - Vue.component('colored-text', { - props: ['layer', 'data', 'data2'], + // Displays the main resource for the layer + Vue.component('main-display', { + props: ['layer'], template: ` - {{data()}} +
You have

{{formatWhole(player[layer].points)}}

{{layers[layer].resource}}, {{layers[layer].effectDescription()}}

` }) + // data = a function returning the content, data2 = a CSS object with the formatting (optional) + Vue.component('display-text', { + props: ['layer', 'data' , 'data2'], + template: ` + {{data()}} + ` + }) + + // data = a function returning html content, with some limited functionality + Vue.component('raw-html', { + props: ['layer', 'data'], + template: ` + + ` + }) + // Blank lines Vue.component('blank', { props: ['layer', 'data'],