summaryrefslogtreecommitdiff
path: root/login.gd
diff options
context:
space:
mode:
Diffstat (limited to 'login.gd')
-rw-r--r--login.gd9
1 files changed, 8 insertions, 1 deletions
diff --git a/login.gd b/login.gd
index 8d8e945..c00e3cf 100644
--- a/login.gd
+++ b/login.gd
@@ -9,16 +9,19 @@ var current_character_information: CharacterInformation
func _ready() -> void:
switch_screen(%Login)
+ $AudioStreamPlayer2.play()
func switch_screen(screen: Node):
for node in get_children():
- node.visible = false
+ if node is Control:
+ node.visible = false
screen.visible = true
func _on_login_pressed() -> void:
+ $AudioStreamPlayer.play()
Network.login_server.login(%Username.text, %Password.text)
account_information = await Network.login_server.logged_in
@@ -29,6 +32,7 @@ func _on_login_pressed() -> void:
for info: CharacterServerInformation in character_server_information:
var select_character_server = Button.new()
+ select_character_server.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
select_character_server.text = info.server_name
select_character_server.pressed.connect(_on_character_server_login_pressed.bind(info))
%CharacterServerList.add_child(select_character_server)
@@ -37,6 +41,7 @@ func _on_login_pressed() -> void:
func _on_character_server_login_pressed(character_server_info: CharacterServerInformation) -> void:
+ $AudioStreamPlayer.play()
Network.character_server = CharacterServer.new(
character_server_info.get_server_ip(),
character_server_info.server_port
@@ -55,6 +60,7 @@ func _on_character_server_login_pressed(character_server_info: CharacterServerIn
for slot_idx in response.character_information.size():
var info: CharacterInformation = response.character_information[slot_idx]
var character = Button.new()
+ character.mouse_default_cursor_shape = Control.CURSOR_POINTING_HAND
character.text = info.name
character.pressed.connect(func():
current_character_information = info
@@ -66,6 +72,7 @@ func _on_character_server_login_pressed(character_server_info: CharacterServerIn
func _on_character_selected_pressed(slot_idx: int):
+ $AudioStreamPlayer.play()
Network.character_server.select_character(slot_idx)
var packet = await Network.character_server.selected_character