2022-07-22 22:52:54 +03:00
|
|
|
//#ifndef SHOOTER_SHOOTERSERVER_H
|
|
|
|
#ifndef CHAT_H
|
|
|
|
#define CHAT_H
|
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class ChatManager final {
|
|
|
|
private:
|
|
|
|
std::vector<std::string> messages;
|
|
|
|
std::vector<std::string> authors;
|
2022-07-23 00:47:19 +03:00
|
|
|
bool isChatUpdate = true;
|
|
|
|
std::string chatStr = "";
|
2022-07-24 15:30:14 +03:00
|
|
|
std::string chatStrPrev = "";
|
2022-07-22 22:52:54 +03:00
|
|
|
double hide = 0.0;
|
2022-07-24 15:30:14 +03:00
|
|
|
void updateChat();
|
2022-07-22 22:52:54 +03:00
|
|
|
public:
|
|
|
|
void addNewMessage(std::string author, std::string message);
|
|
|
|
int update(double delta);
|
|
|
|
std::string getChat();
|
2022-07-24 15:30:14 +03:00
|
|
|
std::string getChatPreview();
|
2022-07-22 22:52:54 +03:00
|
|
|
};
|
|
|
|
#endif
|