Added "image-display" component

This commit is contained in:
Acamaeda 2020-10-04 17:14:13 -04:00
parent 1e7bfc1431
commit 8791a8a6af
2 changed files with 26 additions and 10 deletions

View file

@ -34,7 +34,7 @@ addLayer("c", {
icecreamCap: (player[this.layer].points * 10)
}},
effectDescription() { // Optional text to describe the effects
eff = this.effect;
eff = this.effect();
return "which are boosting waffles by "+format(eff.waffleBoost)+" and increasing the Ice Cream cap by "+format(eff.icecreamCap)
},
milestones: {
@ -192,7 +192,9 @@ addLayer("c", {
["prestige-button", function() {return "Be redundant for "}, {'width': '150px', 'height': '30px'}],
]],
]],
],
"blank",
["display-image", "discord.png"],
],
},
style() {return {
// 'background-color': '#3325CC'

16
js/v.js
View file

@ -45,7 +45,7 @@ function loadVue() {
`
})
// Blank lines, data = optional height in px or pair with width and height in px
// Blank space, data = optional height in px or pair with width and height in px
Vue.component('blank', {
props: ['layer', 'data'],
template: `
@ -57,6 +57,20 @@ function loadVue() {
`
})
// Displays an image, data is the URL
Vue.component('display-image', {
props: ['layer', 'data'],
template: `
<span><img v-bind:src= "readData(data)" v-bind:alt= "readData(data)"></span>
`
})
Vue.component('image', {
props: ['layer', 'data'],
template: `
`
})
// data = an array of Components to be displayed in a row
Vue.component('row', {
props: ['layer', 'data'],