wavelength 1.0.0
Loading...
Searching...
No Matches
hudflyingbutton.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
5#include "math/interpolator.h"
6#include "math/vector2.h"
7#include "rnd/rndblur.h"
8#include "rnd/rndtext.h"
9#include "rnd/rndview.h"
10
18public:
30 HudFlyingButton(int nLane, RndView *pHudView);
31
39
46 void Reset();
47
56 void Fly(const Vector2 *pFrom, const Vector2 *pTo);
57
64 void Hide();
65
73 void SetPulse(bool bPulse);
74
82 void Poll(float fRealDelta);
83
90 void Draw();
91
93 RndText *GetText() const {
94 return mText;
95 }
96
97private:
104 static float sFlightTime;
105
112 static std::unique_ptr<Interpolator> sFlight;
113
114 RndText *mText;
115 RndBlur *mBlur;
116 int mPulse;
117 float mStartTime;
118 Vector2 mFrom;
119 Vector2 mTo;
120};
HudFlyingButton(int nLane, RndView *pHudView)
Construct a hidden icon of a lane from HUD flying button <n>.txt and its blur.
void SetPulse(bool bPulse)
Start or stop the pulse of the icon.
~HudFlyingButton()
Destroy the icon and the shared flight curve.
void Draw()
Pulse the icon and draw its blur while it shows.
void Poll(float fRealDelta)
Advance the flight, and start the pulse once the icon arrives.
void Hide()
Hide the icon.
void Fly(const Vector2 *pFrom, const Vector2 *pTo)
Fly the icon from one place to another, or put it at the place when both are the same.
RndText * GetText() const
Definition hudflyingbutton.h:93
void Reset()
Hide the icon and stop its flight.
Motion trail that draws a mesh or a text again at the transforms it recently occupied.
Definition rndblur.h:21
Text drawn with a bitmap font as a mesh of one quad per character.
Definition rndtext.h:27
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27
Two-component vector, used for texture coordinates.
Definition vector2.h:12