diff options
Diffstat (limited to 'logic')
| -rw-r--r-- | logic/popup.gd | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/logic/popup.gd b/logic/popup.gd index 1b1813a..7526678 100644 --- a/logic/popup.gd +++ b/logic/popup.gd @@ -3,15 +3,18 @@ class_name ModalPopup var control : Control +onready var title := get_node("title") as Label +onready var background := get_node("background") as Panel + func _init(): anchor_right = 1.0 anchor_bottom = 1.0 -func popup_control(item: Control): +func popup_control(title: String, item: Control): + self.title.text = title control = item control.connect("visibility_changed", self, "closed") - var background = $background control.anchor_left = background.anchor_left control.anchor_top = background.anchor_top control.anchor_right = background.anchor_right |
