Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes chat re-opening on Sending Message when bound to Enter #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions Scripts/Game/Chat.gd
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,22 @@ func _ready():


func _process(delta) -> void:
if Input.is_action_just_pressed("ui_accept"):
if chatInput.text.length() > 512:
sendChatMsg.disabled = true
else:
sendChatMsg.disabled = false

if Input.is_action_just_pressed("ui_accept") && _focused:
send_chat_message()
return

if Input.is_action_just_pressed("ui_cancel"):
close_chat()
return

if Input.is_action_just_pressed("open_chat") && _focused == false:
if Input.is_action_just_pressed("open_chat") && not _focused:
open_chat()

if chatInput.text.length() > 512:
sendChatMsg.disabled = true
else:
sendChatMsg.disabled = false
return


func open_chat():
Expand Down