wavelength 1.0.0
Loading...
Searching...
No Matches
hudcommon.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <utility>
5
7#include "app/hudhilitebox.h"
8#include "app/hudletterbox.h"
9#include "app/hudletterexit.h"
10#include "app/hudstick.h"
11#include "app/hudtextmessage.h"
12#include "app/hudtextnode.h"
13#include "app/ovyavatar.h"
14#include "app/ovychat.h"
15#include "app/ovycontroller.h"
16#include "app/ovydialog.h"
17#include "app/ovyjuice.h"
18#include "app/ovysectionpanel.h"
19#include "app/ovysongpos.h"
20#include "app/ovytracklabel.h"
21#include "rnd/rndanimatable.h"
22#include "rnd/rndview.h"
23#include "script/dataarray.h"
24
31class HudCommon {
32public:
34 static constexpr int kNumLanes = 6;
35
45 HudCommon(RndView *pHudView, DataArray *pConfig, DataArray *pDefaults);
46
54
64 void Poll(float fSongDelta, float fRealDelta, float fTickDelta);
65
72 void Draw();
73
80 void DrawText();
81
88 void DrawAvatar();
89
98 void SetPlaying(int nPlayer, bool bPlaying);
99
106 void Reset();
107
110 return mJuice;
111 }
112
115 return mMessage;
116 }
117
120 return mMessage2;
121 }
122
125 return mTextMessage;
126 }
127
130 return mHilite;
131 }
132
135 return mLetterbox;
136 }
137
140 return mSongPos.get();
141 }
142
147 HudFlyingButton &GetButton(int nLane) const {
148 return *mButtons[nLane];
149 }
150
153 return mController.get();
154 }
155
161 void SetController(std::unique_ptr<OvyController> pController) {
162 mController = std::move(pController);
163 }
164
167 return mDialog.get();
168 }
169
175 void SetDialog(std::unique_ptr<OvyDialog> pDialog) {
176 mDialog = std::move(pDialog);
177 }
178
181 return mLeaderAvatar.get();
182 }
183
186 return mSections.get();
187 }
188
191 return mStick.get();
192 }
193
196 return mLetterExit.get();
197 }
198
201 return mTrackLabel.get();
202 }
203
204private:
205 OvyJuice mJuice;
206 HudTextNode mMessage;
207 HudTextNode mMessage2;
208 HudTextMessage mTextMessage;
209 HudHiliteBox mHilite;
210 std::unique_ptr<OvySongPos> mSongPos;
211 HudLetterbox mLetterbox;
212 std::unique_ptr<HudFlyingButton> mButtons[kNumLanes];
213 std::unique_ptr<OvyController> mController;
214 std::unique_ptr<OvyDialog> mDialog;
215 std::unique_ptr<OvyAvatar> mLeaderAvatar;
216 std::unique_ptr<OvySectionPanel> mSections;
217 std::unique_ptr<HudStick> mStick;
218 std::unique_ptr<OvyChat> mChat;
219 std::unique_ptr<HudLetterExit> mLetterExit;
220 std::unique_ptr<OvyTrackLabel> mTrackLabel;
221 RndAnimatable *mMaterialAnim;
222 unsigned char mPlaying;
223};
Reference-counted array of script data nodes.
Definition dataarray.h:20
void DrawText()
Draw the chat, the text message, the letterbox, and the two lines of text.
~HudCommon()
Destroy the parts.
HudLetterExit * GetLetterExit() const
Definition hudcommon.h:195
static constexpr int kNumLanes
The number of lanes, one flying button icon each.
Definition hudcommon.h:34
HudStick * GetStick() const
Definition hudcommon.h:190
OvyDialog * GetDialog() const
Definition hudcommon.h:166
void SetController(std::unique_ptr< OvyController > pController)
Replace the picture of the controller.
Definition hudcommon.h:161
HudCommon(RndView *pHudView, DataArray *pConfig, DataArray *pDefaults)
Construct the parts the rule set and the community of the game call for.
void Poll(float fSongDelta, float fRealDelta, float fTickDelta)
Advance the parts.
HudLetterbox & GetLetterbox()
Definition hudcommon.h:134
void Reset()
Return every part to its state at the start of a song.
HudTextNode & GetMessage2()
Definition hudcommon.h:119
void DrawAvatar()
Draw the avatar of the leader.
HudFlyingButton & GetButton(int nLane) const
Definition hudcommon.h:147
void Draw()
Draw the song position, the button icons, the sections, and the stick marker.
HudHiliteBox & GetHilite()
Definition hudcommon.h:129
OvyTrackLabel * GetTrackLabel() const
Definition hudcommon.h:200
OvySectionPanel * GetSections() const
Definition hudcommon.h:185
void SetPlaying(int nPlayer, bool bPlaying)
Mark a player as playing or not, and show the leader avatar of the one player who plays.
OvySongPos * GetSongPos() const
Definition hudcommon.h:139
OvyJuice & GetJuice()
Definition hudcommon.h:109
HudTextMessage & GetTextMessage()
Definition hudcommon.h:124
void SetDialog(std::unique_ptr< OvyDialog > pDialog)
Replace the panel of text.
Definition hudcommon.h:175
OvyAvatar * GetLeaderAvatar() const
Definition hudcommon.h:180
OvyController * GetController() const
Definition hudcommon.h:152
HudTextNode & GetMessage()
Definition hudcommon.h:114
Button icon of a lane that flies to a place on the screen and pulses there.
Definition hudflyingbutton.h:17
Highlight the tutorial draws round a part of the screen, and an arrow that points at a place.
Definition hudhilitebox.h:17
Banner of the letters of AMPLITUDE a duel player has won, which flies to the player's score.
Definition hudletterexit.h:15
Bars that close in over the top and the bottom of the screen.
Definition hudletterbox.h:11
Marker on the controller stick diagram of the head-up display, which the tutorial moves.
Definition hudstick.h:15
Message of two lines that flies across the head-up display and trails a blur.
Definition hudtextmessage.h:16
Line of text on the head-up display, drawn on its own over the rest.
Definition hudtextnode.h:11
Avatar of a player beside the tracks, with the name of the track or player under it.
Definition ovyavatar.h:19
Picture of the controller on the head-up display, with the buttons the tutorial points at.
Definition ovycontroller.h:15
Panel of text the tutorial opens over the head-up display.
Definition ovydialog.h:13
Energy bar of the solo head-up display.
Definition ovyjuice.h:16
List of the sections of the song on the remix head-up display, with the current one lit.
Definition ovysectionpanel.h:19
Bar of the song's progress on the head-up display, with a marker per checkpoint.
Definition ovysongpos.h:20
Label of the instrument of the track the local player is on.
Definition ovytracklabel.h:13
Mix-in for an object driven by a frame.
Definition rndanimatable.h:16
View that shows the children of another view, its children owner, under its own transform and frame.
Definition rndview.h:27