mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-22 00:21:32 +00:00
Added "image-display" component
This commit is contained in:
parent
1e7bfc1431
commit
8791a8a6af
2 changed files with 26 additions and 10 deletions
|
@ -34,7 +34,7 @@ addLayer("c", {
|
||||||
icecreamCap: (player[this.layer].points * 10)
|
icecreamCap: (player[this.layer].points * 10)
|
||||||
}},
|
}},
|
||||||
effectDescription() { // Optional text to describe the effects
|
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)
|
return "which are boosting waffles by "+format(eff.waffleBoost)+" and increasing the Ice Cream cap by "+format(eff.icecreamCap)
|
||||||
},
|
},
|
||||||
milestones: {
|
milestones: {
|
||||||
|
@ -192,6 +192,8 @@ addLayer("c", {
|
||||||
["prestige-button", function() {return "Be redundant for "}, {'width': '150px', 'height': '30px'}],
|
["prestige-button", function() {return "Be redundant for "}, {'width': '150px', 'height': '30px'}],
|
||||||
]],
|
]],
|
||||||
]],
|
]],
|
||||||
|
"blank",
|
||||||
|
["display-image", "discord.png"],
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
style() {return {
|
style() {return {
|
||||||
|
|
16
js/v.js
16
js/v.js
|
@ -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', {
|
Vue.component('blank', {
|
||||||
props: ['layer', 'data'],
|
props: ['layer', 'data'],
|
||||||
template: `
|
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
|
// data = an array of Components to be displayed in a row
|
||||||
Vue.component('row', {
|
Vue.component('row', {
|
||||||
props: ['layer', 'data'],
|
props: ['layer', 'data'],
|
||||||
|
|
Loading…
Reference in a new issue