@tool extends MarginContainer class_name DatingAppMessage @onready var label: RichTextLabel = $MarginContainer/RichTextLabel @onready var background: ColorRect = $ColorRect @export_multiline var text: String: set(s): text = s _set_text_properties() # text message colors @export var sender_color: Color = Color.CORNFLOWER_BLUE @export var receiver_color: Color = Color.LIGHT_CORAL @export var is_sender: bool = true: set(b): is_sender = b _set_text_properties() func _ready() -> void: _set_text_properties() func _set_text_properties(): if background: background.color = sender_color if is_sender else receiver_color if label: label.text = text label.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT if is_sender else HORIZONTAL_ALIGNMENT_LEFT