diff --git a/project.godot b/project.godot index fe14d46..e0b497c 100644 --- a/project.godot +++ b/project.godot @@ -48,7 +48,6 @@ window/stretch/aspect="expand" [editor] movie_writer/movie_file="E:/Projects/Games/cadastery/build/records/movie.avi" -movie_writer/fps=120 [filesystem] diff --git a/scripts/ui/chat.gd b/scripts/ui/chat.gd index c568ea5..fc177bd 100644 --- a/scripts/ui/chat.gd +++ b/scripts/ui/chat.gd @@ -33,12 +33,14 @@ func _unhandled_input(event: InputEvent) -> void: return if event.is_action_pressed("chat") and not open: - open = true - _message_edit.visible = true - _message_edit.grab_focus() - _msg_scroll.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_AUTO - Input.mouse_mode = Input.MOUSE_MODE_VISIBLE + _open() +func _open()->void: + open = true + _message_edit.visible = true + _message_edit.grab_focus() + _msg_scroll.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_AUTO + Input.mouse_mode = Input.MOUSE_MODE_VISIBLE func _close() -> void: open = false @@ -69,6 +71,7 @@ func _on_message_edit_text_submitted(message: String) -> void: if _message_edit.text == "": return _message_edit.text = "" + _close() _send_message.rpc(message)