summaryrefslogtreecommitdiffstats
path: root/src/Event.hpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-10-14 18:40:34 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2018-01-13 03:39:32 +0100
commitabba018da3c2c8011b1485ee8e9e5b2690659c76 (patch)
tree88642b34e91957bbb5e6f05aca4107b512b7b4f2 /src/Event.hpp
parent2017-10-09 (diff)
downloadAltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.gz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.bz2
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.lz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.xz
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.tar.zst
AltCraft-abba018da3c2c8011b1485ee8e9e5b2690659c76.zip
Diffstat (limited to 'src/Event.hpp')
-rw-r--r--src/Event.hpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Event.hpp b/src/Event.hpp
index 9ee445a..d2ddb15 100644
--- a/src/Event.hpp
+++ b/src/Event.hpp
@@ -43,6 +43,8 @@ enum class EventType {
BlockChange,
RendererWorkerTask,
ChunkDeleted,
+ ChatMessageReceived,
+ SendChatMessage,
};
struct EchoData {
@@ -165,13 +167,23 @@ struct ChunkDeletedData {
Vector pos;
};
+struct ChatMessageReceivedData {
+ Chat message;
+ unsigned char position;
+};
+
+struct SendChatMessageData {
+ std::string message;
+};
+
using EventData = std::variant<EchoData, ChunkChangedData, ConnectToServerData, ConnectionSuccessfullData,
DisconnectData, SendPacketData, ReceivePacketData, RequestNetworkClientData, RegisterNetworkClientData,
PlayerConnectedData, RemoveLoadingScreenData, ConnectionFailedData, ExitData, DisconnectedData,
ConnectingData, NetworkClientExceptionData, MouseMovedData, KeyPressedData, KeyReleasedData,
InitalizeSectionRenderData, CreateSectionRenderData, CreatedSectionRenderData, PlayerPosChangedData,
UpdateSectionsRenderData, DeleteSectionRenderData, EntityChangedData,NewRenderDataAvailableData,
- BlockChangeData, RendererWorkerTaskData, ChunkDeletedData>;
+ BlockChangeData, RendererWorkerTaskData, ChunkDeletedData, ChatMessageReceivedData,
+ SendChatMessageData>;
struct Event {
EventType type;