resonance 1.0.1
Loading...
Searching...
No Matches
metglobalsettingssaverscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
6#include "met/metscreen.h"
7#include "os/hxstr.h"
8
34public:
46 MetGlobalSettingsSaverScreen(MetRenderer *pRenderer, int nPriority);
47
55
67 static MetGlobalSettingsSaverScreen *New(MetRenderer *pRenderer, int nPriority);
68
77 virtual void EnterAndShow();
78
88 virtual void BeginExit();
89
105 virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice);
106
115 virtual void PlayCycleLeftSound(int) {
116 }
117
126 virtual void PlayCycleRightSound(int) {
127 }
128
137 virtual void ResolveContainerViews();
138
152 virtual void OnConnectState(MemcardConnectState state, int nStatus);
153
166 virtual void OnCardFormatted(int nPortSlot, int nStatus);
167
181#ifdef VIDEO_STANDARD_PAL
182 virtual void OnGlobalSettingsSaved(int nPortSlot, int nStatus, int nKilobytes);
183#else
184 virtual void OnGlobalSettingsSaved(int nPortSlot, int nStatus);
185#endif
186
200 static void StartSave(const std::vector<HxStr> &screens);
201
202private:
209 void SetReturnScreens(const std::vector<HxStr> &screens);
210
221 void RequestConnectState();
222
223 // Raise `mem_format_check` with NO and YES for the card the state describes. OnConnectState()
224 // expands the routine.
225 void ShowFormatCheck(const MemcardConnectState &state);
226
227 // The registry keys of the screens to return to after the save. +0x90
228 std::vector<HxStr> mReturnScreens;
229};
Heap-allocated NUL-terminated string.
Definition hxstr.h:41
Receiver notified once a memory-card task has finished.
Definition memcarduser.h:24
static MetGlobalSettingsSaverScreen * New(MetRenderer *pRenderer, int nPriority)
Build the screen on the heap.
virtual void PlayCycleLeftSound(int)
Play nothing.
Definition metglobalsettingssaverscreen.h:115
virtual void OnConnectState(MemcardConnectState state, int nStatus)
Start the save on a formatted card, or raise the dialogue for an unformatted or absent one.
virtual void ResolveContainerViews()
Resolve the base views.
virtual void OnMsgScreenDismissed(const HxStr &name, int nChoice)
Act on the choice made in one of this screen's dialogues.
virtual ~MetGlobalSettingsSaverScreen()
Release the screen.
virtual void BeginExit()
Remove the screen from the renderer, push every recorded return screen, and activate the first.
MetGlobalSettingsSaverScreen(MetRenderer *pRenderer, int nPriority)
Construct the settings-saver dialogue.
virtual void OnCardFormatted(int nPortSlot, int nStatus)
Report the format result.
virtual void PlayCycleRightSound(int)
Play nothing.
Definition metglobalsettingssaverscreen.h:126
static void StartSave(const std::vector< HxStr > &screens)
Hand the return screens to the registered saver and show it, or the screens themselves.
virtual void EnterAndShow()
Request the state of the recorded card.
virtual void OnGlobalSettingsSaved(int nPortSlot, int nStatus)
Report the save result.
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.
What one card slot reports about itself, and the memory-card location the front end stores.
Definition memcardconnectstate.h:21