wavelength 1.0.0
Loading...
Searching...
No Matches
netuploadtoolscreen.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef VIDEO_STANDARD_PAL
4
5#include <list>
6
7#include "met/freqscreen.h"
8#include "met/uploadinfo.h"
11#include "os/string.h"
12#include "script/dataarray.h"
14#include "ui/uiscreen.h"
15
24class NetUploadToolScreen : public FreqScreen {
25public:
32 explicit NetUploadToolScreen(DataArray *pData) : FreqScreen(pData) {
33 }
34
40 ~NetUploadToolScreen() override {
41 }
42
50 static UIScreen *New(DataArray *pData) {
51 return new NetUploadToolScreen(pData);
52 }
53
61 bool DispatchPriv(Message *pMsg) override;
62
70 void Enter(UIScreen *pPrevScreen, float fTime) override;
71
79 void Exit(UIScreen *pNextScreen, float fTime) override;
80
90 void SetFiles(std::list<String> &files, std::list<NetRepoRemix> &remixes);
91
100 void MarkRemixes(std::list<NetRepoRemix> &remixes);
101
110 void RemoveFile(int nIndex);
111
112private:
114 enum NamePart {
115 kNamePartDate = 0,
116 kNamePartSong = 1,
117 kNamePartTitle = 2,
118 };
119
132 static void
133 ParseNames(int nPart, const char *pszA, const char *pszB, char *pszPartA, char *pszPartB);
134
145 static bool LessBySong(const UploadInfo &a, const UploadInfo &b);
146
157 static bool LessByTitle(const UploadInfo &a, const UploadInfo &b);
158
169 static bool LessByDate(const UploadInfo &a, const UploadInfo &b);
170
181 static bool InReposFirst(const UploadInfo &a, const UploadInfo &b);
182
192 bool HandleSelect(UIComponentSelectMsg *pMsg);
193
204 bool HandleJoypad(JoypadInputMsg *pMsg);
205
206 std::list<UploadInfo> mFiles; // The files of the upload directory.
207 int mSelection = 0; // The item selected on exit.
208};
209
210#endif
Front-end screen of the metagame, which places the menu projector and plays the menu sounds.
Definition freqscreen.h:28
bool HandleJoypad(JoypadInputMsg *pMsg)
Pass on a controller button of a controller the players use, and swallow any other.
void Enter(UIScreen *pPrevScreen, float fTime) override
Play the entry sound, show or hide the projector, and start the entry.
bool DispatchPriv(Message *pMsg) override
Play the sound of a chosen component, follow a shortcut, and keep unused controllers out.
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition freqscreen.h:57
void Exit(UIScreen *pNextScreen, float fTime) override
Move the projector to the next screen's place and start the exit.
bool HandleSelect(UIComponentSelectMsg *pMsg)
Follow the transition of a component chosen with the cross button.