1 #ifndef CORE_BATTLES_VIEW_MESSAGEPRINTER_HPP
2 #define CORE_BATTLES_VIEW_MESSAGEPRINTER_HPP
4 #include <BLIB/Graphics/Triangle.hpp>
5 #include <BLIB/Interfaces/Menu.hpp>
6 #include <BLIB/Interfaces/Utilities/GhostWriter.hpp>
11 #include <SFML/Graphics.hpp>
38 void init(bl::rc::scene::CodeScene* scene);
93 void render(bl::rc::scene::CodeScene::RenderContext& ctx);
107 bl::engine::Engine& engine;
110 bl::interface::GhostWriter writer;
111 bl::gfx::Triangle triangle;
114 bl::menu::TextItem::Ptr yesItem;
120 void makeChoice(
bool forget);
122 void setState(State state);
bl::menu::TriggerDriver< Control::MoveUp, Control::MoveRight, Control::MoveDown, Control::MoveLeft, Control::Interact > MenuDriver
Helper typedef for Peoplemon specific menu driving.
Core classes and functionality for both the editor and game.
std::underlying_type_t< Control::EntityControl > EntityControl
Helper typedef to avoid too much casting boilerplate.
Stores and represents the current state of a battle. This is the base class for local and remote batt...
Represents a message to be displayed. The actual message text is generated by the battle controller.
Helper utility for printing battle messages.
const std::string & chosenNickname() const
Returns the nickname chosen by the player.
void process(input::EntityControl ctrl, bool ignoreDebounce)
Displays the full message. Call when user presses the continue button.
MessagePrinter(bl::engine::Engine &engine)
Construct a new Message Printer utility.
void update(float dt)
Updates the ghost writer.
void hide()
Hides the text once the view is fully synced.
bool messageDone() const
Returns true when the full message is on display and finishPrint() has been called.
void render(bl::rc::scene::CodeScene::RenderContext &ctx)
Renders the message.
bool choseToSetName() const
Whether or not the player chose to set a nickname.
void init(bl::rc::scene::CodeScene *scene)
Initializes the UI components and adds to scene.
bool choseToForget() const
Returns whether or not the player chose to forget a move.
void setMessage(BattleState &state, const cmd::Message &message)
Set the message to be printed.
A screen keyboard for getting arbitrary user input.