resonance 1.0.1
Loading...
Searching...
No Matches
textmsg.h
Go to the documentation of this file.
1#pragma once
2
3#include "msg/message.h"
4#include "os/hxstr.h"
5
23class TextMsg : public Message {
24public:
31 }
32
41 explicit TextMsg(const HxStr &text) : mText(text), mTrackDisplay(0) {
42 }
43
53 static Message *New();
54
62 virtual Message *Clone();
63
71 virtual int Type();
72
80 virtual const char *GetName() const;
81
83
84private:
85 // The one builder stores zero, and Overlay::OnText() shows the text on its first track
86 // display without reading the word. The title is inferred from that pairing.
87 int mTrackDisplay; // +0x0c
88};
89
100extern int g_nTextMsgType;
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:41
virtual int Type()
Report this message's registered identity.
static Message * New()
Produce a default-constructed message on the heap.
HxStr mText
Definition textmsg.h:82
virtual const char * GetName() const
Report this message's class name.
TextMsg()
Construct a message with empty text.
Definition textmsg.h:30
TextMsg(const HxStr &text)
Construct a message showing a string.
Definition textmsg.h:41
virtual Message * Clone()
Produce a heap copy of this message.
int g_nTextMsgType
Identity that TextMsg::Type() reports.