X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fclient%2FInteractiveState.hpp;h=55e03d029f630ddf8481870476546b2677aecd89;hb=80a9a59d71a7b144c12f64cbef4644751bd54745;hp=49c54745f8f88c57b94af1b52d6a7f72fb12fd68;hpb=fcb9cdbbb01dbe4a86981e1529df451d7d5e8256;p=blank.git diff --git a/src/client/InteractiveState.hpp b/src/client/InteractiveState.hpp index 49c5474..55e03d0 100644 --- a/src/client/InteractiveState.hpp +++ b/src/client/InteractiveState.hpp @@ -6,6 +6,7 @@ #include "ChunkReceiver.hpp" #include "NetworkedInput.hpp" +#include "../app/ChatState.hpp" #include "../app/IntervalTimer.hpp" #include "../audio/SoundBank.hpp" #include "../graphics/SkyBox.hpp" @@ -31,7 +32,8 @@ class MasterState; class InteractiveState : public State -, public ClientController { +, public ClientController +, public ChatState::Responder { public: explicit InteractiveState(MasterState &, std::uint32_t player_id); @@ -41,7 +43,11 @@ public: PlayerController &GetPlayerController() noexcept { return input; } ChunkReceiver &GetChunkReceiver() noexcept { return chunk_receiver; } - void OnEnter() override; + void OnResume() override; + void OnPause() override; + + void OnFocus() override; + void OnBlur() override; void Handle(const SDL_Event &) override; void Update(int dt) override; @@ -52,6 +58,7 @@ public: void Handle(const Packet::EntityUpdate &); void Handle(const Packet::PlayerCorrection &); void Handle(const Packet::BlockUpdate &); + void Handle(const Packet::Message &); void SetAudio(bool) override; void SetVideo(bool) override; @@ -59,6 +66,8 @@ public: void SetDebug(bool) override; void Exit() override; + void OnLineSubmit(const std::string &) override; + private: /// flag entity as updated by given packet /// returns false if the update should be ignored @@ -89,6 +98,8 @@ private: }; std::map update_status; + ChatState chat; + }; }