aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llpaneldisplay.cpp')
-rw-r--r--linden/indra/newview/llpaneldisplay.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp
index cbf6052..b2313f6 100644
--- a/linden/indra/newview/llpaneldisplay.cpp
+++ b/linden/indra/newview/llpaneldisplay.cpp
@@ -242,6 +242,8 @@ BOOL LLPanelDisplay::postBuild()
242 // Avatar Render Mode 242 // Avatar Render Mode
243 mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth"); 243 mCtrlAvatarCloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
244 mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors"); 244 mCtrlAvatarImpostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
245 mCtrlAvatarImpostors->setCommitCallback(&LLPanelDisplay::onImpostorsEnable);
246 mCtrlAvatarImpostors->setCallbackUserData(this);
245 247
246 //---------------------------------------------------------------------------- 248 //----------------------------------------------------------------------------
247 // radio set for lighting detail 249 // radio set for lighting detail
@@ -311,6 +313,10 @@ BOOL LLPanelDisplay::postBuild()
311 mCtrlPostProcess->setCommitCallback(&LLPanelDisplay::updateSliderText); 313 mCtrlPostProcess->setCommitCallback(&LLPanelDisplay::updateSliderText);
312 mCtrlPostProcess->setCallbackUserData(mPostProcessText); 314 mCtrlPostProcess->setCallbackUserData(mPostProcessText);
313 315
316 // Avatar imposter count
317 mCtrlAvatarMaxVisible = getChild<LLSliderCtrl>("AvatarMaxVisible");
318 mAvatarCountText = getChild<LLTextBox>("AvatarCountText");
319
314 // Text boxes (for enabling/disabling) 320 // Text boxes (for enabling/disabling)
315 mShaderText = getChild<LLTextBox>("ShadersText"); 321 mShaderText = getChild<LLTextBox>("ShadersText");
316 mReflectionText = getChild<LLTextBox>("ReflectionDetailText"); 322 mReflectionText = getChild<LLTextBox>("ReflectionDetailText");
@@ -411,8 +417,12 @@ void LLPanelDisplay::refresh()
411 mLightingDetail = gSavedSettings.getS32("RenderLightingDetail"); 417 mLightingDetail = gSavedSettings.getS32("RenderLightingDetail");
412 mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail"); 418 mTerrainDetail = gSavedSettings.getS32("RenderTerrainDetail");
413 419
420 // windlight remote
414 mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote"); 421 mWLControl = gSavedSettings.getBOOL("EnableWindlightRemote");
415 422
423 // max avatar count
424 mAvatarMaxVisible = gSavedSettings.getS32("RenderAvatarMaxVisible");
425
416 // slider text boxes 426 // slider text boxes
417 updateSliderText(mCtrlLODFactor, mLODFactorText); 427 updateSliderText(mCtrlLODFactor, mLODFactorText);
418 updateSliderText(mCtrlFlexFactor, mFlexFactorText); 428 updateSliderText(mCtrlFlexFactor, mFlexFactorText);
@@ -572,6 +582,9 @@ void LLPanelDisplay::disableUnavailableSettings()
572 mCtrlAvatarImpostors->setEnabled(FALSE); 582 mCtrlAvatarImpostors->setEnabled(FALSE);
573 mCtrlAvatarImpostors->setValue(FALSE); 583 mCtrlAvatarImpostors->setValue(FALSE);
574 } 584 }
585
586 mCtrlAvatarMaxVisible->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean());
587 mAvatarCountText->setEnabled(mCtrlAvatarImpostors->getValue().asBoolean());
575} 588}
576 589
577void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) 590void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
@@ -587,6 +600,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
587 llassert(mCtrlTerrainFactor != NULL); 600 llassert(mCtrlTerrainFactor != NULL);
588 llassert(mCtrlSkyFactor != NULL); 601 llassert(mCtrlSkyFactor != NULL);
589 llassert(mCtrlMaxParticle != NULL); 602 llassert(mCtrlMaxParticle != NULL);
603 llassert(mCtrlAvatarMaxVisible != NULL);
590 llassert(mCtrlPostProcess != NULL); 604 llassert(mCtrlPostProcess != NULL);
591 605
592 llassert(mLODFactorText != NULL); 606 llassert(mLODFactorText != NULL);
@@ -617,6 +631,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
617 llassert(mTerrainText != NULL); 631 llassert(mTerrainText != NULL);
618 llassert(mDrawDistanceMeterText1 != NULL); 632 llassert(mDrawDistanceMeterText1 != NULL);
619 llassert(mDrawDistanceMeterText2 != NULL); 633 llassert(mDrawDistanceMeterText2 != NULL);
634 llassert(mAvatarCountText != NULL);
620 635
621 // enable/disable the states 636 // enable/disable the states
622 mGraphicsBorder->setVisible(!isHidden); 637 mGraphicsBorder->setVisible(!isHidden);
@@ -664,6 +679,7 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
664 mTerrainText->setVisible(!isHidden); 679 mTerrainText->setVisible(!isHidden);
665 mDrawDistanceMeterText1->setVisible(!isHidden); 680 mDrawDistanceMeterText1->setVisible(!isHidden);
666 mDrawDistanceMeterText2->setVisible(!isHidden); 681 mDrawDistanceMeterText2->setVisible(!isHidden);
682 mAvatarCountText->setVisible(!isHidden);
667 683
668 // hide one meter text if we're making things visible 684 // hide one meter text if we're making things visible
669 if(!isHidden) 685 if(!isHidden)
@@ -672,6 +688,8 @@ void LLPanelDisplay::setHiddenGraphicsState(bool isHidden)
672 } 688 }
673 689
674 mMeshDetailText->setVisible(!isHidden); 690 mMeshDetailText->setVisible(!isHidden);
691
692 mCtrlAvatarMaxVisible->setVisible(!isHidden);
675} 693}
676 694
677void LLPanelDisplay::cancel() 695void LLPanelDisplay::cancel()
@@ -708,6 +726,8 @@ void LLPanelDisplay::cancel()
708 gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess); 726 gSavedSettings.setS32("RenderGlowResolutionPow", mPostProcess);
709 727
710 gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl); 728 gSavedSettings.setBOOL("EnableWindlightRemote", mWLControl);
729
730 gSavedSettings.setS32("RenderAvatarMaxVisible", mAvatarMaxVisible);
711} 731}
712 732
713void LLPanelDisplay::apply() 733void LLPanelDisplay::apply()
@@ -987,5 +1007,12 @@ void LLPanelDisplay::updateMeterText(LLUICtrl* ctrl, void* user_data)
987 m2->setVisible(!two_digits); 1007 m2->setVisible(!two_digits);
988} 1008}
989 1009
1010// static
1011void LLPanelDisplay::onImpostorsEnable(LLUICtrl* ctrl, void* user_data)
1012{
1013 LLPanelDisplay* self = (LLPanelDisplay*)user_data;
1014 LLCheckBoxCtrl* checkbox = (LLCheckBoxCtrl*)ctrl;
990 1015
991 1016 self->mCtrlAvatarMaxVisible->setEnabled(checkbox->getValue().asBoolean());
1017 self->mAvatarCountText->setEnabled(checkbox->getValue().asBoolean());
1018}