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
17
class
HudFlyingButton
{
18
public
:
30
HudFlyingButton
(
int
nLane,
RndView
*pHudView);
31
38
~HudFlyingButton
();
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
97
private
:
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::HudFlyingButton
HudFlyingButton(int nLane, RndView *pHudView)
Construct a hidden icon of a lane from HUD flying button <n>.txt and its blur.
HudFlyingButton::SetPulse
void SetPulse(bool bPulse)
Start or stop the pulse of the icon.
HudFlyingButton::~HudFlyingButton
~HudFlyingButton()
Destroy the icon and the shared flight curve.
HudFlyingButton::Draw
void Draw()
Pulse the icon and draw its blur while it shows.
HudFlyingButton::Poll
void Poll(float fRealDelta)
Advance the flight, and start the pulse once the icon arrives.
HudFlyingButton::Hide
void Hide()
Hide the icon.
HudFlyingButton::Fly
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.
HudFlyingButton::GetText
RndText * GetText() const
Definition
hudflyingbutton.h:93
HudFlyingButton::Reset
void Reset()
Hide the icon and stop its flight.
RndBlur
Motion trail that draws a mesh or a text again at the transforms it recently occupied.
Definition
rndblur.h:21
RndText
Text drawn with a bitmap font as a mesh of one quad per character.
Definition
rndtext.h:27
RndView
View that shows the children of another view, its children owner, under its own transform and frame.
Definition
rndview.h:27
interpolator.h
rndblur.h
rndtext.h
rndview.h
Vector2
Two-component vector, used for texture coordinates.
Definition
vector2.h:12
vector2.h
src
app
hudflyingbutton.h
Generated by
1.15.0