mirror of
https://git.neolegacy.dev/neoStudiosLCE/neoLegacy.git
synced 2026-07-18 03:50:49 +00:00
+ Added Magma Block, Nether Wart Block, Bone Block, End Stone Block + All Beetroot Items + Polar Bear (excluding audio) + / now opens chat for commands
42 lines
981 B
C++
42 lines
981 B
C++
#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 int s_chatIndex;
|
|
static const wstring allowedChars;
|
|
static bool isAllowedChatChar(wchar_t c);
|
|
|
|
public:
|
|
ChatScreen();
|
|
ChatScreen(const wstring &initialMessage);
|
|
virtual void init();
|
|
virtual void removed();
|
|
virtual void tick();
|
|
virtual void handlePasteRequest();
|
|
virtual void handleHistoryUp();
|
|
virtual void handleHistoryDown();
|
|
|
|
static int getChatIndex();
|
|
static void correctChatIndex(int newChatIndex);
|
|
static void setWheelValue(int wheel);
|
|
protected:
|
|
void keyPressed(wchar_t ch, int eventKey);
|
|
public:
|
|
void render(int xm, int ym, float a);
|
|
protected:
|
|
void mouseClicked(int x, int y, int buttonNum);
|
|
}; |