wip implement #96: picking up sticky notes from the card board
This commit is contained in:
parent
e18ae0e473
commit
8c3d7c7abb
|
|
@ -225,6 +225,7 @@ func handle_mouse_button(input: InputEventMouseButton, to_handle = currently_act
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
area.attach_sticky_note(to_handle)
|
area.attach_sticky_note(to_handle)
|
||||||
|
to_handle.z_index = 0
|
||||||
if sticky_note_container.get_child_count() > 0:
|
if sticky_note_container.get_child_count() > 0:
|
||||||
sticky_note_container.get_child(current_sticky_note_id).clear_if_empty()
|
sticky_note_container.get_child(current_sticky_note_id).clear_if_empty()
|
||||||
current_context = NAVIGATE
|
current_context = NAVIGATE
|
||||||
|
|
@ -366,9 +367,8 @@ func _input(event):
|
||||||
current_context = NAVIGATE
|
current_context = NAVIGATE
|
||||||
|
|
||||||
elif event.is_action_pressed("ui_accept"): # select the selected note it
|
elif event.is_action_pressed("ui_accept"): # select the selected note it
|
||||||
var card:Card
|
|
||||||
if dropzone.get_child(current_dropzone_id) is Card:
|
if dropzone.get_child(current_dropzone_id) is Card:
|
||||||
card = dropzone.get_child(current_dropzone_id)
|
var card:Card = dropzone.get_child(current_dropzone_id)
|
||||||
if current_context == ASSIGN: # to assign it to a card
|
if current_context == ASSIGN: # to assign it to a card
|
||||||
if card.has_sticky_note_attached():
|
if card.has_sticky_note_attached():
|
||||||
currently_active_node = card.exchange_sticky_note_with(currently_active_node)
|
currently_active_node = card.exchange_sticky_note_with(currently_active_node)
|
||||||
|
|
@ -392,7 +392,14 @@ func _input(event):
|
||||||
current_sticky_note_id = current_sticky_note_id
|
current_sticky_note_id = current_sticky_note_id
|
||||||
else:
|
else:
|
||||||
current_dropzone_id = current_dropzone_id
|
current_dropzone_id = current_dropzone_id
|
||||||
|
elif dropzone.get_child(current_dropzone_id) is StickyNote:
|
||||||
|
if currently_active_node is StickyNote:
|
||||||
|
currently_active_node = dropzone.get_child(current_dropzone_id)
|
||||||
|
focus_stickies = false
|
||||||
|
current_context = ASSIGN
|
||||||
|
current_dropzone_id += 1
|
||||||
|
currently_active_node.is_dragable = false
|
||||||
|
currently_active_node.z_index = 1
|
||||||
|
|
||||||
# move the note it so it floats next to the card where it should be attached
|
# move the note it so it floats next to the card where it should be attached
|
||||||
func _select_card_for_assigning(sticky_note: Area2D, card: Area2D):
|
func _select_card_for_assigning(sticky_note: Area2D, card: Area2D):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue