Skip to content

Commit

Permalink
fix: reset glossary popup size when clicking a word with a short expl…
Browse files Browse the repository at this point in the history
…anation
  • Loading branch information
EstefaniaTsao committed Mar 8, 2022
1 parent f57fd68 commit d4f91f3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ui/components/GlossaryPopup.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func _ready() -> void:
_interaction_area.connect("mouse_exited", self, "disappear")
_timer.connect("timeout", self, "_on_Timer_timeout")
_tween.connect("tween_all_completed", self, "_on_Tween_tween_all_completed")
_content.connect("resized", self, "_on_Content_resized")


func setup(term: String, bbcode_text: String) -> void:
Expand Down Expand Up @@ -72,4 +73,7 @@ func _on_Tween_tween_all_completed() -> void:
_content.bbcode_text = ""
_panel.hide()
_interaction_area.hide()
_panel.set_deferred("rect_size", _panel.rect_min_size)


func _on_Content_resized() -> void:
_panel.set_deferred("rect_size", _panel.rect_min_size)

0 comments on commit d4f91f3

Please sign in to comment.