30 - simple TextChat #43
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
wontfix
No Milestone
No project
No Assignees
1 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: unfa/liblast#43
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Solves #30
Implements a simple TextChat that uses a
sync
variable to fill a chat history.Features:
Y
enter
enter
y
Other changes:
Now the player input is in an
_inhandled_input
callback instead of_input
. We usually have to do this so any Control node that captures an input prevents the player from moving. Also, in the functionwalk
we check if the input was handled before.The
LineEdit
should mark ALL keyboard inputs as handled before they get to the player node, but it doesn't happen consistently. So I had to make a workaround marking them manually in the_unhandled_input
in the TextChat script.Now that the player input is under
_unhandled_input
I had to set the mouse filter as ignore for the player HUD and children because they were handling mouse moves.Current state:
https://user-images.githubusercontent.com/15899938/114277808-30d86700-9a03-11eb-8013-77f3d3830f60.mp4
It looks like I'm the only one trimming white space. Do you guys actually prefer this whitespace there? I'll not disrupt any patterns you have. I think most devs prefer to trim them, but I might be wrong. If you didn't know you can enable trimming in the Editor settings enabling this option in Text Editor > Files.
Hey! Thank you for your awesome contribution! I think we should merge your PR very soon. Honestly @CombustibleLemonade is better qualified than me to review it ;)
Also - I am not sure what do you mean by trimming white space - do you mean: remove excessive white space from chat messages, or is this a coding style thing?
Code styling thing. Remove white space in empty lines and end of line if there's any. This avoids pointless changes in the git history and saves a little tiny bit of space in disk (not that tiny in large codebases, not our case here)
Thank you for your work! There's one bug I found when testing: the chat history remains visible after disconnecting. Though, I'm not even sure if that's a bug or a feature, but we can fix it later when the need may arise. Trimming whitespace, and other standardization efforts for coding style are probably a good idea - maybe I should create a coding style document.
I just found something that's different from how it's shown in your example screencapture - on my end the text chat always disappears when entering character select mode. Did you change that?
Yes! I noticed and fixed it. It was certainly a bug. We adjust this kind of behavior later, maybe we want the chat open when on character select mode. To do this we would have to move the function I put into the show_menus elsewhere.
This is awesome! We've tested it and it's very nice!
I can think of a few improvements: