Files
itgmania212121/stepmania/src/Screen.h
T

73 lines
2.3 KiB
C++
Raw Normal View History

#ifndef SCREEN_H
#define SCREEN_H
2002-05-20 08:59:37 +00:00
/*
-----------------------------------------------------------------------------
Class: Screen
Desc: Class representing a game state. It also holds Actors.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "RageInput.h"
#include "ActorFrame.h"
#include "ScreenMessage.h"
#include "InputFilter.h"
#include "GameInput.h"
#include "MenuInput.h"
#include "StyleInput.h"
class Screen : public ActorFrame
{
public:
Screen();
virtual ~Screen();
virtual void AddChild( Actor* pActor );
2002-05-20 08:59:37 +00:00
// let subclass override if they want
virtual void Restore() {};
virtual void Invalidate() {};
virtual void Update( float fDeltaTime );
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM ) {};
void SendScreenMessage( const ScreenMessage SM, const float fDelay );
2002-10-31 03:36:06 +00:00
void ClearMessageQueue() { m_QueuedMessages.clear(); }
2002-05-20 08:59:37 +00:00
protected:
// structure for holding messages sent to a Screen
struct QueuedScreenMessage {
ScreenMessage SM;
float fDelayRemaining;
};
2003-01-03 05:56:28 +00:00
vector<QueuedScreenMessage> m_QueuedMessages;
2002-05-20 08:59:37 +00:00
public:
// let subclass override if they want
virtual void MenuUp( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuUp(pn); }
virtual void MenuDown( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuDown(pn); }
virtual void MenuLeft( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuLeft(pn); }
virtual void MenuRight( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuRight(pn); }
virtual void MenuStart( PlayerNumber pn, const InputEventType type ) { if(type==IET_FIRST_PRESS) MenuStart(pn); }
virtual void MenuBack( PlayerNumber pn, const InputEventType type );
2002-05-20 08:59:37 +00:00
virtual void MenuUp( PlayerNumber pn ) {};
virtual void MenuDown( PlayerNumber pn ) {};
virtual void MenuLeft( PlayerNumber pn ) {};
virtual void MenuRight( PlayerNumber pn ) {};
virtual void MenuStart( PlayerNumber pn ) {};
virtual void MenuBack( PlayerNumber pn ) {};
2002-09-04 00:17:51 +00:00
private:
bool m_FirstUpdate;
2002-05-20 08:59:37 +00:00
};
#endif