-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMessageBox.gd
31 lines (27 loc) · 1.08 KB
/
MessageBox.gd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
extends Panel
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var message = ""
var date = ""
var speaker = ""
# Called when the node enters the scene tree for the first time.
func _ready():
$VBoxContainer/HBoxContainer/date.text = date
$VBoxContainer/HBoxContainer/name.text = speaker
$msg.text = message
set_custom_minimum_size(Vector2(self.rect_size.x,str(message).length() +100))
#self.set("self_modulate", Color(1,1,1,1))
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
#set_custom_minimum_size(Vector2(self.rect_size.x,str(message).length() +100))
#set_size(Vector2(self.rect_size.x,$VBoxContainer/msg.rect_size.y))
#self.set("rect_size.y",$VBoxContainer/msg.rect_size.y + 200)
#self.set("self_modulate", Color(1,1,1,1))
# pass
func _on_msg_size_flags_changed():
#set_custom_minimum_size(Vector2(self.rect_size.x,str(message).length() +100))
#self.rect_size.y = $VBoxContainer/msg.rect_size.y + 200
#self.self_modulate = Color(1,1,1,1)
pass # Replace with function body.