00001 /* ScreenSelect - Base class for Style, Difficulty, and Mode selection screens. */ 00002 00003 #ifndef SCREEN_SELECT_H 00004 #define SCREEN_SELECT_H 00005 00006 #include "ScreenWithMenuElements.h" 00007 #include "GameCommand.h" 00008 #include "CodeDetector.h" 00009 #include "ThemeMetric.h" 00010 00011 // Derived classes must send this when done 00012 const ScreenMessage SM_AllDoneChoosing = (ScreenMessage)(SM_User+123); // unique 00013 00014 class ScreenSelect : public ScreenWithMenuElements 00015 { 00016 public: 00017 ScreenSelect( CString sClassName ); 00018 virtual ~ScreenSelect(); 00019 00020 virtual void Update( float fDelta ); 00021 virtual void DrawPrimitives(); 00022 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00023 virtual void HandleScreenMessage( const ScreenMessage SM ); 00024 00025 virtual void MenuBack( PlayerNumber pn ); 00026 00027 protected: 00028 virtual int GetSelectionIndex( PlayerNumber pn ) = 0; 00029 virtual void UpdateSelectableChoices() = 0; // derived screens must handle this 00030 00031 vector<GameCommand> m_aGameCommands; // derived classes should look here for what choices are available 00032 00033 vector<CodeItem> m_aCodes; 00034 vector<GameCommand> m_aCodeChoices; 00035 00036 RageTimer m_timerIdleComment; // count up to time between idle comment announcer sounds 00037 RageTimer m_timerIdleTimeout; // count up to go to the timeout screen 00038 00039 ThemeMetric<float> IDLE_COMMENT_SECONDS; 00040 ThemeMetric<float> IDLE_TIMEOUT_SECONDS; 00041 }; 00042 00043 #endif 00044 00045 /* 00046 * (c) 2001-2004 Chris Danford 00047 * All rights reserved. 00048 * 00049 * Permission is hereby granted, free of charge, to any person obtaining a 00050 * copy of this software and associated documentation files (the 00051 * "Software"), to deal in the Software without restriction, including 00052 * without limitation the rights to use, copy, modify, merge, publish, 00053 * distribute, and/or sell copies of the Software, and to permit persons to 00054 * whom the Software is furnished to do so, provided that the above 00055 * copyright notice(s) and this permission notice appear in all copies of 00056 * the Software and that both the above copyright notice(s) and this 00057 * permission notice appear in supporting documentation. 00058 * 00059 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00060 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00061 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00062 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00063 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00064 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00065 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00066 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00067 * PERFORMANCE OF THIS SOFTWARE. 00068 */