diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-12-04 14:23:42 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-12-04 14:23:42 +0100 |
commit | 688790b5dc0ea8f51a99e42a00c7510b9bd87aa6 (patch) | |
tree | 71c04c9f401c67caf5c1ea3f56c7360ac1d14b86 /login.gd | |
parent | 2bf6b303fc062a800afb784877d989686287a2a7 (diff) |
next commit
Diffstat (limited to 'login.gd')
-rw-r--r-- | login.gd | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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 |