mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-24 17:31:50 +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)
|
||||
}},
|
||||
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: {
|
||||
|
@ -190,9 +190,11 @@ addLayer("c", {
|
|||
["column", [
|
||||
["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 {
|
||||
// 'background-color': '#3325CC'
|
||||
|
|
28
js/v.js
28
js/v.js
|
@ -33,19 +33,19 @@ function loadVue() {
|
|||
Vue.component('display-text', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<span>{{readData(data)}}</span>
|
||||
<span>{{readData(data)}}</span>
|
||||
`
|
||||
})
|
||||
|
||||
// data = a function returning html content, with some limited functionality
|
||||
Vue.component('raw-html', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
Vue.component('raw-html', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<span v-html="readData(data)"></span>
|
||||
`
|
||||
})
|
||||
`
|
||||
})
|
||||
|
||||
// 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'],
|
||||
|
|
Loading…
Reference in a new issue