wavelength 1.0.0
Loading...
Searching...
No Matches
selloadedfreqscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "game/campaign.h"
6#include "met/freqscreen.h"
8#include "script/dataarray.h"
10
21public:
28 ~SelLoadedFreqScreen() override = default;
29
38
49 static UIScreen *New(DataArray *pData) {
50 return new SelLoadedFreqScreen(pData);
51 }
52
61 bool DispatchPriv(Message *pMsg) override;
62
74 void Enter(UIScreen *pPrevScreen, float fTime) override;
75
83 virtual void SetProfiles(const std::vector<Campaign> &profiles) {
84 mProfiles = profiles;
85 }
86
97
109
111 void SetProfile(Campaign profile) {
112 mProfile = profile;
113 }
114
115protected:
116 std::vector<Campaign> mProfiles;
117
118private:
119 Campaign mProfile;
120};
Saved settings and progress of one player, among them the controller bindings.
Definition campaign.h:20
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition selloadedfreqscreen.h:49
SelLoadedFreqScreen(DataArray *pData)
Construct the screen from its script description, with no Freqs.
virtual void SetProfiles(const std::vector< Campaign > &profiles)
Replace the listed Freqs.
Definition selloadedfreqscreen.h:83
~SelLoadedFreqScreen() override=default
Destroy the object.
bool DispatchPriv(Message *pMsg) override
Route a chosen Freq and a controller button, and pass on every other message.
void SetProfile(Campaign profile)
Definition selloadedfreqscreen.h:111
bool HandleSelect(UIComponentSelectMsg *pMsg)
Make the Freq chosen with the cross button the only player, and go on to the skill menu of a solo gam...
void Enter(UIScreen *pPrevScreen, float fTime) override
Start the entry, fill the list with mProfiles, and select the first Freq.
bool HandleJoypad(JoypadInputMsg *pMsg)
Go back to the Freq menu when the first controller's triangle button goes down, restoring the profile...
std::vector< Campaign > mProfiles
Definition selloadedfreqscreen.h:116
Message a component sends when the player chooses it.
Definition uicomponentselectmsg.h:28
UIScreen(DataArray *pData)
Construct a screen from its script description.