lots of changes to switch to vue
This commit is contained in:
parent
5adb8806dc
commit
a0118b0bdf
22 changed files with 582 additions and 920 deletions
38
public/components/SettingsOverlay.vue.js
Normal file
38
public/components/SettingsOverlay.vue.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
"use strict"
|
||||
|
||||
// ingame component
|
||||
// allows to change (player) settings
|
||||
|
||||
export default {
|
||||
name: 'settings-overlay',
|
||||
template: `
|
||||
<div class="overlay transparent" @click="$emit('bgclick')">
|
||||
<table class="settings" @click.stop="">
|
||||
<tr>
|
||||
<td><label>Background: </label></td>
|
||||
<td><input type="color" v-model="modelValue.background" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label>Color: </label></td>
|
||||
<td><input type="color" v-model="modelValue.color" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label>Name: </label></td>
|
||||
<td><input type="text" maxLength="16" v-model="modelValue.name" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
`,
|
||||
emits: {
|
||||
bgclick: null,
|
||||
'update:modelValue': null,
|
||||
},
|
||||
props: {
|
||||
modelValue: Object,
|
||||
},
|
||||
created () {
|
||||
this.$watch('modelValue', val => {
|
||||
this.$emit('update:modelValue', val)
|
||||
}, { deep: true })
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue