forked from noxious/client
Paint tool fixes
This commit is contained in:
parent
bfb2bcb939
commit
0c61fe77de
@ -117,7 +117,7 @@ const selectPencilOpen = ref(false)
|
|||||||
const selectEraserOpen = ref(false)
|
const selectEraserOpen = ref(false)
|
||||||
const isContinuousDrawingEnabled = ref<Boolean>(false)
|
const isContinuousDrawingEnabled = ref<Boolean>(false)
|
||||||
const isShowPlacedMapObjectPreviewEnabled = ref<Boolean>(mapEditor.isPlacedMapObjectPreviewEnabled.value)
|
const isShowPlacedMapObjectPreviewEnabled = ref<Boolean>(mapEditor.isPlacedMapObjectPreviewEnabled.value)
|
||||||
const listOpen = computed(() => mapEditor.tool.value === 'pencil' && (mapEditor.drawMode.value === 'tile' || mapEditor.drawMode.value === 'map_object'))
|
const listOpen = computed(() => (mapEditor.tool.value === 'pencil' && (mapEditor.drawMode.value === 'tile' || mapEditor.drawMode.value === 'map_object')) || mapEditor.tool.value === 'paint')
|
||||||
|
|
||||||
// drawMode
|
// drawMode
|
||||||
function setDrawMode(value: string) {
|
function setDrawMode(value: string) {
|
||||||
@ -148,6 +148,7 @@ function handleModeClick(mode: string, type: 'pencil' | 'eraser') {
|
|||||||
|
|
||||||
function handleClick(tool: string) {
|
function handleClick(tool: string) {
|
||||||
mapEditor.setTool(tool)
|
mapEditor.setTool(tool)
|
||||||
|
if (tool === 'paint') mapEditor.setDrawMode('tile')
|
||||||
selectPencilOpen.value = tool === 'pencil' ? !selectPencilOpen.value : false
|
selectPencilOpen.value = tool === 'pencil' ? !selectPencilOpen.value : false
|
||||||
selectEraserOpen.value = tool === 'eraser' ? !selectEraserOpen.value : false
|
selectEraserOpen.value = tool === 'eraser' ? !selectEraserOpen.value : false
|
||||||
if (mapEditor.drawMode.value === 'teleport') emit('open-teleport')
|
if (mapEditor.drawMode.value === 'teleport') emit('open-teleport')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user