#ifndef SIGN_H_B0491849 #define SIGN_H_B0491849 #include #include #include #include "interpolation.h" #include "timer.h" class Game; enum class SignInstructionState { Hidden, FadingIn, Visible, FadingOut }; struct SignLine { std::string text; bool pause = false; int charsRevealed = 0; }; class Sign { public: explicit Sign(TTF_Font* font) : font_(font) {} void displayMessage(std::string text); void update(size_t dt, Game& game); SignInstructionState signDisplayState = SignInstructionState::Hidden; Interpolation signDisplayFade; std::list lines; std::list linesToShow; private: TTF_Font* font_; Timer textAdvTimer_ { 15 }; }; #endif /* end of include guard: SIGN_H_B0491849 */