|
resonance 1.0.1
|
One animated text message of the head-up display. More...
#include <hudtextmessage.h>

Public Member Functions | |
| HudTextMessage (const HxStr &name) | |
| Resolve the message's objects and hide it. | |
| ~HudTextMessage () | |
| Restore the font's size. | |
| void | Show (const HxStr &text, float flScale, float flHold) |
| Start showing one text unless a message is already active. | |
| void | Hide () |
| Hide the text at once and mark the message inactive. | |
| void | SetFrame (float flTime) |
| Advance the fade animation, hiding the text once it has faded out. | |
Public Attributes | |
| Rnd::Text * | mText |
| The text, <name>.txt. | |
| int | mActive |
| Non-zero while a message is active. | |
One animated text message of the head-up display.
The class is not polymorphic and emits no RTTI. No descriptor, tag, or file path identifies it, and its name is inferred from the three objects it resolves, <name>.blur, <name>.txt, and <name>.tnm. HudTrack embeds one at +0x28 under the name <layout> textmsg<n>, and HudWinMessage embeds one under HUD winmsg.
A message fades in over 250 units of SetFrame()'s time, stays for the time Show() gives it, and fades out over 250 more. Show() scales the text's font from its size at construction, and the destructor restores that size.
| HudTextMessage::HudTextMessage | ( | const HxStr & | name | ) |
Resolve the message's objects and hide it.
Records the text's font and its size at construction, hides the text, and shows the blur when one exists.
| name | The object name the three suffixes are appended to. |
|
inline |
| void HudTextMessage::Show | ( | const HxStr & | text, |
| float | flScale, | ||
| float | flHold ) |
Start showing one text unless a message is already active.
Scales the font from its original size, sets and shows the text, rewinds the animation, and marks the start time as pending until the next SetFrame(). The title is inferred.
| text | The text to show. |
| flScale | The font scale relative to the original size. |
| flHold | How long the message stays between its fades. |
| void HudTextMessage::Hide | ( | ) |
Hide the text at once and mark the message inactive.
The title is inferred.
| void HudTextMessage::SetFrame | ( | float | flTime | ) |
Advance the fade animation, hiding the text once it has faded out.
| flTime | The current time. The first call after Show() records it as the start. |
| Rnd::Text* HudTextMessage::mText |
The text, <name>.txt.
+0x08
Public because HudWinMessage::Draw() at 0x0042a830 draws it directly, and the image has no accessor for it.
| int HudTextMessage::mActive |