aboutsummaryrefslogtreecommitdiff
path: root/client/menu/chat/chat_message.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-08-29 15:17:33 +0200
committertpart <tpart120@proton.me>2024-08-29 15:17:33 +0200
commit890e7eafa7cb8ce8ad5022013f7f71c74b51e3b4 (patch)
tree6293da08a2e05f2a5142dfbb57a133ae8efafd0a /client/menu/chat/chat_message.gd
parent6c74fe5c8a74031a4bfcbfc73a7fcd008af7554c (diff)
downloadhurrycurry-890e7eafa7cb8ce8ad5022013f7f71c74b51e3b4.tar
hurrycurry-890e7eafa7cb8ce8ad5022013f7f71c74b51e3b4.tar.bz2
hurrycurry-890e7eafa7cb8ce8ad5022013f7f71c74b51e3b4.tar.zst
Refactor chat message code
Diffstat (limited to 'client/menu/chat/chat_message.gd')
-rw-r--r--client/menu/chat/chat_message.gd10
1 files changed, 6 insertions, 4 deletions
diff --git a/client/menu/chat/chat_message.gd b/client/menu/chat/chat_message.gd
index 99a4a520..1cc57102 100644
--- a/client/menu/chat/chat_message.gd
+++ b/client/menu/chat/chat_message.gd
@@ -13,14 +13,16 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
-extends PanelContainer
+extends HBoxContainer
class_name ChatMessage
-@onready var fade_away_timer = $FadeAway
+@onready var fade_away_timer: Timer = $FadeAway
+@onready var sender_label: Label = $Sender
+@onready var message_label: Label = $Message
func set_message(username: String, message: String, fade_away: bool = false, fade_time: float = 5.):
- $VBox/Sender.text = username
- $VBox/Message.text = message
+ sender_label.text = username
+ message_label.text = message
if fade_away:
fade_away_timer.start(fade_time)