fix sticky notes getting stuck underneath cards after they had been attached once.
This commit is contained in:
parent
591ba0978e
commit
4111b4efae
|
|
@ -221,6 +221,7 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
|
||||||
to_handle.attached_to = sticky_note_container.get_child(current_sticky_note_id)
|
to_handle.attached_to = sticky_note_container.get_child(current_sticky_note_id)
|
||||||
to_handle.reset_drag()
|
to_handle.reset_drag()
|
||||||
current_context = NAVIGATE
|
current_context = NAVIGATE
|
||||||
|
_return_sticky_notes_to_panels()
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
area.attach_sticky_note(to_handle)
|
area.attach_sticky_note(to_handle)
|
||||||
|
|
@ -266,6 +267,10 @@ func _return_sticky_notes_to_panels():
|
||||||
for panel:StickyNotePanel in sticky_note_container.get_children():
|
for panel:StickyNotePanel in sticky_note_container.get_children():
|
||||||
panel.reclaim_sticky_note()
|
panel.reclaim_sticky_note()
|
||||||
|
|
||||||
|
for node in dropzone.get_children():
|
||||||
|
if node is StickyNote:
|
||||||
|
node.is_dragable = true
|
||||||
|
|
||||||
func is_board_complete() -> bool:
|
func is_board_complete() -> bool:
|
||||||
if mementos_collected == 4:
|
if mementos_collected == 4:
|
||||||
for card in dropzone.get_children():
|
for card in dropzone.get_children():
|
||||||
|
|
@ -314,6 +319,7 @@ func insert_area(parent: Control, node: Area2D):
|
||||||
|
|
||||||
if node is StickyNote:
|
if node is StickyNote:
|
||||||
node.attached_to = self
|
node.attached_to = self
|
||||||
|
node.is_dragable = true
|
||||||
|
|
||||||
# Takes the inputs for control inputs
|
# Takes the inputs for control inputs
|
||||||
func _input(event):
|
func _input(event):
|
||||||
|
|
|
||||||
|
|
@ -217,6 +217,7 @@ func attach_sticky_note(sticky_note: StickyNote) -> bool:
|
||||||
sticky_note.reparent(self)
|
sticky_note.reparent(self)
|
||||||
sticky_note.position = sticky_note_position
|
sticky_note.position = sticky_note_position
|
||||||
sticky_note.on_board = false
|
sticky_note.on_board = false
|
||||||
|
sticky_note.is_dragable = false
|
||||||
current_sticky_note = sticky_note
|
current_sticky_note = sticky_note
|
||||||
sticky_note.attached_to = self
|
sticky_note.attached_to = self
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue