X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2FChatState.hpp;fp=src%2Fapp%2FChatState.hpp;h=56f853873b497ed5b1e2321034b066cf46acb23c;hb=54f3f1260b95a924fcb40d9d6de3fa2e2c382f6f;hp=0000000000000000000000000000000000000000;hpb=b49cc8c88caf7d69b35b50e23a40528e71306ade;p=blank.git diff --git a/src/app/ChatState.hpp b/src/app/ChatState.hpp new file mode 100644 index 0000000..56f8538 --- /dev/null +++ b/src/app/ChatState.hpp @@ -0,0 +1,48 @@ +#ifndef BLANK_APP_CHATSTATE_HPP_ +#define BLANK_APP_CHATSTATE_HPP_ + +#include "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