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 "pfLocalizationMgr/pfLocalizationMgr.h"
#include "plGImage/plFontCache.h"
extern plActionTableMgr theActionTableMgr;
extern HINSTANCE hInstance;
@ -208,14 +209,6 @@ DWORD PlasmaMax::Start()
SceneSync::Instance();
#endif
plComponentShow::Init();
plCreateMenu();
RegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN);
RegisterNotification(NotifyProc, 0, NOTIFY_SYSTEM_STARTUP);
#ifdef MAXSCENEVIEWER_ENABLED
InitMaxFileData();
#endif
@ -225,14 +218,26 @@ DWORD PlasmaMax::Start()
plFileName pathTemp = plMaxConfig::GetClientPath(false, true);
if (!pathTemp.IsValid())
{
hsMessageBox("PlasmaMAX2.ini is missing or invalid", "Plasma/2.0 Error", hsMessageBoxNormal);
}
else
{
plFileName clientPath = plFileName::Join(pathTemp, "dat");
pfLocalizationMgr::Initialize(clientPath);
hsMessageBox("PlasmaMAX2.ini is missing or invalid.\nPlasmaMAX will be unavailable until this file is added.",
"PlasmaMAX2 Error", hsMessageBoxNormal, hsMessageBoxIconExclamation);
return GUPRESULT_NOKEEP;
}
// 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;
}
@ -241,6 +246,7 @@ void PlasmaMax::Stop()
UnRegisterNotification(NotifyProc, 0, NOTIFY_FILE_POST_OPEN);
pfLocalizationMgr::Shutdown();
plFontCache::GetInstance().UnRegisterAs(kFontCache_KEY);
PythonInterface::WeAreInShutdown();
PythonInterface::finiPython();

Loading…
Cancel
Save