wavelength 1.0.0
Loading...
Searching...
No Matches
nethostingscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
8#include "os/string.h"
9#include "script/dataarray.h"
12#include "ui/uiscreen.h"
13
23public:
30 ~NetHostingScreen() override = default;
31
39 explicit NetHostingScreen(DataArray *pData);
40
49 static UIScreen *New(DataArray *pData) {
50 return new NetHostingScreen(pData);
51 }
52
61 bool DispatchPriv(Message *pMsg) override;
62
75 void Enter(UIScreen *pPrevScreen, float fTime) override;
76
84 void UpdateLabels() override;
85
92 void OnModeChanged() override;
93
102 void OnChoiceChanged(int bReset) override;
103
114
124
135
136private:
137 int mNumPlayers;
138 int mLastNumPlayers;
139 int mDuelNumPlayers;
140 int mCustomChoice;
141 std::vector<String> mPlayerCounts;
142 int mPowerup;
143 std::vector<String> mPowerups;
144 int mIsEdit;
145 NetGameParams mSavedParams;
146};
Reference-counted array of script data nodes.
Definition dataarray.h:20
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
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
~NetHostingScreen() override=default
Destroy the object.
bool HandleSelect(UIComponentSelectMsg *pMsg)
Write the choices to the game database and host the game, or choose a saved remix for host_custom.
void OnModeChanged() override
List the skills of the chosen mode, keeping the chosen skill where the lists differ.
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition nethostingscreen.h:49
bool HandleJoypad(JoypadInputMsg *pMsg)
Restore the saved settings when the triangle button leaves the editing screen.
void Enter(UIScreen *pPrevScreen, float fTime) override
List the modes, the numbers of players, and the power-ups, and choose the settings of the game databa...
void OnChoiceChanged(int bReset) override
List host_random, the songs of the chosen mode and skill, and for a game or a remix host_custom,...
bool HandleSelectStart(UIComponentSelectStartMsg *pMsg)
Change the number of players or the power-ups with the left and right buttons.
bool DispatchPriv(Message *pMsg) override
Route the choices, the left and right buttons, and the controller to their handlers.
void UpdateLabels() override
Label the choices, and disable the power-ups for a mode other than the game and the number of players...
NetHostingScreen(DataArray *pData)
Construct the screen from its script description.
NetParamsScreen(DataArray *pData)
Construct a screen from the song_panel_name, button_panel_name, and tri_back of its description.
Message a component sends when the player chooses it.
Definition uicomponentselectmsg.h:28
Message a component sends when the player presses the button that chooses it.
Definition uicomponentselectstartmsg.h:27
UIScreen(DataArray *pData)
Construct a screen from its script description.