diff options
author | McCabe Maxsted | 2010-09-06 17:34:47 -0700 |
---|---|---|
committer | McCabe Maxsted | 2010-09-06 17:34:47 -0700 |
commit | 931ac307f4bab7958817557e8ce951dfa3daa380 (patch) | |
tree | 98b7cee48e01016414521d3f0ccbf0a5d5b9a3ab | |
parent | Made 'notify when currency spent or received' also chat the message (diff) | |
download | meta-impy-931ac307f4bab7958817557e8ce951dfa3daa380.zip meta-impy-931ac307f4bab7958817557e8ce951dfa3daa380.tar.gz meta-impy-931ac307f4bab7958817557e8ce951dfa3daa380.tar.bz2 meta-impy-931ac307f4bab7958817557e8ce951dfa3daa380.tar.xz |
Added slider to control the number of avatar imposters (can't think of a better label)
-rw-r--r-- | linden/indra/newview/llpaneldisplay.cpp | 29 | ||||
-rw-r--r-- | linden/indra/newview/llpaneldisplay.h | 5 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml | 23 |
3 files changed, 50 insertions, 7 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 | ||
577 | void LLPanelDisplay::setHiddenGraphicsState(bool isHidden) | 590 | void 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 | ||
677 | void LLPanelDisplay::cancel() | 695 | void 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 | ||
713 | void LLPanelDisplay::apply() | 733 | void 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 | ||
1011 | void 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 | } | ||
diff --git a/linden/indra/newview/llpaneldisplay.h b/linden/indra/newview/llpaneldisplay.h index 1cbdbba..e92cd2f 100644 --- a/linden/indra/newview/llpaneldisplay.h +++ b/linden/indra/newview/llpaneldisplay.h | |||
@@ -104,6 +104,7 @@ protected: | |||
104 | LLSliderCtrl *mCtrlSkyFactor; // LOD for terrain | 104 | LLSliderCtrl *mCtrlSkyFactor; // LOD for terrain |
105 | LLSliderCtrl *mCtrlMaxParticle; // Max Particle | 105 | LLSliderCtrl *mCtrlMaxParticle; // Max Particle |
106 | LLSliderCtrl *mCtrlPostProcess; // Max Particle | 106 | LLSliderCtrl *mCtrlPostProcess; // Max Particle |
107 | LLSliderCtrl *mCtrlAvatarMaxVisible; // Max avatars visible | ||
107 | 108 | ||
108 | LLCheckBoxCtrl *mCtrlBumpShiny; | 109 | LLCheckBoxCtrl *mCtrlBumpShiny; |
109 | LLCheckBoxCtrl *mCtrlReflections; | 110 | LLCheckBoxCtrl *mCtrlReflections; |
@@ -138,6 +139,7 @@ protected: | |||
138 | LLTextBox *mTerrainFactorText; | 139 | LLTextBox *mTerrainFactorText; |
139 | LLTextBox *mSkyFactorText; | 140 | LLTextBox *mSkyFactorText; |
140 | LLTextBox *mPostProcessText; | 141 | LLTextBox *mPostProcessText; |
142 | LLTextBox *mAvatarCountText; | ||
141 | 143 | ||
142 | BOOL mFSAutoDetectAspect; | 144 | BOOL mFSAutoDetectAspect; |
143 | F32 mAspectRatio; | 145 | F32 mAspectRatio; |
@@ -171,6 +173,8 @@ protected: | |||
171 | S32 mParticleCount; | 173 | S32 mParticleCount; |
172 | S32 mPostProcess; | 174 | S32 mPostProcess; |
173 | 175 | ||
176 | S32 mAvatarMaxVisible; | ||
177 | |||
174 | BOOL mWLControl; | 178 | BOOL mWLControl; |
175 | 179 | ||
176 | static void setGraphicsSettings(LLControlGroup& group); | 180 | static void setGraphicsSettings(LLControlGroup& group); |
@@ -191,6 +195,7 @@ protected: | |||
191 | static void onApplyResolution(LLUICtrl* ctrl, void* data); | 195 | static void onApplyResolution(LLUICtrl* ctrl, void* data); |
192 | static void updateSliderText(LLUICtrl* ctrl, void* user_data); | 196 | static void updateSliderText(LLUICtrl* ctrl, void* user_data); |
193 | static void updateMeterText(LLUICtrl* ctrl, void* user_data); | 197 | static void updateMeterText(LLUICtrl* ctrl, void* user_data); |
198 | static void onImpostorsEnable(LLUICtrl* ctrl, void* user_data); | ||
194 | 199 | ||
195 | /// callback for defaults | 200 | /// callback for defaults |
196 | static void setHardwareDefaults(void *data); | 201 | static void setHardwareDefaults(void *data); |
diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 55af056..153a111 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml | |||
@@ -162,8 +162,8 @@ | |||
162 | follows="left|top" font="SansSerifSmall" height="16" | 162 | follows="left|top" font="SansSerifSmall" height="16" |
163 | initial_value="true" label="Custom" left="385" mouse_opaque="true" | 163 | initial_value="true" label="Custom" left="385" mouse_opaque="true" |
164 | name="CustomSettings" radio_style="false" width="256" /> | 164 | name="CustomSettings" radio_style="false" width="256" /> |
165 | <view_border bevel_style="none" border_thickness="1" bottom="-375" follows="top|left" | 165 | <view_border bevel_style="none" border_thickness="1" bottom="-415" follows="left|top" |
166 | height="260" left="5" name="GraphicsBorder" width="485" /> | 166 | height="300" left="5" name="GraphicsBorder" width="485" /> |
167 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 167 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
168 | bottom="-130" drop_shadow_visible="true" enabled="true" follows="left|top" | 168 | bottom="-130" drop_shadow_visible="true" enabled="true" follows="left|top" |
169 | font="SansSerifSmall" h_pad="0" halign="left" height="12" | 169 | font="SansSerifSmall" h_pad="0" halign="left" height="12" |
@@ -235,6 +235,17 @@ | |||
235 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" | 235 | follows="left|top" font="SansSerifSmall" height="16" initial_value="true" |
236 | label="Avatar cloth" left_delta="0" mouse_opaque="true" name="AvatarCloth" | 236 | label="Avatar cloth" left_delta="0" mouse_opaque="true" name="AvatarCloth" |
237 | radio_style="false" width="256" /> | 237 | radio_style="false" width="256" /> |
238 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | ||
239 | bottom_delta="-20" drop_shadow_visible="true" enabled="true" follows="left|top" | ||
240 | font="SansSerifSmall" h_pad="0" halign="left" height="12" left_delta="0" | ||
241 | mouse_opaque="true" name="AvatarCountText" v_pad="0" width="128"> | ||
242 | Max. non-imposters: | ||
243 | </text> | ||
244 | <slider bottom_delta="-20" can_edit_text="false" control_name="RenderAvatarMaxVisible" | ||
245 | decimal_digits="0" enabled="true" follows="left|top" height="16" | ||
246 | increment="1" initial_val="35" label="" | ||
247 | label_width="0" left_delta="0" max_val="50" min_val="0" mouse_opaque="true" | ||
248 | name="AvatarMaxVisible" show_text="true" width="100" /> | ||
238 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" | 249 | <text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false" |
239 | bottom="-131" drop_shadow_visible="true" enabled="true" follows="left|top" | 250 | bottom="-131" drop_shadow_visible="true" enabled="true" follows="left|top" |
240 | font="SansSerifSmall" h_pad="0" halign="left" height="12" | 251 | font="SansSerifSmall" h_pad="0" halign="left" height="12" |
@@ -387,13 +398,13 @@ | |||
387 | High | 398 | High |
388 | </radio_item> | 399 | </radio_item> |
389 | </radio_group> | 400 | </radio_group> |
390 | <button bottom="-400" enabled="true" font="SansSerif" halign="center" height="20" | 401 | <button bottom="4" enabled="true" font="SansSerif" halign="center" height="20" |
391 | label="Recommended Settings" left="130" mouse_opaque="true" | 402 | label="Recommended Settings" left="130" mouse_opaque="true" |
392 | name="Defaults" scale_image="true" width="170" /> | 403 | name="Defaults" scale_image="true" width="170" follows="left|bottom" /> |
393 | <button bottom="-400" enabled="true" font="SansSerif" halign="center" height="20" | 404 | <button bottom="4" enabled="true" font="SansSerif" halign="center" height="20" |
394 | label="Hardware Options" label_selected="Hardware Options" | 405 | label="Hardware Options" label_selected="Hardware Options" |
395 | left="310" mouse_opaque="true" name="GraphicsHardwareButton" | 406 | left="310" mouse_opaque="true" name="GraphicsHardwareButton" |
396 | scale_image="true" width="170" /> | 407 | scale_image="true" width="170" follows="left|bottom" /> |
397 | <string name="resolution_format"> | 408 | <string name="resolution_format"> |
398 | [RES_X] x [RES_Y] | 409 | [RES_X] x [RES_Y] |
399 | </string> | 410 | </string> |