summary refs log tree commit diff stats
path: root/src/message_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/message_system.h')
-rw-r--r--src/message_system.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/message_system.h b/src/message_system.h index 153805a..18dd299 100644 --- a/src/message_system.h +++ b/src/message_system.h
@@ -33,7 +33,10 @@ public:
33 33
34 void hideCutsceneBars(); 34 void hideCutsceneBars();
35 35
36 void displayMessage(std::string_view msg, SpeakerType speaker); 36 void displayMessage(
37 std::string_view msg,
38 std::string speakerName = "",
39 SpeakerType speakerType = SpeakerType::None);
37 40
38 void advanceText(); 41 void advanceText();
39 42
@@ -48,6 +51,8 @@ public:
48 51
49 const std::list<MessageLine>& getLines() const { return linesToShow_; } 52 const std::list<MessageLine>& getLines() const { return linesToShow_; }
50 53
54 const std::string& getSpeaker() const { return speakerName_; }
55
51private: 56private:
52 57
53 enum class BarsState { 58 enum class BarsState {
@@ -62,6 +67,7 @@ private:
62 double accum_ = 0.0; 67 double accum_ = 0.0;
63 double length_ = 1000.0/8; 68 double length_ = 1000.0/8;
64 SpeakerType speaker_ = SpeakerType::None; 69 SpeakerType speaker_ = SpeakerType::None;
70 std::string speakerName_;
65 std::list<std::string> lines_; 71 std::list<std::string> lines_;
66 std::list<MessageLine> linesToShow_; 72 std::list<MessageLine> linesToShow_;
67 Timer textAdvTimer_ { 10 }; 73 Timer textAdvTimer_ { 10 };