void Application::createScene() { if (getStatisticInfo() != nullptr) getStatisticInfo()->setVisible(false); std::string layerCategory = MyGUI::LayerManager::getInstance().getCategoryName(); MyGUI::FactoryManager::getInstance().registerFactory<MyGUI::RTTLayer>(layerCategory); std::string subWidgetCategory = MyGUI::SubWidgetManager::getInstance().getCategoryName(); MyGUI::FactoryManager::getInstance().registerFactory<MyGUI::FilterNone>(subWidgetCategory); new SettingsManager(); SettingsManager::getInstance().loadSettingsFile(MyGUI::DataManager::getInstance().getDataPath("Settings.xml")); std::string userSettingsFileName = SettingsManager::getInstance().getValue("Editor/UserSettingsFileName"); if (!userSettingsFileName.empty()) SettingsManager::getInstance().loadUserSettingsFile(userSettingsFileName); new HotKeyManager(); HotKeyManager::getInstance().initialise(); LoadGuiSettings(); std::string language = SettingsManager::getInstance().getValue("Settings/InterfaceLanguage"); if (language.empty() || language == "Auto") { if (!mLocale.empty()) MyGUI::LanguageManager::getInstance().setCurrentLanguage(mLocale); } else { MyGUI::LanguageManager::getInstance().setCurrentLanguage(language); } new CommandManager(); CommandManager::getInstance().initialise(); new WidgetSelectorManager(); WidgetSelectorManager::getInstance().initialise(); new WidgetCreatorManager(); WidgetCreatorManager::getInstance().initialise(); new MessageBoxManager(); MessageBoxManager::getInstance().initialise(); new DialogManager(); DialogManager::getInstance().initialise(); new WidgetTypes(); WidgetTypes::getInstance().initialise(); new EditorWidgets(); EditorWidgets::getInstance().initialise(); new BackwardCompatibilityManager(); BackwardCompatibilityManager::getInstance().initialise(); new UndoManager(); UndoManager::getInstance().initialise(EditorWidgets::getInstancePtr()); new StateManager(); StateManager::getInstance().initialise(); new GroupMessage(); GroupMessage::getInstance().initialise(); new RecentFilesManager(); RecentFilesManager::getInstance().initialise(); new ColourManager(); ColourManager::getInstance().initialise(); new EditorToolTip(); EditorToolTip::getInstance().initialise(); new PropertyFieldManager(); PropertyFieldManager::getInstance().initialise(); new GridManager(); GridManager::getInstance().initialise(); MyGUI::ResourceManager::getInstance().load("Initialise.xml"); bool maximized = SettingsManager::getInstance().getValue<bool>("Controls/Main/Maximized"); setWindowMaximized(maximized); if (!maximized) { MyGUI::IntCoord windowCoord = SettingsManager::getInstance().getValue<MyGUI::IntCoord>("Controls/Main/Coord"); setWindowCoord(windowCoord); } CommandManager::getInstance().getEvent("Command_StatisticInfo")->connect(this, &Application::command_StatisticInfo); CommandManager::getInstance().getEvent("Command_FocusVisible")->connect(this, &Application::command_FocusVisible); CommandManager::getInstance().getEvent("Command_ScreenShot")->connect(this, &Application::command_ScreenShot); CommandManager::getInstance().getEvent("Command_QuitApp")->connect(this, &Application::command_QuitApp); CommandManager::getInstance().getEvent("Command_UpdateAppCaption")->connect(this, &Application::command_UpdateAppCaption); LoadStates(); }
void Application::createScene() { new SettingsManager(); SettingsManager::getInstance().loadSettingsFile(MyGUI::DataManager::getInstance().getDataPath("Settings.xml")); std::string userSettingsFileName = SettingsManager::getInstance().getValue("Editor/UserSettingsFileName"); if (!userSettingsFileName.empty()) SettingsManager::getInstance().loadUserSettingsFile(userSettingsFileName); new HotKeyManager(); HotKeyManager::getInstance().initialise(); MyGUI::FactoryManager::getInstance().registerFactory<MyGUI::FilterNone>("BasisSkin"); LoadGuiSettings(); std::string language = SettingsManager::getInstance().getValue("Settings/InterfaceLanguage"); if (language.empty() || language == "Auto") { if (!mLocale.empty()) MyGUI::LanguageManager::getInstance().setCurrentLanguage(mLocale); } else { MyGUI::LanguageManager::getInstance().setCurrentLanguage(language); } new RecentFilesManager(); RecentFilesManager::getInstance().initialise(); new CommandManager(); CommandManager::getInstance().initialise(); new ActionManager(); ActionManager::getInstance().initialise(); new ExportManager(); ExportManager::getInstance().initialise(); new MessageBoxManager(); MessageBoxManager::getInstance().initialise(); new DialogManager(); DialogManager::getInstance().initialise(); new StateManager(); StateManager::getInstance().initialise(); new ColourManager(); ColourManager::getInstance().initialise(); new GridManager(); GridManager::getInstance().initialise(); new ScopeManager(); ScopeManager::getInstance().initialise(); new tools::DataTypeManager(); tools::DataTypeManager::getInstance().initialise(); std::string dataTypeFileName = SettingsManager::getInstance().getValue("Editor/DataTypeFileName"); if (!dataTypeFileName.empty()) tools::DataTypeManager::getInstance().load(dataTypeFileName); new tools::DataManager(); tools::DataManager::getInstance().initialise(); new tools::DataSelectorManager(); tools::DataSelectorManager::getInstance().initialise(); bool maximized = SettingsManager::getInstance().getValue<bool>("Controls/Main/Maximized"); setWindowMaximized(maximized); if (!maximized) { MyGUI::IntCoord windowCoord = SettingsManager::getInstance().getValue<MyGUI::IntCoord>("Controls/Main/Coord"); setWindowCoord(windowCoord); } CommandManager::getInstance().getEvent("Command_ScreenShot")->connect(this, &Application::command_ScreenShot); CommandManager::getInstance().getEvent("Command_QuitApp")->connect(this, &Application::command_QuitApp); CommandManager::getInstance().getEvent("Command_UpdateAppCaption")->connect(this, &Application::command_UpdateAppCaption); CreateControls(); LoadStates(); }