wavelength 1.0.0
Loading...
Searching...
No Matches
partunlockscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
7#include "met/freqscreen.h"
10#include "msg/joypadinputmsg.h"
11#include "script/dataarray.h"
13
25public:
32 ~PartUnlockScreen() override = default;
33
41 explicit PartUnlockScreen(DataArray *pData);
42
53 static UIScreen *New(DataArray *pData) {
54 return new PartUnlockScreen(pData);
55 }
56
65 bool DispatchPriv(Message *pMsg) override;
66
75 void Poll(float fTime) override;
76
85 void Exit(UIScreen *pNextScreen, float fTime) override;
86
95 void Enter(UIScreen *pPrevScreen, float fTime) override;
96
107 bool AddItem(const UnlockableItem &item);
108
109private:
118 void SetLine(int nLine, const char *pszText);
119
129 void SetLinePair(int nRow, int nKind, const char *pszName);
130
137 void ShowNextItems();
138
147 const char *PartLabel(int nKind);
148
157 bool HandleTransitionComplete(UITransitionCompleteMsg *pMsg);
158
167 bool HandleJoypad(JoypadInputMsg *pMsg);
168
169 std::vector<UnlockableItem> mItems;
170 int mIndex;
171 ViewAnimPlayer mAnimPlayer;
172 AvatarPartSet mPrefab;
173 UnlockAvatarPanel *mPanel;
174 float mNextMs;
175 float mDelayMs;
176 int mHalo;
177};
Parts and colours of a player's avatar, the Freq the Freq maker edits.
Definition avatarpartset.h:23
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
bool DispatchPriv(Message *pMsg) override
Route the end of a transition and a controller button, and pass on every other message.
~PartUnlockScreen() override=default
Destroy the object.
bool AddItem(const UnlockableItem &item)
Queue an item.
void Enter(UIScreen *pPrevScreen, float fTime) override
Find the panel of the Freq and show the first page.
void Poll(float fTime) override
Apply the parts of the Freq as they load, and show the next page once its time has come,...
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition partunlockscreen.h:53
PartUnlockScreen(DataArray *pData)
Construct the screen from its script description, listing no item.
void Exit(UIScreen *pNextScreen, float fTime) override
Forget the listed items and stop the view.
UIScreen(DataArray *pData)
Construct a screen from its script description.
Message a screen sends itself once its panels have finished their entry animations.
Definition uitransitioncompletemsg.h:23
Avatar panel that shows a copy of a set of parts, such as an unlocked prefabricated Freq.
Definition unlockavatarpanel.h:15
Player of the entry animation of a view, which loops the cursor sound while a cursor of the animation...
Definition viewanimplayer.h:12
One item a song unlocked: a song, an avatar part, or an arena.
Definition unlockableitem.h:10