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
This commit is contained in:
Kevin
2026-03-06 09:52:28 -06:00
committed by GitHub
parent 1755cd58be
commit ea65542c1b
16 changed files with 456 additions and 150 deletions

View File

@@ -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: