Browse Source

We have to load plFontCache...

Adam Johnson 11 years ago
parent
commit
60210cf38a
  1. 34
      Sources/Tools/MaxMain/GlobalUtility.cpp

34
Sources/Tools/MaxMain/GlobalUtility.cpp

@ -63,6 +63,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
#include "plMaxCFGFile.h" #include "plMaxCFGFile.h"
#include "pfLocalizationMgr/pfLocalizationMgr.h" #include "pfLocalizationMgr/pfLocalizationMgr.h"
#include "plGImage/plFontCache.h"
extern plActionTableMgr theActionTableMgr; extern plActionTableMgr theActionTableMgr;
extern HINSTANCE hInstance; extern HINSTANCE hInstance;
@ -208,14 +209,6 @@ DWORD PlasmaMax::Start()
SceneSync::Instance(); SceneSync::Instance();
#endif #endif
plComponentShow::Init();
plCreateMenu();
RegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN);
RegisterNotification(NotifyProc, 0, NOTIFY_SYSTEM_STARTUP);
#ifdef MAXSCENEVIEWER_ENABLED #ifdef MAXSCENEVIEWER_ENABLED
InitMaxFileData(); InitMaxFileData();
#endif #endif
@ -225,14 +218,26 @@ DWORD PlasmaMax::Start()
plFileName pathTemp = plMaxConfig::GetClientPath(false, true); plFileName pathTemp = plMaxConfig::GetClientPath(false, true);
if (!pathTemp.IsValid()) if (!pathTemp.IsValid())
{ {
hsMessageBox("PlasmaMAX2.ini is missing or invalid", "Plasma/2.0 Error", hsMessageBoxNormal); hsMessageBox("PlasmaMAX2.ini is missing or invalid.\nPlasmaMAX will be unavailable until this file is added.",
} "PlasmaMAX2 Error", hsMessageBoxNormal, hsMessageBoxIconExclamation);
else return GUPRESULT_NOKEEP;
{
plFileName clientPath = plFileName::Join(pathTemp, "dat");
pfLocalizationMgr::Initialize(clientPath);
} }
// Setup the doggone plugin
plComponentShow::Init();
plCreateMenu();
RegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN);
RegisterNotification(NotifyProc, 0, NOTIFY_SYSTEM_STARTUP);
// Now we have to init like we're a real doggone client...
plFileName clientPath = plFileName::Join(pathTemp, "dat");
pfLocalizationMgr::Initialize(clientPath);
// init font cache singleton
plFontCache* fonts = new plFontCache();
fonts->LoadCustomFonts(clientPath);
return GUPRESULT_KEEP; return GUPRESULT_KEEP;
} }
@ -241,6 +246,7 @@ void PlasmaMax::Stop()
UnRegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN); UnRegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN);
pfLocalizationMgr::Shutdown(); pfLocalizationMgr::Shutdown();
plFontCache::GetInstance().UnRegisterAs(kFontCache_KEY);
PythonInterface::WeAreInShutdown(); PythonInterface::WeAreInShutdown();
PythonInterface::finiPython(); PythonInterface::finiPython();

Loading…
Cancel
Save