resonance 1.0.1
Loading...
Searching...
No Matches
metjukeboxbasescreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
8#include "met/metscreen.h"
9#include "met/scrollinglist.h"
11#include "rnd/drawable.h"
12#include "rnd/object.h"
13
14namespace Rnd {
15class Font;
16class Mat;
17class Mesh;
18class Text;
19} // namespace Rnd
20
80public:
97 int nPriority,
98 const HxStr &name,
99 const HxStr &directory,
100 const HxStr &file);
101
109
119 virtual void EnterAndShow();
120
129 virtual void OnPanelActivated();
130
143 virtual void HandleCommand(const MetScreenCommand *pCommand);
144
156 virtual void UpdateIdle(float flTime);
157
167 virtual void OnEnterFinished();
168
177 virtual void OnExitFinished();
178
188 virtual void ResolveContainerViews();
189
203 virtual void SetShowing(int nShowing);
204
212 virtual void PlaySlideSound(int nSelector);
213
221 virtual void PlayLeaveSound(int nSelector);
222
230 virtual void PlayHighSound(int nSelector);
231
239 virtual void PlayCycleLeftSound(int nSelector);
240
248 virtual void PlayCycleRightSound(int nSelector);
249
262 virtual int GetItemCount() = 0;
263
281 virtual void ShowRemixDetails();
282
295 virtual void UpdateHelpText();
296
308 virtual void BindLists();
309
328 virtual int ProvideText(int nItem, int nColumn, Rnd::Text *pText, int nContext);
329
341 virtual int ProvideMesh(int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext);
342
343protected:
344 // The row pitch and the visible row count the child slot 38 hands to the ScrollingList
345 // constructor.
346 int mListRowPitch; // +0x90, starts at 16
347 int mListRowCount; // +0x94, starts at 10
348 // The two lists the child slot 38 allocates, the first over the 0x38-byte records mCatalogue
349 // addresses and the second over the four-byte entries mPlayList addresses.
352 // The catalogue slots 39 and 42 count rows from. Slot 42 sets it from the shared
353 // MetRemixManager and the base constructor starts it null.
354 std::vector<MetRemixRecord> *mCatalogue; // +0xa0
355 // The five detail texts slot 40 fills.
361 Rnd::Text *mPlayListCaption; // +0xb8, the playlist caption SetShowing() hides with the screen
362 Rnd::Mat *mPictureMaterial; // +0xbc, the song picture material
363 Rnd::Mat *mLogoMaterial; // +0xc0, the song logo material
364 // The playlist the edit screen counts rows from. Slot 42 sets it to the instance embedded at
365 // `+0xc4` of the shared MetRemixManager.
367 // The MetRemixManager::mRemixes key of the catalogue the screen lists. Zero for the saved and
368 // edit screens and -1 for the factory screen. Each of the three children writes it in its
369 // constructor.
370 int mCatalogueKey; // +0xc8
371 std::vector<Rnd::Text *> mAppearanceTexts; // +0xcc, the player appearance texts
372 // The two fonts slot 38 resolves, `font1_pink_2` and `font1_pinkgrey_2`. ProvideText() hands
373 // them to Rnd::Text::SetFont(), which is what types both.
376 TexturePairRecord mLogoTextures; // +0xe0, the song logo pair
377 TexturePairRecord mPictureTextures; // +0x110, the song label pair, loaded from the picture path
378 Rnd::Mesh *mPictureMesh; // +0x140, the song picture mesh
379 Rnd::Mesh *mLogoMesh; // +0x144, the song logo mesh
380 Rnd::Text *mWarningText; // +0x148, the warning slot 40 shows for another album
381 int mPicturesPending; // +0x14c, set while the song pictures are still to show
382};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Ordered list of the remixes queued in the jukebox.
Definition jukeboxplaylist.h:46
Mix-in for an object that supplies the rows of a scrolling list to the screen that draws it.
Definition listdataprovider.h:30
virtual void PlayLeaveSound(int nSelector)
Overridden empty, so a jukebox screen plays no departure sound.
Rnd::Mesh * mLogoMesh
Definition metjukeboxbasescreen.h:379
Rnd::Text * mDateText
Definition metjukeboxbasescreen.h:359
Rnd::Mat * mPictureMaterial
Definition metjukeboxbasescreen.h:362
virtual void UpdateIdle(float flTime)
Advance the two song pictures while the view is showing and the details are current.
std::vector< MetRemixRecord > * mCatalogue
Definition metjukeboxbasescreen.h:354
Rnd::Text * mWarningText
Definition metjukeboxbasescreen.h:380
Rnd::Text * mSongTitleText
Definition metjukeboxbasescreen.h:358
virtual void PlayCycleRightSound(int nSelector)
Overridden empty, so a jukebox screen plays no right-cycle sound.
Rnd::Text * mPlayListCaption
Definition metjukeboxbasescreen.h:361
virtual void OnEnterFinished()
Bind the lists again and refresh both.
virtual int ProvideMesh(int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext)
Leave the cell as it is.
virtual void PlayCycleLeftSound(int nSelector)
Overridden empty, so a jukebox screen plays no left-cycle sound.
Rnd::Text * mGenreText
Definition metjukeboxbasescreen.h:356
TexturePairRecord mPictureTextures
Definition metjukeboxbasescreen.h:377
virtual ~MetJukeboxBaseScreen()
Release the two scrolling lists.
virtual void OnExitFinished()
Hide the five detail texts.
Rnd::Mesh * mPictureMesh
Definition metjukeboxbasescreen.h:378
TexturePairRecord mLogoTextures
Definition metjukeboxbasescreen.h:376
Rnd::Text * mRemixTitleText
Definition metjukeboxbasescreen.h:360
Rnd::Font * mAvailableFont
Definition metjukeboxbasescreen.h:374
virtual int ProvideText(int nItem, int nColumn, Rnd::Text *pText, int nContext)
Show one row of whichever list the context selects.
virtual void UpdateHelpText()
Select the help text for the playlist's state.
JukeboxPlayList * mPlayList
Definition metjukeboxbasescreen.h:366
int mCatalogueKey
Definition metjukeboxbasescreen.h:370
MetJukeboxBaseScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct the screen with no list and no resolved object.
virtual void BindLists()
Bind the catalogue and the playlist from the shared MetRemixManager.
ScrollingList * mPlayListList
Definition metjukeboxbasescreen.h:351
int mPicturesPending
Definition metjukeboxbasescreen.h:381
Rnd::Font * mUnavailableFont
Definition metjukeboxbasescreen.h:375
virtual void HandleCommand(const MetScreenCommand *pCommand)
Act on a command.
virtual int GetItemCount()=0
Report the number of rows the list displays.
virtual void SetShowing(int nShowing)
Show or hide the view, both scrolling lists, and the list frame.
Rnd::Mat * mLogoMaterial
Definition metjukeboxbasescreen.h:363
int mListRowCount
Definition metjukeboxbasescreen.h:347
virtual void ShowRemixDetails()
Fill the detail texts from the selected catalogue row.
int mListRowPitch
Definition metjukeboxbasescreen.h:346
virtual void PlaySlideSound(int nSelector)
Overridden empty, so a jukebox screen plays no slide sound.
std::vector< Rnd::Text * > mAppearanceTexts
Definition metjukeboxbasescreen.h:371
ScrollingList * mCatalogueList
Definition metjukeboxbasescreen.h:350
virtual void OnPanelActivated()
Refresh the details and the help text, then show the playlist.
virtual void ResolveContainerViews()
Resolve the container views and the two fonts.
virtual void EnterAndShow()
Show the five detail texts, bind the lists, and select the first catalogue row.
virtual void PlayHighSound(int nSelector)
Overridden empty, so a jukebox screen plays no emphasis sound.
Rnd::Text * mTempoText
Definition metjukeboxbasescreen.h:357
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
MetScreen(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct a screen and start its container load.
Glyph atlas, either a host font description or a grid of cells inside a material texture.
Definition font.h:59
Surface description a Rnd::Mesh draws with.
Definition mat.h:36
Indexed triangle mesh with one material.
Definition mesh.h:46
Run of text drawn as a quad per glyph.
Definition text.h:57
Scrolling list of rows driven by a ListDataProvider.
Definition scrollinglist.h:45
Pair of textures a screen alternates between, one shown while the other loads.
Definition texturepairrecord.h:30
The rendering engine.
Definition animhelper.h:3
One navigation command delivered to a screen.
Definition metscreen.h:46