X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fshared%2FChatState.hpp;fp=src%2Fshared%2FChatState.hpp;h=7b8a993c6fa0fa782cc6a80387a9b5f7872b75aa;hb=69e4d6c0a86a27f9b3f1297e46c55b36059a24b9;hp=0000000000000000000000000000000000000000;hpb=916cba3b7b9dea6459febb90d24565cf4c0a8b2a;p=blank.git diff --git a/src/shared/ChatState.hpp b/src/shared/ChatState.hpp new file mode 100644 index 0000000..7b8a993 --- /dev/null +++ b/src/shared/ChatState.hpp @@ -0,0 +1,48 @@ +#ifndef BLANK_SHARED_CHATSTATE_HPP_ +#define BLANK_SHARED_CHATSTATE_HPP_ + +#include "../app/State.hpp" + +#include "../ui/TextInput.hpp" + +#include + + +namespace blank { + +class Environment; + +class ChatState +: public State { + +public: + struct Responder { + virtual void OnLineSubmit(const std::string &) = 0; + }; + +public: + ChatState(Environment &env, State &parent, Responder &); + + void OnResume() override; + void OnPause() override; + + void OnResize(Viewport &) override; + + void Handle(const SDL_Event &) override; + void Update(int dt) override; + void Render(Viewport &) override; + + void Quit(); + +private: + Environment &env; + State &parent; + Responder &responder; + + TextInput input; + +}; + +} + +#endif