aboutsummaryrefslogtreecommitdiff
path: root/client/menu/communicate/chat
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu/communicate/chat')
-rw-r--r--client/menu/communicate/chat/chat_message.gd32
-rw-r--r--client/menu/communicate/chat/chat_message.gd.uid1
-rw-r--r--client/menu/communicate/chat/chat_message.tscn37
-rw-r--r--client/menu/communicate/chat/chat_open.gd48
-rw-r--r--client/menu/communicate/chat/chat_open.gd.uid1
-rw-r--r--client/menu/communicate/chat/chat_open.tscn55
-rw-r--r--client/menu/communicate/chat/chat_preview.gd34
-rw-r--r--client/menu/communicate/chat/chat_preview.gd.uid1
-rw-r--r--client/menu/communicate/chat/chat_preview.tscn39
9 files changed, 0 insertions, 248 deletions
diff --git a/client/menu/communicate/chat/chat_message.gd b/client/menu/communicate/chat/chat_message.gd
deleted file mode 100644
index ce3dd0ca..00000000
--- a/client/menu/communicate/chat/chat_message.gd
+++ /dev/null
@@ -1,32 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# 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 VBoxContainer
-class_name ChatMessage
-
-@onready var fade_away_timer: Timer = $FadeAway
-@onready var sender_label: Label = $Sender
-@onready var message_label: Label = $MarginContainer/Message
-
-func set_message(username: String, message: String, username_color: Color, fade_away: bool = false, fade_time: float = 5.):
- sender_label.text = "<%s>" % username
- message_label.text = message
- sender_label.add_theme_color_override("font_color", username_color.lightened(.5))
-
- if fade_away:
- fade_away_timer.start(fade_time)
-
-func _on_fade_away_timeout() -> void:
- queue_free()
diff --git a/client/menu/communicate/chat/chat_message.gd.uid b/client/menu/communicate/chat/chat_message.gd.uid
deleted file mode 100644
index f1c4ff05..00000000
--- a/client/menu/communicate/chat/chat_message.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://6rprqelfdp3
diff --git a/client/menu/communicate/chat/chat_message.tscn b/client/menu/communicate/chat/chat_message.tscn
deleted file mode 100644
index 43930670..00000000
--- a/client/menu/communicate/chat/chat_message.tscn
+++ /dev/null
@@ -1,37 +0,0 @@
-[gd_scene load_steps=4 format=3 uid="uid://bpc2qgsvcafhe"]
-
-[ext_resource type="Script" uid="uid://6rprqelfdp3" path="res://menu/communicate/chat/chat_message.gd" id="1_ey0qp"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme/theme.tres" id="1_rx6vg"]
-
-[sub_resource type="FontVariation" id="FontVariation_jfhbh"]
-variation_embolden = 1.3
-
-[node name="ChatMessage" type="VBoxContainer"]
-offset_right = 72.0
-offset_bottom = 192.0
-theme = ExtResource("1_rx6vg")
-script = ExtResource("1_ey0qp")
-
-[node name="Sender" type="Label" parent="."]
-layout_mode = 2
-theme_override_fonts/font = SubResource("FontVariation_jfhbh")
-text = "<Name>"
-
-[node name="FadeAway" type="Timer" parent="."]
-one_shot = true
-
-[node name="MarginContainer" type="MarginContainer" parent="."]
-layout_mode = 2
-theme_override_constants/margin_left = 10
-theme_override_constants/margin_top = 0
-theme_override_constants/margin_right = 0
-theme_override_constants/margin_bottom = 5
-
-[node name="Message" type="Label" parent="MarginContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-text = "Message"
-vertical_alignment = 1
-autowrap_mode = 3
-
-[connection signal="timeout" from="FadeAway" to="." method="_on_fade_away_timeout"]
diff --git a/client/menu/communicate/chat/chat_open.gd b/client/menu/communicate/chat/chat_open.gd
deleted file mode 100644
index 150b0e7e..00000000
--- a/client/menu/communicate/chat/chat_open.gd
+++ /dev/null
@@ -1,48 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# 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 Menu
-class_name ChatOpen
-
-const CHAT_MESSAGE_SCENE = preload("res://menu/communicate/chat/chat_message.tscn")
-
-@onready var messages_container: VBoxContainer = $PanelContainer/MarginContainer/VBoxContainer/ScrollContainerCustom/Messages
-@onready var scroll_container: ScrollContainerCustom = $PanelContainer/MarginContainer/VBoxContainer/ScrollContainerCustom
-@onready var line: LineEdit = $PanelContainer/MarginContainer/VBoxContainer/LineEdit
-@onready var game_menu: GameMenu = get_parent()
-@onready var game: Game = game_menu.game
-
-func _ready() -> void:
- super()
- for i in game.text_message_history:
- add_message(i)
-
- game.text_message.connect(
- func message(m: Game.TextMessage):
- add_message(m)
- )
-
-func _input(event: InputEvent) -> void:
- if Input.is_action_just_pressed("chat"):
- if line.text != "":
- game.mp.send_chat(game.my_player_id, line.text)
- exit()
- super(event)
-
-func add_message(message: Game.TextMessage):
- var chat_message: ChatMessage = CHAT_MESSAGE_SCENE.instantiate()
- messages_container.add_child(chat_message)
- chat_message.set_message(message.username, message.text, message.color)
- scroll_container.call_deferred("scroll_to_bottom")
diff --git a/client/menu/communicate/chat/chat_open.gd.uid b/client/menu/communicate/chat/chat_open.gd.uid
deleted file mode 100644
index 672792c0..00000000
--- a/client/menu/communicate/chat/chat_open.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://cfweimyoq5vv0
diff --git a/client/menu/communicate/chat/chat_open.tscn b/client/menu/communicate/chat/chat_open.tscn
deleted file mode 100644
index f161f210..00000000
--- a/client/menu/communicate/chat/chat_open.tscn
+++ /dev/null
@@ -1,55 +0,0 @@
-[gd_scene load_steps=7 format=3 uid="uid://dbd6k56l4p0ls"]
-
-[ext_resource type="Script" uid="uid://cfweimyoq5vv0" path="res://menu/communicate/chat/chat_open.gd" id="1_dsl4a"]
-[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/materials/dark_blur_material.tres" id="1_isqmk"]
-[ext_resource type="Script" uid="uid://cmncjc06kadpe" path="res://menu/auto_setup/blur_setup.gd" id="2_urbd2"]
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme/theme.tres" id="3_v7xmg"]
-[ext_resource type="StyleBox" uid="uid://bw4jamyna1top" path="res://menu/theme/style/panel_style_sidebar.tres" id="4_ew1yx"]
-[ext_resource type="Script" uid="uid://bd7bylb2t2m0" path="res://menu/auto_setup/scroll_container_custom.gd" id="5_3mths"]
-
-[node name="ChatOpen" type="Control"]
-layout_mode = 3
-anchors_preset = 9
-anchor_bottom = 1.0
-offset_right = 296.0
-grow_vertical = 2
-script = ExtResource("1_dsl4a")
-support_anim = false
-
-[node name="PanelContainer" type="PanelContainer" parent="."]
-material = ExtResource("1_isqmk")
-layout_mode = 1
-anchors_preset = 9
-anchor_bottom = 1.0
-offset_right = 296.0
-grow_vertical = 2
-theme = ExtResource("3_v7xmg")
-theme_override_styles/panel = ExtResource("4_ew1yx")
-script = ExtResource("2_urbd2")
-
-[node name="MarginContainer" type="MarginContainer" parent="PanelContainer"]
-layout_mode = 2
-
-[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer"]
-layout_mode = 2
-size_flags_horizontal = 3
-size_flags_vertical = 3
-theme_override_constants/separation = 0
-
-[node name="ScrollContainerCustom" type="ScrollContainer" parent="PanelContainer/MarginContainer/VBoxContainer"]
-material = ExtResource("1_isqmk")
-layout_mode = 2
-size_flags_horizontal = 3
-size_flags_vertical = 3
-script = ExtResource("5_3mths")
-auto_scroll_to_bottom = true
-
-[node name="Messages" type="VBoxContainer" parent="PanelContainer/MarginContainer/VBoxContainer/ScrollContainerCustom"]
-layout_mode = 2
-size_flags_horizontal = 3
-size_flags_vertical = 3
-
-[node name="LineEdit" type="LineEdit" parent="PanelContainer/MarginContainer/VBoxContainer" groups=["autoselect"]]
-layout_mode = 2
-placeholder_text = "c.chat.write_message"
-keep_editing_on_text_submit = true
diff --git a/client/menu/communicate/chat/chat_preview.gd b/client/menu/communicate/chat/chat_preview.gd
deleted file mode 100644
index e41c0b15..00000000
--- a/client/menu/communicate/chat/chat_preview.gd
+++ /dev/null
@@ -1,34 +0,0 @@
-# Hurry Curry! - a game about cooking
-# Copyright (C) 2025 Hurry Curry! contributors
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, version 3 of the License only.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# 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 Control
-class_name ChatPreview
-
-const CHAT_MESSAGE_SCENE = preload("res://menu/communicate/chat/chat_message.tscn")
-
-@onready var game: Game = $"../Game"
-@onready var messages_container: VBoxContainer = $MarginContainer/ScrollContainer/PanelContainer/Messages
-
-func _ready():
- game.text_message.connect(func(message: Game.TextMessage):
- var chat_message: ChatMessage = CHAT_MESSAGE_SCENE.instantiate()
- messages_container.add_child(chat_message)
- chat_message.set_message(
- message.username,
- message.text,
- message.color,
- true,
- message.timeout_remaining)
- )
diff --git a/client/menu/communicate/chat/chat_preview.gd.uid b/client/menu/communicate/chat/chat_preview.gd.uid
deleted file mode 100644
index 7a372630..00000000
--- a/client/menu/communicate/chat/chat_preview.gd.uid
+++ /dev/null
@@ -1 +0,0 @@
-uid://bgt04y4ncl1fv
diff --git a/client/menu/communicate/chat/chat_preview.tscn b/client/menu/communicate/chat/chat_preview.tscn
deleted file mode 100644
index bd3c8ffa..00000000
--- a/client/menu/communicate/chat/chat_preview.tscn
+++ /dev/null
@@ -1,39 +0,0 @@
-[gd_scene load_steps=5 format=3 uid="uid://xcxbmynn8mhi"]
-
-[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme/theme.tres" id="1_x8ock"]
-[ext_resource type="Script" uid="uid://bgt04y4ncl1fv" path="res://menu/communicate/chat/chat_preview.gd" id="2_72x70"]
-[ext_resource type="Material" uid="uid://beea1pc5nt67r" path="res://menu/theme/materials/dark_blur_material.tres" id="4_jo1xn"]
-[ext_resource type="Script" uid="uid://cmncjc06kadpe" path="res://menu/auto_setup/blur_setup.gd" id="5_1l77s"]
-
-[node name="ChatPreview" type="Control"]
-layout_mode = 3
-anchors_preset = 15
-anchor_right = 1.0
-anchor_bottom = 1.0
-grow_horizontal = 2
-grow_vertical = 2
-mouse_filter = 2
-theme = ExtResource("1_x8ock")
-script = ExtResource("2_72x70")
-
-[node name="MarginContainer" type="MarginContainer" parent="."]
-layout_mode = 2
-anchor_bottom = 1.0
-offset_right = 296.0
-grow_vertical = 2
-
-[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer"]
-layout_mode = 2
-horizontal_scroll_mode = 0
-
-[node name="PanelContainer" type="PanelContainer" parent="MarginContainer/ScrollContainer"]
-material = ExtResource("4_jo1xn")
-layout_mode = 2
-size_flags_horizontal = 3
-size_flags_vertical = 0
-mouse_filter = 2
-script = ExtResource("5_1l77s")
-
-[node name="Messages" type="VBoxContainer" parent="MarginContainer/ScrollContainer/PanelContainer"]
-layout_mode = 2
-mouse_filter = 2