diff options
| author | dam <dam@gudinoff> | 2022-03-28 16:26:50 +0000 |
|---|---|---|
| committer | dam <dam@gudinoff> | 2022-03-28 16:26:50 +0000 |
| commit | 9083809865719e443b8c85af0f4a517e7b2742e1 (patch) | |
| tree | 2750503a08ccc93c3108f7335f6251e107f0203b /logic/popup.gd | |
| parent | a34abdedf2feebcd17e402d9ed650a7cd17cbfe9 (diff) | |
| download | surgery-log-9083809865719e443b8c85af0f4a517e7b2742e1.tar.zst surgery-log-9083809865719e443b8c85af0f4a517e7b2742e1.zip | |
Add title on popup control and use it to display the option sets placeholder texts.
Diffstat (limited to 'logic/popup.gd')
| -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 |
