![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Helper utility for printing battle messages. More...
#include <MessagePrinter.hpp>
Public Member Functions | |
MessagePrinter (bl::engine::Engine &engine) | |
Construct a new Message Printer utility. More... | |
void | init (bl::rc::scene::CodeScene *scene) |
Initializes the UI components and adds to scene. More... | |
void | setMessage (BattleState &state, const cmd::Message &message) |
Set the message to be printed. More... | |
void | process (input::EntityControl ctrl, bool ignoreDebounce) |
Displays the full message. Call when user presses the continue button. More... | |
bool | messageDone () const |
Returns true when the full message is on display and finishPrint() has been called. More... | |
bool | choseToForget () const |
Returns whether or not the player chose to forget a move. More... | |
bool | choseToSetName () const |
Whether or not the player chose to set a nickname. More... | |
const std::string & | chosenNickname () const |
Returns the nickname chosen by the player. More... | |
void | hide () |
Hides the text once the view is fully synced. More... | |
void | update (float dt) |
Updates the ghost writer. More... | |
void | render (bl::rc::scene::CodeScene::RenderContext &ctx) |
Renders the message. More... | |
Helper utility for printing battle messages.
Definition at line 26 of file MessagePrinter.hpp.
core::battle::view::MessagePrinter::MessagePrinter | ( | bl::engine::Engine & | engine | ) |
Construct a new Message Printer utility.
Definition at line 54 of file MessagePrinter.cpp.
const std::string & core::battle::view::MessagePrinter::chosenNickname | ( | ) | const |
Returns the nickname chosen by the player.
Definition at line 1126 of file MessagePrinter.cpp.
bool core::battle::view::MessagePrinter::choseToForget | ( | ) | const |
Returns whether or not the player chose to forget a move.
Definition at line 1120 of file MessagePrinter.cpp.
bool core::battle::view::MessagePrinter::choseToSetName | ( | ) | const |
Whether or not the player chose to set a nickname.
Definition at line 1122 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::hide | ( | ) |
Hides the text once the view is fully synced.
Definition at line 1072 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::init | ( | bl::rc::scene::CodeScene * | scene | ) |
Initializes the UI components and adds to scene.
scene | The scene to add to |
Definition at line 60 of file MessagePrinter.cpp.
bool core::battle::view::MessagePrinter::messageDone | ( | ) | const |
Returns true when the full message is on display and finishPrint() has been called.
Definition at line 1074 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::process | ( | input::EntityControl | ctrl, |
bool | ignoreDebounce | ||
) |
Displays the full message. Call when user presses the continue button.
ctrl | The control to process |
ignoreDebounce | True to always process, false to rate limit |
Definition at line 1031 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::render | ( | bl::rc::scene::CodeScene::RenderContext & | ctx | ) |
Renders the message.
ctx | The render context |
Definition at line 1098 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::setMessage | ( | BattleState & | state, |
const cmd::Message & | message | ||
) |
Set the message to be printed.
state | The current state of the battle |
message | The message to display |
Definition at line 93 of file MessagePrinter.cpp.
void core::battle::view::MessagePrinter::update | ( | float | dt | ) |
Updates the ghost writer.
dt | Time elapsed in seconds |
Definition at line 1078 of file MessagePrinter.cpp.