Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Projets-INFO4
21-22
20
Godot3ChatNetwork
Commits
96b8681e
Commit
96b8681e
authored
Mar 29, 2022
by
Lucas Zaffuto
Browse files
correction de l'affichage du texte et augmentation de la limitede clients
parent
d40b9e5f
Changes
3
Hide whitespace changes
Inline
Side-by-side
scenes/setup.tscn
View file @
96b8681e
...
...
@@ -94,9 +94,10 @@ margin_bottom = 284.0
text = "Send"
[node name="chatlist" type="Label" parent="Chat"]
margin_top =
2
.0
margin_top =
-4793
.0
margin_right = 1025.0
margin_bottom = 445.0
valign = 2
__meta__ = {
"_edit_use_anchors_": false
}
...
...
scripts/Network.gd
View file @
96b8681e
extends
Node
const
DEFAULT_PORT
=
25565
const
MAX_CLIENTS
=
2
const
MAX_CLIENTS
=
5
var
server
=
null
var
client
=
null
...
...
scripts/Network_setup.gd
View file @
96b8681e
...
...
@@ -59,6 +59,7 @@ func _player_disconnected(id) -> void:
func
_on_send_pressed
():
if
message
.
text
!=
null
:
rpc
(
"send"
,
message
.
text
)
chatlist
.
text
=
chatlist
.
text
+
info
.
name
+
" : "
+
message
.
text
+
"
\n
"
var
msg
=
info
.
name
+
" : "
+
message
.
text
rpc
(
"send"
,
msg
)
chatlist
.
text
=
chatlist
.
text
+
msg
+
"
\n
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment