Repository navigation
Fix chat focus on blur, whisper/team command clearing, and emoji in the chatbox - #97
Merged
Merged
Conversation
Clipboard managers and emoji pickers take window focus for a moment and then paste or type back into the window. Losing focus used to release the Roblox TextBox and stop SDL text input, so the chatbox closed before the text arrived. Focus loss now only releases held keys, buttons and touches.
TextChatService clears the chat box after "/w name " or "/t ". The editor dropped every echo tombstone on an empty engine update, so the engine's delayed echoes of the typed command were treated as new Lua edits and put the command text back. An empty update now only consumes empty tombstones.
SDL_ttf 3.2's surface text engine sizes each glyph from its outline. Roblox's TwemojiMozilla is a COLR font whose base outlines are empty, so emoji kept their advance but drew nothing and showed up as spaces. After drawing the text, fill any multi-byte cluster that is still blank with TTF_RenderText_Blended, which renders the color layers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three chatbox fixes, one commit each.
Keep the chatbox focused when the window loses focus
Clipboard managers and emoji pickers take window focus briefly, then paste or type back into the window. Losing focus used to release the Roblox TextBox and stop SDL text input, so the chatbox closed before the text arrived. Focus loss now only releases held keys, mouse buttons and touches.
Clear the chatbox after
/w nameand/tTextChatService clears the box when it switches to a whisper or team channel. On an empty update from the engine, the editor threw away its record of the text it had recently sent to Roblox. Roblox echoes that text back late, so after the clear an echo like
/w namelooked like a new edit from the game and put the command back. An empty update now removes only empty entries from that record, so late echoes are still recognised and ignored. Adds a regression test.Draw emoji in the chatbox overlay
Emoji showed up as blank space. SDL_ttf 3.2's surface text engine sizes each glyph from its outline, and Roblox's TwemojiMozilla is a COLR font whose base outlines are empty, so emoji kept their width but drew nothing. After the text is drawn, any multi-byte character whose area is still blank is filled in with
TTF_RenderText_Blended, which draws the color layers.Testing
/wand/tclearing the box, and emoji showing in the chatbox.