Newer
Older
<span v-if="store.state.lttMap">
<span v-for="(xRow, index) in store.state.lttMap" :key="index">
}, (index != 0 && !(index%2))?'shifted':'notShifted']"
:tile="tile"
:typeValue="tile.typeId"
@update:typeValue="tile.typeId = $event"
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<div class="row no-wrap q-pa-md absolute-center">
<q-card>
<q-card-section>
<div class="column" style="width: 600px;">
<div class="text-h6 q-mb-md text-black">New Map Dimensions</div>
<q-item>
<q-item-section avatar>
<q-icon size="30px" color="secondary" name="mdi-arrow-expand-horizontal" />
</q-item-section>
<q-item-section>
<q-slider v-model="store.state.mapSizeX" :min="1" :max="101" label color="secondary" :step="1" label-always/>
</q-item-section>
</q-item>
<q-item>
<q-item-section avatar>
<q-icon size="30px" color="secondary" name="mdi-arrow-expand-vertical" />
</q-item-section>
<q-item-section>
<q-slider v-model="store.state.mapSizeY" :min="1" :max="101" label color="secondary" :step="1" label-always/>
</q-item-section>
</q-item>
<q-btn class="q-mr-xs" color="secondary" label="Generate New Map" @click='createMap()'>
<q-tooltip :disable="$q.platform.is.mobile">
Generate new map with size set above
</q-tooltip>
</q-btn>
</div>
</q-card-section>
<q-card-section>
<div class="column">
<div class="text-h6 q-mb-md text-black">Load Existing Map</div>
<q-input
v-model="mapString"
filled
placeholder="Paste Map Data"
type="textarea"
input-class="pastCodeArea"
></q-input>
<q-btn class="q-mr-xs" color="secondary" label="Load Map From Filedata" @click='loadMapData()'>
<q-tooltip :disable="$q.platform.is.mobile">
Load Map From Data
</q-tooltip>
</q-btn>
</div>
</q-card-section>
</q-card>
import Tile from "../components/Tile.vue";
export default defineComponent({
setup() {
var mapString = ref('')
const loadMapData = function() {
store.methods.loadMap(JSON.parse(mapString.value));
};
const createMap= function(){
store.methods.generateMap();
};
},
components: {
Tile
},
}
)
</script>
<style>
.firstRow {
margin-left: 49px;
}
margin-top: -31px;
margin-top: -31px;