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

ScreenNameEntryTraditional.h

Go to the documentation of this file.
00001 /* ScreenNameEntryTraditional - Enter a name for a new high score. */ 00002 00003 #ifndef SCREEN_NAME_ENTRY_TRADITIONAL_H 00004 #define SCREEN_NAME_ENTRY_TRADITIONAL_H 00005 00006 #include "ScreenWithMenuElements.h" 00007 #include "BitmapText.h" 00008 #include "RandomSample.h" 00009 #include "GradeDisplay.h" 00010 #include "Banner.h" 00011 #include "HighScore.h" 00012 #include "DifficultyIcon.h" 00013 #include "PercentageDisplay.h" 00014 #include "BGAnimation.h" 00015 00016 00017 class HighScoreWheelItem : public ActorFrame 00018 { 00019 public: 00020 void Load( int iRankIndex, const HighScore& hs ); 00021 void LoadBlank( int iRankIndex ); 00022 void ShowFocus(); 00023 00024 BitmapText m_textRank; 00025 BitmapText m_textName; 00026 BitmapText m_textScore; 00027 }; 00028 00029 class HighScoreWheel : public ActorScroller 00030 { 00031 public: 00032 void Load( const HighScoreList& hsl, int iIndexToFocus ); 00033 float Scroll(); // return seconds until done scrolling 00034 00035 vector<HighScoreWheelItem> m_Items; 00036 int m_iIndexToFocus; 00037 }; 00038 00039 class ScreenNameEntryTraditional : public ScreenWithMenuElements 00040 { 00041 public: 00042 ScreenNameEntryTraditional( CString sName ); 00043 ~ScreenNameEntryTraditional(); 00044 00045 void Update( float fDeltaTime ); 00046 void DrawPrimitives(); 00047 void HandleScreenMessage( const ScreenMessage SM ); 00048 void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00049 00050 void MenuStart( PlayerNumber pn, const InputEventType type ); 00051 void MenuLeft( PlayerNumber pn, const InputEventType type ); 00052 void MenuRight( PlayerNumber pn, const InputEventType type ); 00053 00054 private: 00055 bool AnyStillEntering() const; 00056 void AllFinished(); 00057 void PositionCharsAndCursor( int pn ); 00058 void Finish( PlayerNumber pn ); 00059 void UpdateSelectionText( int pn ); 00060 void ChangeDisplayedFeat(); 00061 void SelectChar( PlayerNumber pn, int c ); 00062 00063 ActorFrame m_Keyboard[NUM_PLAYERS]; 00064 Sprite m_sprCursor[NUM_PLAYERS]; 00065 vector<BitmapText*> m_textAlphabet[NUM_PLAYERS]; 00066 vector<int> m_AlphabetLetter[NUM_PLAYERS]; 00067 int m_SelectedChar[NUM_PLAYERS]; 00068 AutoActor m_sprOutOfRanking[NUM_PLAYERS]; // shown if didn't make any high scores 00069 Sprite m_sprNameFrame[NUM_PLAYERS]; 00070 BitmapText m_textSelection[NUM_PLAYERS]; 00071 00072 /* Feat display: */ 00073 struct FeatDisplay 00074 { 00075 HighScoreWheel m_Wheel; 00076 GradeDisplay m_Grade; 00077 DifficultyIcon m_Difficulty; 00078 BitmapText m_textCategory; 00079 PercentageDisplay m_textScore; 00080 Banner m_sprBanner; 00081 Sprite m_sprBannerFrame; 00082 }; 00083 00084 vector<FeatDisplay> m_FeatDisplay[NUM_PLAYERS]; 00085 int m_CurFeat[NUM_PLAYERS]; 00086 00087 RageSound m_soundChange; 00088 RageSound m_soundKey; 00089 RageSound m_soundInvalid; 00090 00091 wstring m_sSelection[NUM_PLAYERS]; 00092 bool m_bStillEnteringName[NUM_PLAYERS]; 00093 bool m_bGoToNextScreenWhenCardsRemoved; 00094 }; 00095 00096 #endif 00097 00098 /* 00099 * (c) 2001-2004 Glenn Maynard, Chris Danford 00100 * All rights reserved. 00101 * 00102 * Permission is hereby granted, free of charge, to any person obtaining a 00103 * copy of this software and associated documentation files (the 00104 * "Software"), to deal in the Software without restriction, including 00105 * without limitation the rights to use, copy, modify, merge, publish, 00106 * distribute, and/or sell copies of the Software, and to permit persons to 00107 * whom the Software is furnished to do so, provided that the above 00108 * copyright notice(s) and this permission notice appear in all copies of 00109 * the Software and that both the above copyright notice(s) and this 00110 * permission notice appear in supporting documentation. 00111 * 00112 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00113 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00114 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00115 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00116 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00117 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00118 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00119 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00120 * PERFORMANCE OF THIS SOFTWARE. 00121 */

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