wavelength 1.0.0
Loading...
Searching...
No Matches
hudtextmessage.h
Go to the documentation of this file.
1#pragma once
2
3#include "math/color.h"
4#include "rnd/rndblur.h"
5#include "rnd/rndmat.h"
6#include "rnd/rndtext.h"
7#include "rnd/rndtransanim.h"
8#include "rnd/rndview.h"
9
17public:
19 static constexpr float kFlyTime = 350.0f;
20
29 explicit HudTextMessage(RndView *pHudView);
30
38
45 void Hide();
46
60 void Show(const char *pszText,
61 const char *pszSmallText,
62 float fDuration,
63 float fScale,
64 int nPlayer,
65 float fX,
66 float fZ);
67
74 void Poll();
75
82 void Draw();
83
85 static constexpr float kNotShown = -1e9f;
86
87private:
88 RndBlur *mBlur;
89 RndBlur *mSmallBlur;
90 RndText *mText;
91 RndText *mSmallText;
92 RndView *mOffsetView;
93 RndTransAnim *mFlight;
94 RndMat *mMat;
95 Color mDefaultColor;
96 float mFrame;
97 float mStartTime;
98 float mDuration;
99 int mShowing;
100};
static constexpr float kFlyTime
The time the message takes to fly in, and again to fly out, in milliseconds.
Definition hudtextmessage.h:19
~HudTextMessage()
Destroy the message.
void Draw()
Pose the flight and draw the blurs.
void Hide()
Hide the message at once.
void Show(const char *pszText, const char *pszSmallText, float fDuration, float fScale, int nPlayer, float fX, float fZ)
Fly a message in, unless one is showing.
HudTextMessage(RndView *pHudView)
Construct a hidden message from HUD textmsg.txt, HUD sm textmsg.txt, their blurs, and <hud> textmsg....
static constexpr float kNotShown
The value of mStartTime when no message shows.
Definition hudtextmessage.h:85
void Poll()
Advance the flight, and hide the message once it has flown out.
Motion trail that draws a mesh or a text again at the transforms it recently occupied.
Definition rndblur.h:21
Surface description: blending, lighting colours, culling, and a list of texture stages.
Definition rndmat.h:20
Text drawn with a bitmap font as a mesh of one quad per character.
Definition rndtext.h:27
Animation of a transformable's local transform by rotation, translation, and scale keys.
Definition rndtransanim.h:20
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Linear colour with four float components.
Definition color.h:12