diff options
Diffstat (limited to 'linden/indra/newview/llpaneldisplay.cpp')
-rw-r--r-- | linden/indra/newview/llpaneldisplay.cpp | 50 |
1 files changed, 16 insertions, 34 deletions
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp index a5c0d97..9ee7dc3 100644 --- a/linden/indra/newview/llpaneldisplay.cpp +++ b/linden/indra/newview/llpaneldisplay.cpp | |||
@@ -120,7 +120,6 @@ BOOL LLPanelDisplay::postBuild() | |||
120 | mCtrlWindowed->setCallbackUserData(this); | 120 | mCtrlWindowed->setCallbackUserData(this); |
121 | 121 | ||
122 | mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1"); | 122 | mAspectRatioLabel1 = getChild<LLTextBox>("AspectRatioLabel1"); |
123 | mFullScreenInfo = getChild<LLTextEditor>("FullScreenInfo"); | ||
124 | mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel"); | 123 | mDisplayResLabel = getChild<LLTextBox>("DisplayResLabel"); |
125 | 124 | ||
126 | S32 num_resolutions = 0; | 125 | S32 num_resolutions = 0; |
@@ -229,7 +228,7 @@ BOOL LLPanelDisplay::postBuild() | |||
229 | mCtrlReflections = getChild<LLCheckBoxCtrl>("Reflections"); | 228 | mCtrlReflections = getChild<LLCheckBoxCtrl>("Reflections"); |
230 | mCtrlReflections->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable); | 229 | mCtrlReflections->setCommitCallback(&LLPanelDisplay::onVertexShaderEnable); |
231 | mCtrlReflections->setCallbackUserData(this); | 230 | mCtrlReflections->setCallbackUserData(this); |
232 | mRadioReflectionDetail = getChild<LLRadioGroup>("ReflectionDetailRadio"); | 231 | mComboReflectionDetail = getChild<LLComboBox>("ReflectionDetailCombo"); |
233 | 232 | ||
234 | // WindLight | 233 | // WindLight |
235 | mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders"); | 234 | mCtrlWindLight = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders"); |
@@ -251,11 +250,11 @@ BOOL LLPanelDisplay::postBuild() | |||
251 | 250 | ||
252 | //---------------------------------------------------------------------------- | 251 | //---------------------------------------------------------------------------- |
253 | // radio set for lighting detail | 252 | // radio set for lighting detail |
254 | mRadioLightingDetail2 = getChild<LLRadioGroup>("LightingDetailRadio"); | 253 | mComboLightingDetail = getChild<LLComboBox>("LightingDetailCombo"); |
255 | 254 | ||
256 | //---------------------------------------------------------------------------- | 255 | //---------------------------------------------------------------------------- |
257 | // radio set for terrain detail mode | 256 | // radio set for terrain detail mode |
258 | mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); | 257 | mComboTerrainDetail = getChild<LLComboBox>("TerrainDetailCombo"); |
259 | 258 | ||
260 | //---------------------------------------------------------------------------- | 259 | //---------------------------------------------------------------------------- |
261 | // Global Shader Enable | 260 | // Global Shader Enable |
@@ -316,7 +315,6 @@ BOOL LLPanelDisplay::postBuild() | |||
316 | 315 | ||
317 | // Avatar imposter count | 316 | // Avatar imposter count |
318 | mCtrlAvatarMaxVisible = getChild<LLSliderCtrl>("AvatarMaxVisible"); | 317 | mCtrlAvatarMaxVisible = getChild<LLSliderCtrl>("AvatarMaxVisible"); |
319 | mAvatarCountText = getChild<LLTextBox>("AvatarCountText"); | ||
320 | 318 | ||
321 | // Text boxes (for enabling/disabling) | 319 | // Text boxes (for enabling/disabling) |
322 | mShaderText = getChild<LLTextBox>("ShadersText"); | 320 | mShaderText = getChild<LLTextBox>("ShadersText"); |
@@ -325,10 +323,7 @@ BOOL LLPanelDisplay::postBuild() | |||
325 | mTerrainText = getChild<LLTextBox>("TerrainDetailText"); | 323 | mTerrainText = getChild<LLTextBox>("TerrainDetailText"); |
326 | mLightingText = getChild<LLTextBox>("LightingDetailText"); | 324 | mLightingText = getChild<LLTextBox>("LightingDetailText"); |
327 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); | 325 | mMeshDetailText = getChild<LLTextBox>("MeshDetailText"); |
328 | 326 | mLimitsText = getChild<LLTextBox>("LimitsText"); | |
329 | static BOOL* sEnableWindlightRemote = rebind_llcontrol<BOOL>("EnableWindlightRemote", &gSavedSettings, true); | ||
330 | childSetValue("toggle_windlight_control", (*sEnableWindlightRemote)); | ||
331 | mWLControl = (*sEnableWindlightRemote); | ||
332 | 327 | ||
333 | refresh(); | 328 | refresh(); |
334 | 329 | ||
@@ -420,10 +415,6 @@ void LLPanelDisplay::refresh() | |||
420 | mLightingDetail = gSavedSettings.getS32("RenderLightingDetail"); | 415 | mLightingDetail = gSavedSettings.getS32("RenderLightingDetail"); |
421 | mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); | 416 | mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); |
422 | 417 | ||
423 | // windlight remote | ||
424 | static BOOL* sEnableWindlightRemote = rebind_llcontrol<BOOL>("EnableWindlightRemote", &gSavedSettings, true); | ||
425 | mWLControl = (*sEnableWindlightRemote); | ||
426 | |||
427 | // max avatar count | 418 | // max avatar count |
428 | mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); | 419 | mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible"); |
429 | 420 | ||
@@ -449,7 +440,6 @@ void LLPanelDisplay::refreshEnabledState() | |||
449 | mCtrlAspectRatio->setVisible(isFullScreen); | 440 | mCtrlAspectRatio->setVisible(isFullScreen); |
450 | mAspectRatioLabel1->setVisible(isFullScreen); | 441 | mAspectRatioLabel1->setVisible(isFullScreen); |
451 | mCtrlAutoDetectAspect->setVisible(isFullScreen); | 442 | mCtrlAutoDetectAspect->setVisible(isFullScreen); |
452 | mFullScreenInfo->setVisible(!isFullScreen); | ||
453 | mWindowSizeLabel->setVisible(!isFullScreen); | 443 | mWindowSizeLabel->setVisible(!isFullScreen); |
454 | 444 | ||
455 | // disable graphics settings and exit if it's not set to custom | 445 | // disable graphics settings and exit if it's not set to custom |
@@ -475,10 +465,7 @@ void LLPanelDisplay::refreshEnabledState() | |||
475 | bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); | 465 | bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump"); |
476 | mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE); | 466 | mCtrlBumpShiny->setEnabled(bumpshiny ? TRUE : FALSE); |
477 | 467 | ||
478 | for (S32 i = 0; i < mRadioReflectionDetail->getItemCount(); ++i) | 468 | mComboReflectionDetail->setEnabled(mCtrlReflections->get() && reflections); |
479 | { | ||
480 | mRadioReflectionDetail->setIndexEnabled(i, mCtrlReflections->get() && reflections); | ||
481 | } | ||
482 | 469 | ||
483 | // Avatar Mode | 470 | // Avatar Mode |
484 | S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; | 471 | S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel; |
@@ -505,12 +492,12 @@ void LLPanelDisplay::refreshEnabledState() | |||
505 | BOOL shaders = mCtrlShaderEnable->get(); | 492 | BOOL shaders = mCtrlShaderEnable->get(); |
506 | if (shaders) | 493 | if (shaders) |
507 | { | 494 | { |
508 | mRadioTerrainDetail->setValue(1); | 495 | mComboTerrainDetail->setValue(1); |
509 | mRadioTerrainDetail->setEnabled(FALSE); | 496 | mComboTerrainDetail->setEnabled(FALSE); |
510 | } | 497 | } |
511 | else | 498 | else |
512 | { | 499 | { |
513 | mRadioTerrainDetail->setEnabled(TRUE); | 500 | mComboTerrainDetail->setEnabled(TRUE); |
514 | } | 501 | } |
515 | 502 | ||
516 | // *HACK just checks to see if we can use shaders... | 503 | // *HACK just checks to see if we can use shaders... |
@@ -588,7 +575,6 @@ void LLPanelDisplay::disableUnavailableSettings() | |||
588 | } | 575 | } |
589 | 576 | ||
590 | mCtrlAvatarMaxVisible->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean()); | 577 | mCtrlAvatarMaxVisible->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean()); |
591 | mAvatarCountText->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean()); | ||
592 | } | 578 | } |
593 | 579 | ||
594 | void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | 580 | void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) |
@@ -622,10 +608,10 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | |||
622 | llassert(mCtrlShaderEnable != NULL); | 608 | llassert(mCtrlShaderEnable != NULL); |
623 | llassert(mCtrlAvatarImpostors != NULL); | 609 | llassert(mCtrlAvatarImpostors != NULL); |
624 | llassert(mCtrlAvatarCloth != NULL); | 610 | llassert(mCtrlAvatarCloth != NULL); |
625 | llassert(mRadioLightingDetail2 != NULL); | 611 | llassert(mComboLightingDetail != NULL); |
626 | 612 | ||
627 | llassert(mRadioTerrainDetail != NULL); | 613 | llassert(mComboTerrainDetail != NULL); |
628 | llassert(mRadioReflectionDetail != NULL); | 614 | llassert(mComboReflectionDetail != NULL); |
629 | 615 | ||
630 | llassert(mMeshDetailText != NULL); | 616 | llassert(mMeshDetailText != NULL); |
631 | llassert(mShaderText != NULL); | 617 | llassert(mShaderText != NULL); |
@@ -633,7 +619,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | |||
633 | llassert(mAvatarText != NULL); | 619 | llassert(mAvatarText != NULL); |
634 | llassert(mLightingText != NULL); | 620 | llassert(mLightingText != NULL); |
635 | llassert(mTerrainText != NULL); | 621 | llassert(mTerrainText != NULL); |
636 | llassert(mAvatarCountText != NULL); | 622 | llassert(mLimitsText != NULL); |
637 | 623 | ||
638 | // enable/disable the states | 624 | // enable/disable the states |
639 | mGraphicsBorder->setVisible(!isHidden); | 625 | mGraphicsBorder->setVisible(!isHidden); |
@@ -668,10 +654,10 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | |||
668 | mCtrlShaderEnable->setVisible(!isHidden); | 654 | mCtrlShaderEnable->setVisible(!isHidden); |
669 | mCtrlAvatarImpostors->setVisible(!isHidden); | 655 | mCtrlAvatarImpostors->setVisible(!isHidden); |
670 | mCtrlAvatarCloth->setVisible(!isHidden); | 656 | mCtrlAvatarCloth->setVisible(!isHidden); |
671 | mRadioLightingDetail2->setVisible(!isHidden); | 657 | mComboLightingDetail->setVisible(!isHidden); |
672 | 658 | ||
673 | mRadioTerrainDetail->setVisible(!isHidden); | 659 | mComboTerrainDetail->setVisible(!isHidden); |
674 | mRadioReflectionDetail->setVisible(!isHidden); | 660 | mComboReflectionDetail->setVisible(!isHidden); |
675 | 661 | ||
676 | // text boxes | 662 | // text boxes |
677 | mShaderText->setVisible(!isHidden); | 663 | mShaderText->setVisible(!isHidden); |
@@ -679,8 +665,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | |||
679 | mAvatarText->setVisible(!isHidden); | 665 | mAvatarText->setVisible(!isHidden); |
680 | mLightingText->setVisible(!isHidden); | 666 | mLightingText->setVisible(!isHidden); |
681 | mTerrainText->setVisible(!isHidden); | 667 | mTerrainText->setVisible(!isHidden); |
682 | mAvatarCountText->setVisible(!isHidden); | 668 | mLimitsText->setVisible(!isHidden); |
683 | |||
684 | mMeshDetailText->setVisible(!isHidden); | 669 | mMeshDetailText->setVisible(!isHidden); |
685 | 670 | ||
686 | mCtrlAvatarMaxVisible->setVisible(!isHidden); | 671 | mCtrlAvatarMaxVisible->setVisible(!isHidden); |
@@ -719,8 +704,6 @@ void LLPanelDisplay::cancel() | |||
719 | gSavedSettings.setS32("RenderMaxPartCount", mParticleCount); | 704 | gSavedSettings.setS32("RenderMaxPartCount", mParticleCount); |
720 | gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); | 705 | gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); |
721 | 706 | ||
722 | gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); | ||
723 | |||
724 | gSavedSettings.setS32("RenderAvatarMaxVisible", mAvatarMaxVisible); | 707 | gSavedSettings.setS32("RenderAvatarMaxVisible", mAvatarMaxVisible); |
725 | } | 708 | } |
726 | 709 | ||
@@ -992,5 +975,4 @@ void LLPanelDisplay::onImpostorsEnable(LLUICtrl* ctrl, void* user_data) | |||
992 | LLCheckBoxCtrl* checkbox = (LLCheckBoxCtrl*)ctrl; | 975 | LLCheckBoxCtrl* checkbox = (LLCheckBoxCtrl*)ctrl; |
993 | 976 | ||
994 | self->mCtrlAvatarMaxVisible->setEnabled(checkbox->getValue().asBoolean()); | 977 | self->mCtrlAvatarMaxVisible->setEnabled(checkbox->getValue().asBoolean()); |
995 | self->mAvatarCountText->setEnabled(checkbox->getValue().asBoolean()); | ||
996 | } | 978 | } |