fix #109 enhance card board reliability, workaround free not being available in builds
This commit is contained in:
parent
d364698c1a
commit
1c975fe554
|
|
@ -166,7 +166,7 @@ func add_card(card: Card):
|
|||
|
||||
func add_sticky_note(sticky: StickyNote):
|
||||
var new_panel = StickyNotePanel.new()
|
||||
sticky_note_container.add_child(new_panel, false, Node.INTERNAL_MODE_DISABLED)
|
||||
sticky_note_container.add_child(new_panel, true, Node.INTERNAL_MODE_DISABLED)
|
||||
#WARNING this for some reason would break the tweens
|
||||
new_panel.set_owner(self)
|
||||
sticky.current_handle = self
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ func attatch_sticky_note(attatchment: StickyNote, custom_owner: Node, tween:bool
|
|||
is_attatching = false
|
||||
attatchment.owner = custom_owner
|
||||
attatchment.position = ancor_position
|
||||
attatchment.current_handle = custom_owner
|
||||
|
||||
var is_gapped: bool = false
|
||||
func create_gap():
|
||||
|
|
@ -75,7 +76,7 @@ func clear_if_empty():
|
|||
height_tween.tween_property(self, "custom_minimum_size", Vector2.ZERO, 0.3)
|
||||
await height_tween.finished
|
||||
owner.on_sticky_panel_cleared()
|
||||
self.free()
|
||||
self.queue_free()
|
||||
|
||||
func replace_sticky_note_with(new_sticky_note: StickyNote):
|
||||
if is_empty():
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ func _on_area_enter(card: Area2D):
|
|||
attached_to.create_gap()
|
||||
|
||||
func _on_area_exit(card: Area2D):
|
||||
if hovering_cards != []:
|
||||
if hovering_cards != [] and card is Card:
|
||||
if card in hovering_cards:
|
||||
hovering_cards.erase(card)
|
||||
card.highlighted = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue