Bugfixes + Menu.
This commit is contained in:
parent
1ee6f6cc6d
commit
26ee79c57d
6 changed files with 94 additions and 21 deletions
10
scripts/ui/create_room.gd
Normal file
10
scripts/ui/create_room.gd
Normal file
|
@ -0,0 +1,10 @@
|
|||
extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
if ($VBoxContainer/SendButton as Button).pressed.connect(_on_send_button_pressed):
|
||||
pass
|
||||
|
||||
func _on_send_button_pressed() -> void:
|
||||
Game.username = ($VBoxContainer/UsernameHBox/LineEdit as LineEdit).text
|
||||
Game.roomname = ($VBoxContainer/RoomnameHBox/LineEdit as LineEdit).text
|
||||
Networking.join_room()
|
|
@ -6,11 +6,11 @@ extends Control
|
|||
var label: PackedScene = preload("res://scenes/ui/elements/name_label.tscn")
|
||||
|
||||
func _ready() -> void:
|
||||
if Networking.playerlist_changed.connect(_on_playerlist_changed) != OK:
|
||||
Log.error("FAILED to connect the playerlist_changed signal to _on_playerlist_changed!", "Internal Error: Failed to connect signal.")
|
||||
if Networking.playerlist_changed.connect(_on_playerlist_changed):
|
||||
pass
|
||||
var start_button: Button = $StartButton
|
||||
if start_button.pressed.connect(_on_start_button_pressed) != OK:
|
||||
Log.error("FAILED to connect the pressed signal to _on_start_button_pressed!", "Internal Error: Failed to connect signal.")
|
||||
if start_button.pressed.connect(_on_start_button_pressed):
|
||||
pass
|
||||
_on_playerlist_changed()
|
||||
|
||||
func _on_playerlist_changed() -> void:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue