Fix text chat functionality#8
Open
urbanawakening wants to merge 1 commit intoMinecraft-Community-Edition:mainfrom
Open
Fix text chat functionality#8urbanawakening wants to merge 1 commit intoMinecraft-Community-Edition:mainfrom
urbanawakening wants to merge 1 commit intoMinecraft-Community-Edition:mainfrom
Conversation
Contributor
|
i did not mean to click dat shit |
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.
What does this PR do?
Fixes the in-game chat system + reimplements the chat renderer.
Input layer:
Screen::injectKeyPressed()public wrapper so the Win64WndProccan forward key events into the active screen's protectedkeyPressed()handler.WM_CHAR(printable characters, Enter) andWM_KEYDOWN(Escape, Backspace, arrows, Tab) fromWndProcto the active screen, returning 0 to consume handled events before they reach gameplay input (g_KBMInput).KeyboardConstFromVK()helper to map Win32 virtual key codes back toKeyboard::KEY_*constants.s_chatKeyWasDown) so it only fires on key-down, not while held.Text editing:
caretPosmember toChatScreenwith full caret-based editing: insert at position, backspace at caret, left/right arrow navigation, and blinking cursor in render.ChatScreen::allowedCharswas an empty copy ofSharedConstants::acceptableLetters— now references the source string directly at runtime.Networking:
PlayerConnection::handleChat(was#if 0): formats messages as<PlayerName> textand broadcasts viaPlayerList::broadcastAll().case ChatPacket::e_ChatCustominClientConnection::handleChatto display incoming raw chat messages.Rendering:
Gui::render()(was#if 0), repositioned from overlapping the health bar to 40px above the toolbar.UIScene_HUD::handleTimerComplete()by zeroing allm_labelChatTextopacities, consolidating chat display into the single Gui.cpp path.Why?
The Win64 port had no working chat. Pressing T would basically softlock you.
How to test
Checklist