1
0
forked from noxious/client

Restored placed map object selection and implemented object snapping to tile coordinates

This commit is contained in:
2025-02-01 18:44:00 -06:00
parent 4adcf8d61d
commit 7daefb74eb
8 changed files with 90 additions and 114 deletions

View File

@ -1,4 +1,4 @@
import type { Map, MapObject } from '@/application/types'
import type { Map, MapObject, PlacedMapObject, UUID } from '@/application/types'
import { ref } from 'vue'
export type TeleportSettings = {
@ -15,6 +15,8 @@ const drawMode = ref('tile')
const inputMode = ref('tap')
const selectedTile = ref('')
const selectedMapObject = ref<MapObject | null>(null)
const movingPlacedObject = ref<PlacedMapObject | null>(null)
const selectedPlacedObject = ref<PlacedMapObject | null>(null)
const shouldClearTiles = ref(false)
const teleportSettings = ref<TeleportSettings>({
toMapId: '',
@ -96,6 +98,8 @@ export function useMapEditorComposable() {
inputMode,
selectedTile,
selectedMapObject,
movingPlacedObject,
selectedPlacedObject,
shouldClearTiles,
teleportSettings,