forked from noxious/client
Zone editor UX improvements, possibly fixed login issue after registration
This commit is contained in:
@ -11,7 +11,8 @@ export const useGameStore = defineStore('game', {
|
||||
connection: null as Socket | null,
|
||||
user: null as User | null,
|
||||
character: null as Character | null,
|
||||
isGmPanelOpen: false
|
||||
isGmPanelOpen: false,
|
||||
isMovingCamera: false
|
||||
}),
|
||||
actions: {
|
||||
setScreen(screen: string) {
|
||||
@ -29,6 +30,12 @@ export const useGameStore = defineStore('game', {
|
||||
toggleGmPanel() {
|
||||
this.isGmPanelOpen = !this.isGmPanelOpen
|
||||
},
|
||||
toggleMovingCamera() {
|
||||
this.isMovingCamera = !this.isMovingCamera
|
||||
},
|
||||
setMovingCamera(moving: boolean) {
|
||||
this.isMovingCamera = moving
|
||||
},
|
||||
initConnection() {
|
||||
this.connection = io(config.server_endpoint, {
|
||||
secure: !config.development,
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { useGameStore } from '@/stores/game';
|
||||
import type { Zone, Object, Tile, ZoneObject } from '@/types'
|
||||
|
||||
export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
@ -62,6 +63,9 @@ export const useZoneEditorStore = defineStore('zoneEditor', {
|
||||
this.selectedObject = object
|
||||
},
|
||||
setSelectedZoneObject(zoneObject: ZoneObject) {
|
||||
const gameStore = useGameStore(); // Access the gameStore
|
||||
if (gameStore.isMovingCamera) return; // Step 2: Check isMovingCamera before proceeding
|
||||
|
||||
this.selectedZoneObject = zoneObject
|
||||
},
|
||||
setObjectDepth(depth: number) {
|
||||
|
Reference in New Issue
Block a user