aboutsummaryrefslogtreecommitdiff
path: root/client/player
diff options
context:
space:
mode:
Diffstat (limited to 'client/player')
-rw-r--r--client/player/chat_bubble.gd19
-rw-r--r--client/player/chat_bubble.tscn4
-rw-r--r--client/player/chat_message.tscn4
-rw-r--r--client/player/controllable_player.gd15
-rw-r--r--client/player/item_bubble.gd2
-rw-r--r--client/player/item_bubble.tscn2
6 files changed, 5 insertions, 41 deletions
diff --git a/client/player/chat_bubble.gd b/client/player/chat_bubble.gd
index 8d6799bd..d71ce5b7 100644
--- a/client/player/chat_bubble.gd
+++ b/client/player/chat_bubble.gd
@@ -17,8 +17,6 @@
class_name ChatBubble
extends MeshInstance3D
-signal submit_message
-
@onready var label: Label = $SubViewport/ChatMessage/Label
@onready var input: LineEdit = $LineEdit
@@ -31,20 +29,3 @@ func set_text(t: String):
func remove_text():
visible = false
label.text = ""
-
-func edit():
- visible = true
- label.text = ""
- editing = true
- input.grab_focus()
-
-func stop_edit():
- visible = false
- editing = false
- input.release_focus()
- if input.text != "":
- submit_message.emit(input.text)
- input.text = ""
-
-func _on_line_edit_text_changed(new_text):
- label.text = new_text
diff --git a/client/player/chat_bubble.tscn b/client/player/chat_bubble.tscn
index 0fb6330f..6124d8b2 100644
--- a/client/player/chat_bubble.tscn
+++ b/client/player/chat_bubble.tscn
@@ -37,8 +37,6 @@ size = Vector2i(512, 128)
modulate = Color(1, 1, 1, 0)
offset_right = 67.0625
offset_bottom = 31.0
-theme_override_styles/normal = SubResource("StyleBoxEmpty_byl28")
theme_override_styles/focus = SubResource("StyleBoxEmpty_byl28")
theme_override_styles/read_only = SubResource("StyleBoxEmpty_byl28")
-
-[connection signal="text_changed" from="LineEdit" to="." method="_on_line_edit_text_changed"]
+theme_override_styles/normal = SubResource("StyleBoxEmpty_byl28")
diff --git a/client/player/chat_message.tscn b/client/player/chat_message.tscn
index 816c9c4f..594e9ec1 100644
--- a/client/player/chat_message.tscn
+++ b/client/player/chat_message.tscn
@@ -14,19 +14,19 @@ base_font = ExtResource("1_3ximm")
variation_embolden = 1.0
[node name="ChatMessage" type="Panel"]
+auto_translate_mode = 2
offset_right = 512.0
offset_bottom = 128.0
-auto_translate = false
theme_override_styles/panel = SubResource("StyleBoxFlat_dpele")
[node name="Label" type="Label" parent="."]
+auto_translate_mode = 2
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
-auto_translate = false
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = SubResource("FontVariation_ecurp")
theme_override_font_sizes/font_size = 40
diff --git a/client/player/controllable_player.gd b/client/player/controllable_player.gd
index ab43b70b..c5180264 100644
--- a/client/player/controllable_player.gd
+++ b/client/player/controllable_player.gd
@@ -47,18 +47,6 @@ func _ready():
)
add_child(onscreen_controls)
super()
- chat_bubble.submit_message.connect(submit_message)
-
-func _input(_event):
- if Input.is_action_just_pressed("chat"):
- if chat_open and not game.menu.covered:
- chat_bubble.stop_edit()
- chat_open = false
- enable_input = true
- elif is_input_enabled():
- chat_bubble.edit()
- chat_open = true
- enable_input = false
const MAX_DT = 1. / 50.
func _process(delta):
@@ -148,9 +136,6 @@ func aabb_point_distance(mi: Vector2, ma: Vector2, p: Vector2) -> float:
func update_position(_new_position: Vector2, _new_rotation: float, _new_boosting: bool):
pass
-func submit_message(text: String):
- game.mp.send_chat(game.player_id, text)
-
func progress(p: float, warn: bool):
super(p, warn)
Input.start_joy_vibration(0, 0.5, 0.1, 0.15)
diff --git a/client/player/item_bubble.gd b/client/player/item_bubble.gd
index 32e353e8..ac71c27e 100644
--- a/client/player/item_bubble.gd
+++ b/client/player/item_bubble.gd
@@ -22,7 +22,7 @@ extends MeshInstance3D
var item: Item
var timeout_remaining := 0.
var timeout_initial := 0.
-var progress_style = preload("res://menu/theme/item_bubble_progress_style.tres")
+var progress_style = preload("res://menu/theme/style/item_bubble_progress_style.tres")
func _init():
progress_style = progress_style.duplicate()
diff --git a/client/player/item_bubble.tscn b/client/player/item_bubble.tscn
index 8189cfc0..f3456908 100644
--- a/client/player/item_bubble.tscn
+++ b/client/player/item_bubble.tscn
@@ -1,7 +1,7 @@
[gd_scene load_steps=9 format=3 uid="uid://cj777mi5nok6c"]
[ext_resource type="Script" path="res://player/item_bubble.gd" id="1_84g24"]
-[ext_resource type="StyleBox" uid="uid://brw8uogdgx2gf" path="res://menu/theme/item_bubble_progress_style.tres" id="2_5qt7f"]
+[ext_resource type="StyleBox" uid="uid://brw8uogdgx2gf" path="res://menu/theme/style/item_bubble_progress_style.tres" id="2_5qt7f"]
[sub_resource type="QuadMesh" id="QuadMesh_tlsxo"]