remove Screen.h dep on ScreenManager.h. (this looked more useful before pulling in the higher-level includes, but still seems like the right thing to do)

This commit is contained in:
Glenn Maynard
2005-07-20 09:49:46 +00:00
parent 6ac51af9c2
commit ea3e2ba6f9
3 changed files with 6 additions and 7 deletions
+5 -2
View File
@@ -9,14 +9,17 @@
#include "GameInput.h"
#include "MenuInput.h"
#include "StyleInput.h"
#include "ScreenManager.h"
#include "ThemeMetric.h"
class Screen;
typedef Screen* (*CreateScreenFn)(const CString& sClassName);
void RegisterScreenClass( const CString& sClassName, CreateScreenFn pfn );
// Each Screen class should have a REGISTER_SCREEN_CLASS in its CPP file.
#define REGISTER_SCREEN_CLASS( className ) \
static Screen* Create##className( const CString &sName ) { Screen *pRet = new className( sName ); pRet->Init(); return pRet; } \
struct Register##className { \
Register##className() { SCREENMAN->Register(#className,Create##className); } \
Register##className() { RegisterScreenClass( #className,Create##className); } \
}; \
static Register##className register_##className;