mirror of
https://github.com/Acamaeda/The-Modding-Tree.git
synced 2024-11-21 16:13:55 +00:00
Added new tooltips to achievements and sliders
This commit is contained in:
parent
b5b0b99505
commit
60dcf108b7
1 changed files with 8 additions and 8 deletions
|
@ -367,15 +367,14 @@ function loadVue() {
|
|||
|
||||
// data = id
|
||||
Vue.component('achievement', {
|
||||
props: ['layer', 'data'],
|
||||
props: ['layer', 'data', 'hover'],
|
||||
template: `
|
||||
<div v-if="tmp[layer].achievements && tmp[layer].achievements[data]!== undefined && tmp[layer].achievements[data].unlocked" v-bind:class="{ [layer]: true, achievement: true, locked: !hasAchievement(layer, data), bought: hasAchievement(layer, data)}"
|
||||
v-bind:tooltip="
|
||||
(tmp[layer].achievements[data].tooltip == '') ? false : hasAchievement(layer, data) ? (tmp[layer].achievements[data].doneTooltip ? tmp[layer].achievements[data].doneTooltip : (tmp[layer].achievements[data].tooltip ? tmp[layer].achievements[data].tooltip : 'You did it!'))
|
||||
: (tmp[layer].achievements[data].goalTooltip ? tmp[layer].achievements[data].goalTooltip : (tmp[layer].achievements[data].tooltip ? tmp[layer].achievements[data].tooltip : 'LOCKED'))
|
||||
"
|
||||
|
||||
<div v-if="tmp[layer].achievements && tmp[layer].achievements[data]!== undefined && tmp[layer].achievements[data].unlocked" v-bind:class="{ [layer]: true, achievement: true, tooltipBox:true, locked: !hasAchievement(layer, data), bought: hasAchievement(layer, data)}"
|
||||
v-bind:style="tmp[layer].achievements[data].computedStyle">
|
||||
<tooltip :text="
|
||||
(tmp[layer].achievements[data].tooltip == '') ? false : hasAchievement(layer, data) ? (tmp[layer].achievements[data].doneTooltip ? tmp[layer].achievements[data].doneTooltip : (tmp[layer].achievements[data].tooltip ? tmp[layer].achievements[data].tooltip : 'You did it!'))
|
||||
: (tmp[layer].achievements[data].goalTooltip ? tmp[layer].achievements[data].goalTooltip : (tmp[layer].achievements[data].tooltip ? tmp[layer].achievements[data].tooltip : 'LOCKED'))
|
||||
"></tooltip>
|
||||
<span v-if= "tmp[layer].achievements[data].name"><br><h3 v-bind:style="tmp[layer].achievements[data].textStyle" v-html="tmp[layer].achievements[data].name"></h3><br></span>
|
||||
</div>
|
||||
`
|
||||
|
@ -411,7 +410,8 @@ function loadVue() {
|
|||
Vue.component('slider', {
|
||||
props: ['layer', 'data'],
|
||||
template: `
|
||||
<div><input type="range" v-model="player[layer][data[0]]" :min="data[1]" :max="data[2]"></div>
|
||||
<div class="tooltipBox" @mouseover="hover = true" @mouseleave="hover = false">
|
||||
<tooltip :text="player[layer][data[0]]"></tooltip><input type="range" v-model="player[layer][data[0]]" :min="data[1]" :max="data[2]"></div>
|
||||
`
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue