resonance 1.0.1
Loading...
Searching...
No Matches
metloadfreqbasescreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "met/metbuttonlist.h"
7#include "met/metscreen.h"
8#include "rnd/button.h"
9#include "rnd/object.h"
10#include "rnd/tex.h"
11
12#ifdef VIDEO_STANDARD_PAL
14#endif
15
74#ifdef VIDEO_STANDARD_PAL
76#else
78#endif
79public:
90 MetLoadFreqBaseScreen(MetRenderer *pRenderer, int nPriority);
91
97
109 static MetScreen *New(MetRenderer *pRenderer, int nPriority);
110
123 virtual void EnterAndShow();
124
125#ifdef VIDEO_STANDARD_PAL
138 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
139#endif
140
153 virtual void HandleCommand(const MetScreenCommand *pCommand);
154
166 virtual void PlayCycleLeftSound(int nSelector);
167
177 virtual void PlayCycleRightSound(int nSelector);
178
191 virtual void OnRepeatingSoundFinished(Rnd::Button *pButton);
192
205 virtual void OnExitFinished();
206
217 virtual void ResolveContainerViews();
218
219#ifdef VIDEO_STANDARD_PAL
229 virtual void StartDetect();
230
239 virtual void OnNoCard();
240
250 virtual void OnDetectFinished();
251#endif
252
263 virtual void UpdateNameLabel();
264
276 virtual void OnNameButton();
277
292
303 virtual void OnEditButton();
304
323 virtual void OnCreateButton();
324
325#ifdef VIDEO_STANDARD_PAL
334 virtual void OpenFreqMakerForCreate();
335#endif
336
348 virtual void AcquireIdentityList();
349
361 virtual void BuildButtonList();
362
372 virtual void UpdateCycleArrows();
373
374protected:
387
388 // The identities the carousel steps through. The element is MetPersonaData. UpdateNameLabel()
389 // reads the embedded FreqAppearance at `+0x140` out of an element, and
390 // GameManagerImpl::GetPersonas() returns a vector of exactly this element type. No routine of
391 // this class writes the member. It is protected for the two children that write it from
392 // their AcquireIdentityList(). +0x8c, +0xa0 in the European release
393 std::vector<MetPersonaData *> *mIdentityList;
394 // The button ring. It is protected for the two children that rebuild it in their
395 // BuildButtonList() and address the label of one button in their UpdateNameLabel(). +0x90,
396 // +0xa4 in the European release
398 // The index of the selected identity in mIdentityList. Read by
399 // MetLoadFreqScreen::OnNameButton() and MetLoadNewFreqScreen::OnKeyboardTextEntered(), and
400 // protected for those two readers. EnterAndShow() resets it once it has run past the end of a
401 // rebuilt list. +0x94, +0xa8 in the European release
403
404private:
415 void StepSelection(const MetScreenCommand *pCommand);
416
417 // The cycle arrows `cid_left.but` and `cid_right.but`, resolved by ResolveContainerViews() and
418 // null while the container has not loaded. +0x98 and +0x9c, +0xac and +0xb0 in the European
419 // release
420 Rnd::Button *mLeftArrow;
421 Rnd::Button *mRightArrow;
422 // The texture `persona_texburn_texture_1.tex`, resolved by the constructor. +0xa0, +0xb4 in the
423 // European release
424 Rnd::Tex *mBurnTexture;
425#ifdef VIDEO_STANDARD_PAL
426 // MetFrontEndState::mUsingMemcard as EnterAndShow() found it, and 1 until then. +0xb8
427 int mUsingMemcardOnEnter;
428#endif
429};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Ring of front-end buttons with one of them selected.
Definition metbuttonlist.h:34
Base of the three screens that pick a saved FreQ identity.
Definition metloadfreqbasescreen.h:77
virtual void UpdateNameLabel()
Write the selected identity's username into the first button's label.
virtual void AcquireIdentityList()
Resolve the list of identities the carousel steps through.
virtual void EnterAndShow()
Populate the screen and enter it.
MetButtonList * mButtonList
Definition metloadfreqbasescreen.h:397
virtual void ResolveContainerViews()
Resolve the two cycle arrows after the container load.
virtual void UpdateCycleArrows()
Show the two cycle arrows only while more than one identity exists.
virtual void OnNameButton()
Act on the first button, whose prompt is id_name.
std::vector< MetPersonaData * > * mIdentityList
Definition metloadfreqbasescreen.h:393
static MetScreen * New(MetRenderer *pRenderer, int nPriority)
Produce a base load screen on the heap.
virtual void OnEditButton()
Act on the second button, whose prompt is cid_edit.
virtual void PlayCycleRightSound(int nSelector)
Play the cycle-right sound under the same two conditions as PlayCycleLeftSound().
virtual void BuildButtonList()
Rebuild the button ring and the prompts that go with it.
int mSelectedIdentity
Definition metloadfreqbasescreen.h:402
virtual void PlayCycleLeftSound(int nSelector)
Play the cycle-left sound while the carousel is selected and has more than one entry.
virtual ~MetLoadFreqBaseScreen()
virtual void PrepareFreqMakerForSelection()
Hand the selected identity to the FreQ maker.
virtual void OnRepeatingSoundFinished(Rnd::Button *pButton)
Start the exit animation once the selected button has finished alternating.
virtual void OnExitFinished()
Act on the departure the exit animation has just finished.
MetLoadFreqBaseScreen(MetRenderer *pRenderer, int nPriority)
Construct the screen.
virtual void HandleCommand(const MetScreenCommand *pCommand)
Act on one navigation command.
void RefreshSelection()
Reapply the selected identity to the preview and the label.
virtual void OnCreateButton()
Act on the third button, whose prompt is id_create.
Base of the screens that probe for a memory card before using one.
Definition metmemdetectscreen.h:35
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.
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on the choice the user made in a message dialogue.
Selectable widget, as one mesh and one text run plus a palette for each.
Definition button.h:39
Texture, as a bitmap path plus the load state of its mip levels.
Definition tex.h:43
One navigation command delivered to a screen.
Definition metscreen.h:46