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

ScreenTextEntry.h

Go to the documentation of this file.
00001 /* ScreenTextEntry - Displays a text entry box over the top of another screen. Must use by calling SCREENMAN->AddScreenToTop( new ScreenTextEntry(...) ); */ 00002 00003 #ifndef SCREEN_TEXT_ENTRY_H 00004 #define SCREEN_TEXT_ENTRY_H 00005 00006 #include "Screen.h" 00007 #include "BitmapText.h" 00008 #include "Transition.h" 00009 #include "Quad.h" 00010 #include "RandomSample.h" 00011 #include "BGAnimation.h" 00012 00013 class ScreenTextEntry : public Screen 00014 { 00015 public: 00016 ScreenTextEntry( CString sName, CString sQuestion, CString sInitialAnswer, void(*OnOK)(CString sAnswer) = NULL, void(*OnCanel)() = NULL, bool bPassword = false ); 00017 00018 virtual void Update( float fDeltaTime ); 00019 virtual void DrawPrimitives(); 00020 virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI ); 00021 virtual void HandleScreenMessage( const ScreenMessage SM ); 00022 00023 static CString s_sLastAnswer; 00024 static bool s_bCancelledLast; 00025 00026 protected: 00027 virtual void MenuLeft( PlayerNumber pn ); 00028 virtual void MenuRight( PlayerNumber pn ); 00029 virtual void MenuStart( PlayerNumber pn ); 00030 virtual void MenuBack( PlayerNumber pn ); 00031 00032 void UpdateText(); 00033 00034 bool m_bPassword; 00035 BGAnimation m_Background; 00036 BitmapText m_textQuestion; 00037 Quad m_rectAnswerBox; 00038 wstring m_sAnswer; 00039 BitmapText m_textAnswer; 00040 void(*m_pOnOK)( CString sAnswer ); 00041 void(*m_pOnCancel)(); 00042 bool m_bCancelled; 00043 Transition m_In; 00044 Transition m_Out; 00045 }; 00046 00047 #endif 00048 00049 /* 00050 * (c) 2001-2004 Chris Danford 00051 * All rights reserved. 00052 * 00053 * Permission is hereby granted, free of charge, to any person obtaining a 00054 * copy of this software and associated documentation files (the 00055 * "Software"), to deal in the Software without restriction, including 00056 * without limitation the rights to use, copy, modify, merge, publish, 00057 * distribute, and/or sell copies of the Software, and to permit persons to 00058 * whom the Software is furnished to do so, provided that the above 00059 * copyright notice(s) and this permission notice appear in all copies of 00060 * the Software and that both the above copyright notice(s) and this 00061 * permission notice appear in supporting documentation. 00062 * 00063 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00064 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00065 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00066 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00067 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00068 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00069 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00070 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00071 * PERFORMANCE OF THIS SOFTWARE. 00072 */

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