Пример #1
0
	void SettingsGeneralControl::saveSettings()
	{
		SettingsManager::getInstance().getSector("Settings")->setPropertyValue("Grid", mGridStep);
		SettingsManager::getInstance().getSector("Settings")->setPropertyValue("LoadLastProject", mLoadLastProject->getStateSelected());
		SettingsManager::getInstance().getSector("Settings")->setPropertyValue("InterfaceLanguage", getLanguageValue());

		MyGUI::IntSize workspaceSize = MyGUI::utility::parseValue<MyGUI::IntSize>(mWorkspaceSize->getCaption());
		workspaceSize.set(std::max(64, workspaceSize.width), std::max(64, workspaceSize.height));
		SettingsManager::getInstance().getSector("Workspace")->setPropertyValue("TextureSize", workspaceSize.print());
	}
	void SettingsGeneralControl::saveSettings()
	{
		SettingsManager::getInstance().setValue("Settings/GridStep", mGridStep);
		SettingsManager::getInstance().setValue("Settings/LoadLastProject", mLoadLastProject->getStateSelected());
		SettingsManager::getInstance().setValue("Settings/InterfaceLanguage", getLanguageValue());

		MyGUI::IntSize workspaceSize = MyGUI::utility::parseValue<MyGUI::IntSize>(mWorkspaceSize->getCaption());
		workspaceSize.set((std::max)(64, workspaceSize.width), (std::max)(64, workspaceSize.height));
		SettingsManager::getInstance().setValue("Settings/WorkspaceTextureSize", workspaceSize.print());
	}
	void SettingsGeneralControl::saveSettings()
	{
		/*if (mLayoutVersion->getIndexSelected() != MyGUI::ITEM_NONE)
		{
			std::string versionName = mLayoutVersion->getItemNameAt(mLayoutVersion->getIndexSelected());
			if (versionName != BackwardCompatibilityManager::getInstancePtr()->getCurrentVersion())
				BackwardCompatibilityManager::getInstancePtr()->setCurrentVersion(versionName);
		}*/

		SettingsManager::getInstance().getSector("Settings")->setPropertyValue("Grid", mGridStep);
		SettingsManager::getInstance().getSector("Settings")->setPropertyValue("LoadLastProject", mLoadLastProject->getStateSelected());

		MyGUI::IntSize workspaceSize = MyGUI::utility::parseValue<MyGUI::IntSize>(mWorkspaceSize->getCaption());
		//workspaceSize.set(MyGUI::Bitwise::firstPO2From(workspaceSize.width), MyGUI::Bitwise::firstPO2From(workspaceSize.height));
		workspaceSize.set(std::max(64, workspaceSize.width), std::max(64, workspaceSize.height));
		SettingsManager::getInstance().getSector("Workspace")->setPropertyValue("TextureSize", workspaceSize.print());
	}