Skip to main content

neon_crisp / Modules / utils/guiDndManager / GuiDndManager

Class: GuiDndManager

utils/guiDndManager.GuiDndManager

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new GuiDndManager(dropZones): GuiDndManager

Parameters

NameType
dropZonesnode[]

Returns

GuiDndManager

Defined in

utils/guiDndManager.ts:17

Properties

draggables

draggables: { dragging: boolean ; node: node ; onDrop: (index: number) => void }[]

Defined in

utils/guiDndManager.ts:10


dropZones

dropZones: node[]

Defined in

utils/guiDndManager.ts:11


moveAbove

moveAbove: boolean = true

Defined in

utils/guiDndManager.ts:12


moveAboveScale

moveAboveScale: undefined | vector3 = undefined

Defined in

utils/guiDndManager.ts:14


parent

parent: undefined | node = undefined

Defined in

utils/guiDndManager.ts:16


screenPos

screenPos: boolean = false

Defined in

utils/guiDndManager.ts:13


startingScale

startingScale: undefined | vector3 = undefined

Defined in

utils/guiDndManager.ts:15

Methods

manageDragNode

manageDragNode(node, onDrop): void

Add a draggable you want to manager to the class

Parameters

NameType
nodenode
onDrop(index: number) => void

Returns

void

Example

const dndManager = new GuiDndManager()
const draggable = gui.get_node("roll")
dndManager.manageDragNode(card, () => {},()=>{})

Defined in

utils/guiDndManager.ts:31


onInput

onInput(action_id, action): void

the main loop to call your draggables when called should be added to on_input

Parameters

NameType
action_idhash
actionAction

Returns

void

Example

draggableManager.handleClicks(action_id, action)

Defined in

utils/guiDndManager.ts:40