Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

ScreenSelectMaster.h

Go to the documentation of this file.
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 }; // on PAGE_2, cursors are locked together 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, // when players join and the selection becomes invalid 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 // icon is the piece shared, per-choice piece 00063 AutoActor m_sprIcon[MAX_ICON_PARTS][MAX_CHOICES]; 00064 #define MAX_PREVIEW_PARTS 3 00065 // preview is per-choice, per-player piece 00066 AutoActor m_sprPreview[MAX_PREVIEW_PARTS][MAX_CHOICES][NUM_PLAYERS]; 00067 #define MAX_CURSOR_PARTS 3 00068 // cursor is the per-player that's shared by all choices 00069 AutoActor m_sprCursor[MAX_CURSOR_PARTS][NUM_PLAYERS]; 00070 // scroll is the per-player, per-choice piece that's scrolled 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 * (c) 2003-2004 Chris Danford 00089 * All rights reserved. 00090 * 00091 * Permission is hereby granted, free of charge, to any person obtaining a 00092 * copy of this software and associated documentation files (the 00093 * "Software"), to deal in the Software without restriction, including 00094 * without limitation the rights to use, copy, modify, merge, publish, 00095 * distribute, and/or sell copies of the Software, and to permit persons to 00096 * whom the Software is furnished to do so, provided that the above 00097 * copyright notice(s) and this permission notice appear in all copies of 00098 * the Software and that both the above copyright notice(s) and this 00099 * permission notice appear in supporting documentation. 00100 * 00101 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00102 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00103 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00104 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00105 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00106 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00107 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00108 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00109 * PERFORMANCE OF THIS SOFTWARE. 00110 */

Generated on Thu Jan 27 20:57:32 2005 for StepMania by doxygen 1.3.7