Files
itgmania212121/stepmania/src/ScreenPrompt.h
T

53 lines
1.5 KiB
C++
Raw Normal View History

2002-05-20 08:59:37 +00:00
/*
-----------------------------------------------------------------------------
2002-07-27 19:29:51 +00:00
Class: ScreenPrompt
2002-05-20 08:59:37 +00:00
2002-07-27 19:29:51 +00:00
Desc: Displays a prompt over the top of another screen. Must use by calling
SCREENMAN->AddScreenToTop( new ScreenPrompt(...) );
2002-05-20 08:59:37 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-07-27 19:29:51 +00:00
Chris Danford
2002-05-20 08:59:37 +00:00
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "BitmapText.h"
#include "TransitionFade.h"
#include "Quad.h"
#include "RandomSample.h"
enum PromptType{ PROMPT_OK, PROMPT_YES_NO };
class ScreenPrompt : public Screen
{
public:
2002-07-27 19:29:51 +00:00
ScreenPrompt();
ScreenPrompt( ScreenMessage SM_SendWhenDone, CString sText, PromptType pt, bool bDefaultAnswer = false, void(*OnYes)(void*) = NULL, void(*OnNo)(void*) = NULL );
2002-05-20 08:59:37 +00:00
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
protected:
2002-05-27 18:36:01 +00:00
void MenuLeft( const PlayerNumber p );
void MenuRight( const PlayerNumber p );
void MenuBack( const PlayerNumber p );
void MenuStart( const PlayerNumber p );
2002-05-20 08:59:37 +00:00
2002-07-27 19:29:51 +00:00
TransitionFade m_Fade;
BitmapText m_textQuestion;
Quad m_rectAnswerBox;
2002-05-20 08:59:37 +00:00
BitmapText m_textAnswer[2]; // "YES" or "NO"
PromptType m_PromptType;
2002-07-27 19:29:51 +00:00
bool m_bAnswer; // true = "YES", false = "NO";
ScreenMessage m_SMSendWhenDone;
void(*m_pOnYes)(void* pContext);
void(*m_pOnNo)(void* pContext);
2002-05-20 08:59:37 +00:00
};