00001
#ifndef ScreenSelectMaster_H
00002
#define ScreenSelectMaster_H
00003
00004
#include "ScreenSelect.h"
00005
#include "Sprite.h"
00006
#include "BitmapText.h"
00007
#include "RageSound.h"
00008
#include "RandomSample.h"
00009
#include "ActorUtil.h"
00010
#include "ActorScroller.h"
00011
00012 #define MAX_CHOICES 30
00013
00014 class ScreenSelectMaster :
public ScreenSelect
00015 {
00016
public:
00017
ScreenSelectMaster(
CString sName );
00018
00019
virtual void Update(
float fDelta );
00020
00021
virtual void MenuLeft(
PlayerNumber pn );
00022
virtual void MenuRight(
PlayerNumber pn );
00023
virtual void MenuUp(
PlayerNumber pn );
00024
virtual void MenuDown(
PlayerNumber pn );
00025
virtual void MenuStart(
PlayerNumber pn );
00026
void TweenOffScreen();
00027
void TweenOnScreen();
00028
00029
virtual void HandleScreenMessage(
const ScreenMessage SM );
00030
00031
protected:
00032 enum Page {
PAGE_1,
PAGE_2,
NUM_PAGES };
00033 Page GetPage(
int iChoiceIndex )
const;
00034 Page
GetCurrentPage() const;
00035
00036 enum Dirs
00037 {
00038
DIR_UP,
00039
DIR_DOWN,
00040
DIR_LEFT,
00041
DIR_RIGHT,
00042
DIR_AUTO,
00043
NUM_DIRS
00044 };
00045
static const char *dirs[NUM_DIRS];
00046 int m_Next[
NUM_DIRS][
MAX_CHOICES];
00047
00048
virtual int GetSelectionIndex( PlayerNumber pn );
00049
virtual void UpdateSelectableChoices();
00050
00051
bool Move( PlayerNumber pn, Dirs dir );
00052
bool ChangePage(
int iNewChoice );
00053
bool ChangeSelection( PlayerNumber pn,
int iNewChoice );
00054
float DoMenuStart( PlayerNumber pn );
00055
00056
float GetCursorX( PlayerNumber pn,
int iPartIndex );
00057
float GetCursorY( PlayerNumber pn,
int iPartIndex );
00058
00059 AutoActor m_sprExplanation[
NUM_PAGES];
00060 AutoActor m_sprMore[
NUM_PAGES];
00061 #define MAX_ICON_PARTS 3
00062
00063 AutoActor m_sprIcon[
MAX_ICON_PARTS][
MAX_CHOICES];
00064 #define MAX_PREVIEW_PARTS 3
00065
00066 AutoActor m_sprPreview[
MAX_PREVIEW_PARTS][
MAX_CHOICES][
NUM_PLAYERS];
00067 #define MAX_CURSOR_PARTS 3
00068
00069 AutoActor m_sprCursor[
MAX_CURSOR_PARTS][
NUM_PLAYERS];
00070
00071 AutoActor m_sprScroll[
MAX_CHOICES][
NUM_PLAYERS];
00072 ActorScroller m_Scroller[
NUM_PLAYERS];
00073
00074 RageSound m_soundChange;
00075 RandomSample m_soundDifficult;
00076 RageSound m_soundStart;
00077
00078 int m_iChoice[
NUM_PLAYERS];
00079 bool m_bChosen[
NUM_PLAYERS];
00080
00081 float m_fLockInputSecs;
00082 };
00083
00084
00085
#endif
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110