void Water::processChangedSettings(const Settings::CategorySettingVector& settings) { bool applyRT = false; bool applyVisMask = false; for (Settings::CategorySettingVector::const_iterator it=settings.begin(); it != settings.end(); ++it) { if ( it->first == "Water" && ( it->second == "shader" || it->second == "refraction" || it->second == "rtt size")) applyRT = true; if ( it->first == "Water" && ( it->second == "reflect actors" || it->second == "reflect terrain" || it->second == "reflect misc" || it->second == "reflect small statics" || it->second == "reflect statics")) applyVisMask = true; } if(applyRT) { applyRTT(); applyVisibilityMask(); mWater->setMaterial(mMaterial); } if (applyVisMask) applyVisibilityMask(); }
void WindowManager::processChangedSettings(const Settings::CategorySettingVector& changed) { mHud->setFpsLevel(Settings::Manager::getInt("fps", "HUD")); mToolTips->setDelay(Settings::Manager::getFloat("tooltip delay", "GUI")); bool changeRes = false; for (Settings::CategorySettingVector::const_iterator it = changed.begin(); it != changed.end(); ++it) { if (it->first == "Video" && ( it->second == "resolution x" || it->second == "resolution y")) { changeRes = true; } } if (changeRes) { int x = Settings::Manager::getInt("resolution x", "Video"); int y = Settings::Manager::getInt("resolution y", "Video"); mHud->onResChange(x, y); mConsole->onResChange(x, y); mMenu->onResChange(x, y); mSettingsWindow->center(); mAlchemyWindow->center(); mScrollWindow->center(); mBookWindow->center(); mDragAndDrop->mDragAndDropWidget->setSize(MyGUI::IntSize(x, y)); } }
void MWInputManager::processChangedSettings(const Settings::CategorySettingVector& changed) { bool changeRes = false; for (Settings::CategorySettingVector::const_iterator it = changed.begin(); it != changed.end(); ++it) { if (it->first == "Video" && ( it->second == "resolution x" || it->second == "resolution y")) changeRes = true; } if (changeRes) impl->adjustMouseRegion(Settings::Manager::getInt("resolution x", "Video"), Settings::Manager::getInt("resolution y", "Video")); }
void WindowManager::processChangedSettings(const Settings::CategorySettingVector& changed) { mHud->setFpsLevel(Settings::Manager::getInt("fps", "HUD")); mToolTips->setDelay(Settings::Manager::getFloat("tooltip delay", "GUI")); bool changeRes = false; bool windowRecreated = false; for (Settings::CategorySettingVector::const_iterator it = changed.begin(); it != changed.end(); ++it) { if (it->first == "Video" && ( it->second == "resolution x" || it->second == "resolution y")) { changeRes = true; } else if (it->first == "Video" && it->second == "vsync") windowRecreated = true; else if (it->first == "HUD" && it->second == "crosshair") mCrosshairEnabled = Settings::Manager::getBool ("crosshair", "HUD"); else if (it->first == "GUI" && it->second == "subtitles") mSubtitlesEnabled = Settings::Manager::getBool ("subtitles", "GUI"); } if (changeRes) { int x = Settings::Manager::getInt("resolution x", "Video"); int y = Settings::Manager::getInt("resolution y", "Video"); mHud->onResChange(x, y); mConsole->onResChange(x, y); mMenu->onResChange(x, y); mSettingsWindow->center(); mAlchemyWindow->center(); mScrollWindow->center(); mBookWindow->center(); mQuickKeysMenu->center(); mSpellBuyingWindow->center(); mLoadingScreen->onResChange (x,y); mDragAndDrop->mDragAndDropWidget->setSize(MyGUI::IntSize(x, y)); mInputBlocker->setSize(MyGUI::IntSize(x,y)); } if (windowRecreated) { mGuiManager->updateWindow (mRendering->getWindow ()); mLoadingScreen->updateWindow (mRendering->getWindow ()); } }
void RenderingManager::processChangedSettings(const Settings::CategorySettingVector &changed) { for (Settings::CategorySettingVector::const_iterator it = changed.begin(); it != changed.end(); ++it) { if (it->first == "General" && it->second == "field of view") { mFieldOfView = Settings::Manager::getFloat("field of view", "General"); updateProjectionMatrix(); } else if (it->first == "Camera" && it->second == "viewing distance") { mViewDistance = Settings::Manager::getFloat("viewing distance", "Camera"); mStateUpdater->setFogEnd(mViewDistance); updateProjectionMatrix(); } else if (it->first == "General" && (it->second == "texture filtering" || it->second == "anisotropy")) updateTextureFiltering(); } }