aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/ChatScreen.h
diff options
context:
space:
mode:
authorKevin <115616336+lag@users.noreply.github.com>2026-03-06 09:52:28 -0600
committerGitHub <noreply@github.com>2026-03-06 09:52:28 -0600
commitea65542c1b63d7ee37025837bf205e55ace0c863 (patch)
tree0ba5abdfdbf055d11bd85a460b98b51f2c9c9904 /Minecraft.Client/ChatScreen.h
parent1755cd58bebf19053c6b4bbf9915b07237e1c14e (diff)
Add Chat / Pastes / Formatting (#682)
* Initial fixes for ContainerSetSlotPacket and CraftItemPacket * Chat: paste, history, ยง formatting, 1-9 block when open (Windows64) Made-with: Cursor * static_cast refactor
Diffstat (limited to 'Minecraft.Client/ChatScreen.h')
-rw-r--r--Minecraft.Client/ChatScreen.h22
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: