2 extends MarginContainer
3 class_name DatingAppMessage
5 @onready var label: RichTextLabel = $MarginContainer/RichTextLabel
6 @onready var background: ColorRect = $ColorRect
8 @export_multiline var text: String:
11 _set_text_properties()
14 @export var sender_color: Color = Color.CORNFLOWER_BLUE
15 @export var receiver_color: Color = Color.LIGHT_CORAL
17 @export var is_sender: bool = true:
20 _set_text_properties()
22 func _ready() -> void:
23 _set_text_properties()
25 func _set_text_properties():
27 background.color = sender_color if is_sender else receiver_color
31 label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT if is_sender else HORIZONTAL_ALIGNMENT_LEFT