Update list when user leaves lobby
This commit is contained in:
parent
0bef74cca6
commit
e4839dd7e8
@ -71,6 +71,7 @@ func _on_lobby_chat_update(this_lobby_id: int, change_id: int, making_change_id:
|
||||
print("%s has joined the lobby." % changer_name)
|
||||
|
||||
elif chat_state == Steam.CHAT_MEMBER_STATE_CHANGE_LEFT:
|
||||
user_left_lobby.emit(change_id)
|
||||
print("%s has left the lobby." % changer_name)
|
||||
|
||||
elif chat_state == Steam.CHAT_MEMBER_STATE_CHANGE_KICKED:
|
||||
|
@ -60,10 +60,8 @@ func _on_user_joined_lobby(user_id: int):
|
||||
update()
|
||||
|
||||
func _on_user_left_lobby(user_id: int):
|
||||
for child in user_list_box.get_children():
|
||||
if child.get_node("Username").text == str(user_id):
|
||||
user_list_box.remove_child(child)
|
||||
break
|
||||
added_users.erase(user_id)
|
||||
update()
|
||||
|
||||
|
||||
func update() -> void:
|
||||
|
Loading…
Reference in New Issue
Block a user