32 lines
991 B
Plaintext
32 lines
991 B
Plaintext
extends Control
|
|
|
|
@onready var debugbtn : Button = $/root/Main/Mainmenu/Menu/MarginContainer/VBoxContainer/HBoxContainer/VBoxLobbylist/RefreshLobbies
|
|
@onready var main : Control = $/root/Main
|
|
func _on_start_pressed() -> void:
|
|
main.on_Start_pressed()
|
|
|
|
func _on_connect_pressed() -> void:
|
|
main.on_Connect_pressed()
|
|
|
|
|
|
func _on_disconnect_pressed() -> void:
|
|
if Steamworks.lobby_members.size() > 1:
|
|
Steam.leaveLobby(Steamworks.lobby_id)
|
|
Steamworks.create_lobby()
|
|
main.on_Disconnect_pressed()
|
|
|
|
func _on_lobby_list_item_activated(index: int) -> void:
|
|
Steamworks.leave_lobby()
|
|
var lobby_id = Steamworks.lobby_index_list.get(index)
|
|
Steamworks.join_lobby(lobby_id)
|
|
|
|
func _on_refresh_lobbies_pressed() -> void:
|
|
Steamworks.render_global_lobbies()
|
|
|
|
func _on_lobby_member_list_item_activated(index: int) -> void:
|
|
print("You clicked on: " + Steam.getFriendPersonaName(Steamworks.member_index_list.get(index)))
|
|
|
|
|
|
func _on_refresh_lobbies_2_pressed() -> void:
|
|
pass # Replace with function body.
|