fix: card picker didn't close.
This commit is contained in:
parent
fea0d24dc3
commit
ded3a2624a
|
|
@ -243,7 +243,6 @@ func create_dev_board(parent: Control, _rect: Rect2) -> void:
|
||||||
card.add_child(sticky, false, Node.INTERNAL_MODE_BACK)
|
card.add_child(sticky, false, Node.INTERNAL_MODE_BACK)
|
||||||
sticky.position = card.sticky_note_position + Vector2(0, 80) * z
|
sticky.position = card.sticky_note_position + Vector2(0, 80) * z
|
||||||
z += 1
|
z += 1
|
||||||
|
|
||||||
y += 1
|
y += 1
|
||||||
|
|
||||||
panel.custom_minimum_size.x = source_dicts.size() * 256
|
panel.custom_minimum_size.x = source_dicts.size() * 256
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,6 @@ func pull_save_state(_save: SaveGame) -> void:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
func save_room():
|
func save_room():
|
||||||
pull_save_state(save_game)
|
|
||||||
save_game.save_to_file(get_tree().root.get_texture())
|
save_game.save_to_file(get_tree().root.get_texture())
|
||||||
|
|
||||||
func prepare_transition():
|
func prepare_transition():
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,8 @@ func get_save_dict() -> Dictionary:
|
||||||
if child.picked_random:
|
if child.picked_random:
|
||||||
randoms.append(child.name)
|
randoms.append(child.name)
|
||||||
|
|
||||||
if child.has_sticky_note_attached():
|
var note : StickyNote = child.get_attached_sticky_note()
|
||||||
|
if note:
|
||||||
# Saves Card Name as position of it's children.
|
# Saves Card Name as position of it's children.
|
||||||
stickies[child.get_attached_sticky_note().name] = child.name
|
stickies[child.get_attached_sticky_note().name] = child.name
|
||||||
if child.get_attached_sticky_note().picked_random:
|
if child.get_attached_sticky_note().picked_random:
|
||||||
|
|
|
||||||
|
|
@ -134,6 +134,8 @@ var mouse_offset: Vector2
|
||||||
func init(card_name: String = "card", own_id:StringName = "-1") -> void:
|
func init(card_name: String = "card", own_id:StringName = "-1") -> void:
|
||||||
if card_name != "c_void":
|
if card_name != "c_void":
|
||||||
text = card_name
|
text = card_name
|
||||||
|
if !card_name.begins_with("c"):
|
||||||
|
push_error("Illegal card.")
|
||||||
card_id = own_id
|
card_id = own_id
|
||||||
name = card_name
|
name = card_name
|
||||||
|
|
||||||
|
|
@ -232,7 +234,11 @@ func has_sticky_note_attached() -> bool:
|
||||||
return get_child_count(false) > 0
|
return get_child_count(false) > 0
|
||||||
|
|
||||||
func get_attached_sticky_note() -> StickyNote:
|
func get_attached_sticky_note() -> StickyNote:
|
||||||
return null if not has_sticky_note_attached() else get_child(0)
|
for child in get_children(false):
|
||||||
|
if child is StickyNote:
|
||||||
|
return child
|
||||||
|
return null
|
||||||
|
|
||||||
|
|
||||||
func preview_sticky_note(sticky_note: StickyNote):
|
func preview_sticky_note(sticky_note: StickyNote):
|
||||||
sticky_note.reparent(self.get_parent())
|
sticky_note.reparent(self.get_parent())
|
||||||
|
|
|
||||||
|
|
@ -247,3 +247,4 @@ func pick_cards(id: Scenes.id, repeat: bool):
|
||||||
if id == Scenes.id.YOUTH_DRAVEN and not repeat:
|
if id == Scenes.id.YOUTH_DRAVEN and not repeat:
|
||||||
$Meaning.play()
|
$Meaning.play()
|
||||||
await cards_picked
|
await cards_picked
|
||||||
|
hide()
|
||||||
|
|
|
||||||
|
|
@ -1774,17 +1774,6 @@ libraries = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Card" parent="cards/card_1" instance=ExtResource("2_t7byf")]
|
[node name="Card" parent="cards/card_1" instance=ExtResource("2_t7byf")]
|
||||||
picked_random = null
|
|
||||||
wiggle_strength = null
|
|
||||||
wiggle_speed = null
|
|
||||||
scale_bump = null
|
|
||||||
bounce_speed = null
|
|
||||||
highlighted = null
|
|
||||||
is_dragable = null
|
|
||||||
diameter = null
|
|
||||||
burn_progress = null
|
|
||||||
burn_state = null
|
|
||||||
direction = null
|
|
||||||
|
|
||||||
[node name="card_2" type="Control" parent="cards"]
|
[node name="card_2" type="Control" parent="cards"]
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
@ -1795,17 +1784,6 @@ libraries = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Card" parent="cards/card_2" instance=ExtResource("2_t7byf")]
|
[node name="Card" parent="cards/card_2" instance=ExtResource("2_t7byf")]
|
||||||
picked_random = null
|
|
||||||
wiggle_strength = null
|
|
||||||
wiggle_speed = null
|
|
||||||
scale_bump = null
|
|
||||||
bounce_speed = null
|
|
||||||
highlighted = null
|
|
||||||
is_dragable = null
|
|
||||||
diameter = null
|
|
||||||
burn_progress = null
|
|
||||||
burn_state = null
|
|
||||||
direction = null
|
|
||||||
|
|
||||||
[node name="card_3" type="Control" parent="cards"]
|
[node name="card_3" type="Control" parent="cards"]
|
||||||
anchors_preset = 0
|
anchors_preset = 0
|
||||||
|
|
@ -1821,17 +1799,6 @@ libraries = {
|
||||||
}
|
}
|
||||||
|
|
||||||
[node name="Card" parent="cards/card_3" instance=ExtResource("2_t7byf")]
|
[node name="Card" parent="cards/card_3" instance=ExtResource("2_t7byf")]
|
||||||
picked_random = null
|
|
||||||
wiggle_strength = null
|
|
||||||
wiggle_speed = null
|
|
||||||
scale_bump = null
|
|
||||||
bounce_speed = null
|
|
||||||
highlighted = null
|
|
||||||
is_dragable = null
|
|
||||||
diameter = null
|
|
||||||
burn_progress = null
|
|
||||||
burn_state = null
|
|
||||||
direction = null
|
|
||||||
|
|
||||||
[node name="sticky_notes" type="Panel" parent="."]
|
[node name="sticky_notes" type="Panel" parent="."]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue