wavelength 1.0.0
Loading...
Searching...
No Matches
netparamsscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "met/freqscreen.h"
7#include "os/joypad.h"
8#include "os/string.h"
9#include "script/dataarray.h"
12#include "ui/uipanel.h"
13#include "ui/uiscreen.h"
14
23public:
32 explicit NetParamsScreen(DataArray *pData);
33
40 ~NetParamsScreen() override {
41 }
42
51 bool DispatchPriv(Message *pMsg) override;
52
61 void Exit(UIScreen *pNextScreen, float fTime) override;
62
71 void Enter(UIScreen *pPrevScreen, float fTime) override;
72
82 virtual void UpdateLabels();
83
92 virtual void OnModeChanged() {
93 }
94
106 virtual void OnChoiceChanged([[maybe_unused]] int bReset) {
107 }
108
109protected:
118 static int StepChoice(int nChoice, int nCount, int nButton) {
119 if (nButton == kPadDLeft) {
120 return nChoice - 1 > -1 ? nChoice - 1 : nCount - 1;
121 }
122 return nChoice + 1 < nCount ? nChoice + 1 : 0;
123 }
124
136
149
162
163 int mMode;
164
165 int mSkill;
166
168
170
172
173 std::vector<String> mModes;
174
175 std::vector<String> mSkills;
176
178
179 const char *mSongPanelName;
180
181 const char *mButtonPanelName;
182
183 const char *mTriBackScreen;
184
186};
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
UIPanel * mSongPanel
Definition netparamsscreen.h:177
std::vector< String > mSkills
Definition netparamsscreen.h:175
int mMode
Definition netparamsscreen.h:163
bool HandleSelectStart(UIComponentSelectStartMsg *pMsg)
Change the mode or the skill with the left and right buttons, or move to the song panel from song wit...
void Enter(UIScreen *pPrevScreen, float fTime) override
Enter, give the focus to the button panel, and label the choices.
bool DispatchPriv(Message *pMsg) override
Route the choice, the left and right buttons, and the controller messages.
bool HandleJoypad(JoypadInputMsg *pMsg)
Return from the song panel to the button panel with the triangle or left button, or exit the screen w...
void Exit(UIScreen *pNextScreen, float fTime) override
Exit and drop the names of the modes and the skills.
int mSkill
Definition netparamsscreen.h:165
bool HandleSelect(UIComponentSelectMsg *pMsg)
Move to the song panel from song, or back to the button panel from cursor.
int mChoiceCount
Definition netparamsscreen.h:185
static int StepChoice(int nChoice, int nCount, int nButton)
Move a choice one step through a list, wrapping at both ends.
Definition netparamsscreen.h:118
virtual void UpdateLabels()
Label the mode and skill components with the chosen mode and skill, and disable skill for a mode afte...
int mRemixMode
Definition netparamsscreen.h:171
const char * mSongPanelName
Definition netparamsscreen.h:179
std::vector< String > mModes
Definition netparamsscreen.h:173
const char * mButtonPanelName
Definition netparamsscreen.h:181
const char * mTriBackScreen
Definition netparamsscreen.h:183
virtual void OnModeChanged()
React to a choice on the mode component.
Definition netparamsscreen.h:92
int mDuelMode
Definition netparamsscreen.h:169
NetParamsScreen(DataArray *pData)
Construct a screen from the song_panel_name, button_panel_name, and tri_back of its description.
virtual void OnChoiceChanged(int bReset)
React to a change of the mode or the skill by listing the songs.
Definition netparamsscreen.h:106
~NetParamsScreen() override
Release the screen.
Definition netparamsscreen.h:40
int mLastSkillMode
Definition netparamsscreen.h:167
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
Group of components drawn from one .rnd file, which a screen shows.
Definition uipanel.h:35
UIScreen(DataArray *pData)
Construct a screen from its script description.
@ kPadDLeft
Definition joypad.h:41