wavelength 1.0.0
Loading...
Searching...
No Matches
mccheckscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "game/campaign.h"
6#include "game/gameoptions.h"
8#include "met/errorscreen.h"
9#include "script/dataarray.h"
10#include "ui/uiscreen.h"
12
22class MCCheckScreen : public ErrorScreen, public MemcardUser {
23public:
31 explicit MCCheckScreen(DataArray *pData)
32 : ErrorScreen(pData), mLoadFreqs(0), mLoadSettings(0), mAdvanceTime(0.0f) {
33 }
34
41 ~MCCheckScreen() override {
42 }
43
52 static UIScreen *New(DataArray *pData) {
53 return new MCCheckScreen(pData);
54 }
55
63 const char *Title() override {
64 return "";
65 }
66
75 bool DispatchPriv(Message *pMsg) override;
76
87 void Poll(float fTime) override;
88
97 void Exit(UIScreen *pNextScreen, float fTime) override;
98
114 void OnInitialCheck(int nStatus, int nFormat, int nFree, int nNeeded) override;
115
124 void OnSettingsLoaded(int nStatus, GameOptions settings) override;
125
136 void OnFreqsLoaded(int nStatus, std::vector<Campaign> *pProfiles) override;
137
138private:
147 bool HandleTransitionComplete(UITransitionCompleteMsg *pMsg);
148
149 int mLoadFreqs; // Whether the next poll loads the Freqs.
150 int mLoadSettings; // Whether the next poll loads the settings.
151 float mAdvanceTime; // The front-end time to go to the done screen at, or 0 for none.
152};
Reference-counted array of script data nodes.
Definition dataarray.h:20
ErrorScreen(DataArray *pData)
Construct the screen from its script description.
The settings of the game options screen, which are saved apart from the players to the settings file ...
Definition gameoptions.h:13
MCCheckScreen(DataArray *pData)
Construct the screen from its script description.
Definition mccheckscreen.h:31
void Exit(UIScreen *pNextScreen, float fTime) override
Exit, and give the first player a default Freq when no Freq of the player loaded.
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition mccheckscreen.h:52
const char * Title() override
Report the empty title of the screen.
Definition mccheckscreen.h:63
void OnSettingsLoaded(int nStatus, GameOptions settings) override
Apply the settings loaded, and load the Freqs on the next poll whatever the outcome.
void OnFreqsLoaded(int nStatus, std::vector< Campaign > *pProfiles) override
Make the newest Freq loaded the first player's, and go to the done screen a second later.
void OnInitialCheck(int nStatus, int nFormat, int nFree, int nNeeded) override
Load the settings of a usable card on the next poll, or open the dialog of the card's failure.
bool DispatchPriv(Message *pMsg) override
Route the end of the entry to HandleTransitionComplete().
~MCCheckScreen() override
Destroy the screen.
Definition mccheckscreen.h:41
void Poll(float fTime) override
Start a pending load, and go to the done screen once the time to advance has passed.
Receiver of the outcome of the memory card work MCManager runs.
Definition memcarduser.h:19
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
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