diff --git a/include/GewiEngine.h b/include/GewiEngine.h
index 3fba848..c6e54b4 100755
--- a/include/GewiEngine.h
+++ b/include/GewiEngine.h
@@ -13,7 +13,7 @@
\brief Definition file for GewiEngine.
Definition file for GewiEngine, core engine for Gewi GUI control.
-
$Id: GewiEngine.h,v 1.5 2003/06/09 03:28:59 cozman Exp $
+
$Id: GewiEngine.h,v 1.6 2003/06/10 23:56:09 cozman Exp $
\author James Turk
**/
@@ -32,6 +32,7 @@
namespace Gewi
{
+
/*!
\brief Main GewiEngine Singleton Class
@@ -40,6 +41,12 @@ namespace Gewi
**/
class GewiEngine
{
+ public:
+ //! Static version information.
+ static VersionInfo Version;
+ //! Required ZEngine version.
+ static VersionInfo MinZEVersion;
+
private:
//! Singleton static instance of GewiEngine.
static GewiEngine *sInstance;
diff --git a/src/GewiEngine.cpp b/src/GewiEngine.cpp
index a543200..bab918d 100755
--- a/src/GewiEngine.cpp
+++ b/src/GewiEngine.cpp
@@ -13,7 +13,7 @@
\brief Implementation of GewiEngine.
Implementation of GewiEngine, core engine for Gewi GUI control.
-
$Id: GewiEngine.cpp,v 1.5 2003/06/09 03:28:43 cozman Exp $
+
$Id: GewiEngine.cpp,v 1.6 2003/06/10 23:55:59 cozman Exp $
\author James Turk
**/
@@ -23,16 +23,26 @@
namespace Gewi
{
+VersionInfo GewiEngine::Version(0,2,0,"dev");
+VersionInfo GewiEngine::MinZEVersion(0,8,4,"dev");
GewiEngine *GewiEngine::sInstance=NULL;
GewiEngine::GewiEngine()
{
- ZEngine::GetInstance()->SetEventFilter((SDL_EventFilter)GewiEngine::EventFilter);
+ ZE::ZEngine *ze = ZE::ZEngine::GetInstance();
+
+ //check version of ZEngine
+ if(ZE::ZEngine::Version < GewiEngine::MinZEVersion)
+ ze->WriteLog(FormatStr("Gewi %s requires ZEngine %s or greater, ZEngine %s in use.",
+ GewiEngine::Version.GetString().c_str(),
+ GewiEngine::MinZEVersion.GetString().c_str(),
+ ZE::ZEngine::Version.GetString().c_str()));
+
+ ze->SetEventFilter((SDL_EventFilter)GewiEngine::EventFilter);
SDL_EnableUNICODE(1); //needed for the key translation
SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY,SDL_DEFAULT_REPEAT_INTERVAL);
}
-
GewiEngine* GewiEngine::GetInstance()
{
if(!sInstance)