resonance 1.0.1
Loading...
Searching...
No Matches
metremixdelscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
8#include "met/metsaveremix.h"
9
10class HxStr;
11class ScrollingList;
12struct MetRemixRecord;
13
14namespace Rnd {
15class Font;
16} // namespace Rnd
17
80 public MetSaveRemix,
81 public ListDataProvider,
83public:
92 MetRemixDelScreen(MetRenderer *pRenderer, int nPriority);
93
99
109 static MetRemixDelScreen *New(MetRenderer *pRenderer, int nPriority);
110
129 virtual void EnterAndShow();
130
141 virtual void OnPanelActivated();
142
160 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
161
171 virtual void OnMsgScreenShown(const HxStr &name);
172
192 virtual void HandleCommand(const MetScreenCommand *pCommand);
193
203 virtual void PlaySlideSound(int) {
204 }
205
212 virtual void PlayCycleLeftSound(int) {
213 }
214
221 virtual void PlayCycleRightSound(int) {
222 }
223
232 virtual void OnEnterFinished();
233
246 virtual void OnExitFinished();
247
259 virtual void ResolveContainerViews();
260
270 virtual void OnSaveAbandoned();
271
281 virtual void OnSaveDialogueClosed();
282
299
315 virtual void OnRemixLoaded(int nPortSlot, int nStatus);
316
335 virtual void OnRemixDeleted(int nPortSlot, int nStatus);
336
337#ifdef VIDEO_STANDARD_PAL
350 virtual void OnConnectState(MemcardConnectState state, int nStatus);
351#endif
352
363 virtual void OnKeyboardTextEntered(const HxStr &text);
364
379 virtual int ProvideText(int nItem, int nColumn, Rnd::Text *pText, int nContext);
380
392 virtual int ProvideMesh(int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext);
393
404
405private:
406 // Raise the delete progress dialogue and queue the delete of the selected row. Slot 15
407 // expands this sequence twice, for the YES of `del_remix_ask` and the RETRY of
408 // `del_fail_nocard`, and it has no address of its own.
409 inline void StartDelete();
410
420 void ShowRowOnDataScreen(int nIndex);
421
422 // The row catalogue the ListDataProvider override at `0x0033cc78` indexes. Slot 5 points it at
423 // the MetRemixManager list for mCardSlot. +0xf0
424 std::vector<MetRemixRecord> *mCatalogue;
425 // Deleted by the destructor and by slot 36. +0xf4
426 ScrollingList *mList;
427 int mReserved; // +0xf8, never read or written
428 // Set by code 8, the request to delete the selected row. +0xfc
429 int mDeletePending;
430 // Set by code 7, the request to copy the selected row to the next card. +0x100
431 int mCopyPending;
432#ifdef VIDEO_STANDARD_PAL
433 // Set while OnConnectState() waits for the first card's state after a delete. Cleared by the
434 // constructor, OnConnectState(), and OnPanelActivated(). +0x104
435 int mRefreshCardPending;
436#endif
437 // The catalogue row MemcardUser slot 12 hands to RecordPendingSave(). The European release
438 // places it and every later member four bytes further on. +0x104
439 MetRemixRecord *mCopyRecord;
440 // The card the screen lists, and the card a copy writes to. +0x108 and +0x120
441 MemcardConnectState mCardSlot;
442 MemcardConnectState mCopyTarget;
443 Rnd::Font *mRowFont; // +0x138, `font1_pink_2`, resolved by slot 38
444 Rnd::Font *mDimRowFont; // +0x13c, `font1_pinkgrey_2`, resolved by slot 38
445};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Mix-in for an object that supplies the rows of a scrolling list to the screen that draws it.
Definition listdataprovider.h:30
Mix-in for a screen that receives the outcome of the memory-card picker.
Definition metmemcardpickeruser.h:31
virtual void OnPanelActivated()
Run the pending keyboard action once the panel has finished activating.
virtual int ProvideMesh(int nItem, int nColumn, Rnd::Mesh *pMesh, int nContext)
Leave the cell as it is.
virtual void OnKeyboardTextEntered(const HxStr &text)
Forward the entered name to the saver once.
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on whichever of the screen's dialogues was dismissed.
virtual void PlayCycleLeftSound(int)
Silence the cycle-left sound.
Definition metremixdelscreen.h:212
virtual void OnRemixLoaded(int nPortSlot, int nStatus)
Fill the catalogue from the card.
virtual void OnMsgScreenShown(const HxStr &name)
Make the message screen the active panel.
MetRemixDelScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
static MetRemixDelScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void ResolveContainerViews()
Resolve the list title and the rest of the container objects.
void SetCardSlot(MemcardConnectState slot)
Record the card the screen works on in mCardSlot.
virtual void OnDuplicateNameDeclined()
Request a remix name from the on-screen keyboard.
virtual void OnExitFinished()
Release the list and depart once the exit animation has finished.
virtual void PlaySlideSound(int)
Silence the slide sound.
Definition metremixdelscreen.h:203
virtual void HandleCommand(const MetScreenCommand *pCommand)
Act on a navigation command.
virtual void OnRemixDeleted(int nPortSlot, int nStatus)
Act on the delete the card reported.
virtual void EnterAndShow()
Hide the screen and request the remix catalogue.
virtual void OnSaveAbandoned()
Bring this screen back and make it the active panel again.
virtual void OnEnterFinished()
Show the first catalogue row on the data screen.
virtual ~MetRemixDelScreen()
virtual int ProvideText(int nItem, int nColumn, Rnd::Text *pText, int nContext)
Show the second string of one row of mCatalogue.
virtual void OnSaveDialogueClosed()
Bring this screen back and make it the active panel again.
virtual void PlayCycleRightSound(int)
Silence the cycle-right sound.
Definition metremixdelscreen.h:221
Front-end renderer that owns the screen stack and drives every MetScreen.
Definition metrenderer.h:68
MetSaveRemix(MetRenderer *pRenderer, int nPriority, const HxStr &name, const HxStr &directory, const HxStr &file)
Construct the saver.
virtual void OnConnectState(MemcardConnectState state, int nStatus)
Act on the state of the card the save targets.
Glyph atlas, either a host font description or a grid of cells inside a material texture.
Definition font.h:59
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
The rendering engine.
Definition animhelper.h:3
What one card slot reports about itself, and the memory-card location the front end stores.
Definition memcardconnectstate.h:21
One remix in the catalogue, with the appearances of the players who recorded it.
Definition metremixrecord.h:36
One navigation command delivered to a screen.
Definition metscreen.h:46