diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Client/ChatScreen.h | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/ChatScreen.h')
| -rw-r--r-- | Minecraft.Client/ChatScreen.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/Minecraft.Client/ChatScreen.h b/Minecraft.Client/ChatScreen.h index d7158478..c4e37a93 100644 --- a/Minecraft.Client/ChatScreen.h +++ b/Minecraft.Client/ChatScreen.h @@ -1,21 +1,33 @@ #pragma once #include "Screen.h" +#include <vector> using namespace std; class ChatScreen : public Screen { protected: wstring message; + int cursorIndex; + void applyHistoryMessage(); + private: int frame; + static const size_t CHAT_HISTORY_MAX = 100; + static std::vector<wstring> s_chatHistory; + static int s_historyIndex; + static wstring s_historyDraft; + static const wstring allowedChars; + static bool isAllowedChatChar(wchar_t c); public: - ChatScreen(); //4J added + ChatScreen(); virtual void init(); - virtual void removed(); - virtual void tick(); -private: - static const wstring allowedChars; + virtual void removed(); + virtual void tick(); + virtual void handlePasteRequest(); + virtual void handleHistoryUp(); + virtual void handleHistoryDown(); + protected: void keyPressed(wchar_t ch, int eventKey); public: |
