diff options
Diffstat (limited to 'linden/indra')
5 files changed, 40 insertions, 1 deletions
diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 32b29d0..8a48016 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml | |||
@@ -663,6 +663,17 @@ | |||
663 | <key>Value</key> | 663 | <key>Value</key> |
664 | <real>1.0</real> | 664 | <real>1.0</real> |
665 | </map> | 665 | </map> |
666 | <key>UIImgInvisibleUUID</key> | ||
667 | <map> | ||
668 | <key>Comment</key> | ||
669 | <string /> | ||
670 | <key>Persist</key> | ||
671 | <integer>0</integer> | ||
672 | <key>Type</key> | ||
673 | <string>String</string> | ||
674 | <key>Value</key> | ||
675 | <string>f54a0c32-3cd1-d49a-5b4f-7b792bebc204</string> | ||
676 | </map> | ||
666 | <key>VerticalIMTabs</key> | 677 | <key>VerticalIMTabs</key> |
667 | <map> | 678 | <map> |
668 | <key>Comment</key> | 679 | <key>Comment</key> |
diff --git a/linden/indra/newview/lltexturectrl.cpp b/linden/indra/newview/lltexturectrl.cpp index 635c2b0..7946604 100644 --- a/linden/indra/newview/lltexturectrl.cpp +++ b/linden/indra/newview/lltexturectrl.cpp | |||
@@ -154,6 +154,7 @@ public: | |||
154 | static void onBtnPipette( void* userdata ); | 154 | static void onBtnPipette( void* userdata ); |
155 | //static void onBtnRevert( void* userdata ); | 155 | //static void onBtnRevert( void* userdata ); |
156 | static void onBtnWhite( void* userdata ); | 156 | static void onBtnWhite( void* userdata ); |
157 | static void onBtnInvisible( void* userdata ); | ||
157 | static void onBtnNone( void* userdata ); | 158 | static void onBtnNone( void* userdata ); |
158 | static void onBtnClear( void* userdata ); | 159 | static void onBtnClear( void* userdata ); |
159 | static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); | 160 | static void onSelectionChange(const std::deque<LLFolderViewItem*> &items, BOOL user_action, void* data); |
@@ -170,6 +171,7 @@ protected: | |||
170 | std::string mFallbackImageName; // What to show if currently selected texture is null. | 171 | std::string mFallbackImageName; // What to show if currently selected texture is null. |
171 | 172 | ||
172 | LLUUID mWhiteImageAssetID; | 173 | LLUUID mWhiteImageAssetID; |
174 | LLUUID mInvisibleImageAssetID; | ||
173 | LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. | 175 | LLUUID mSpecialCurrentImageAssetID; // Used when the asset id has no corresponding texture in the user's inventory. |
174 | LLUUID mOriginalImageAssetID; | 176 | LLUUID mOriginalImageAssetID; |
175 | 177 | ||
@@ -210,6 +212,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( | |||
210 | mImageAssetID( owner->getImageAssetID() ), | 212 | mImageAssetID( owner->getImageAssetID() ), |
211 | mFallbackImageName( fallback_image_name ), | 213 | mFallbackImageName( fallback_image_name ), |
212 | mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ), | 214 | mWhiteImageAssetID( gSavedSettings.getString( "UIImgWhiteUUID" ) ), |
215 | mInvisibleImageAssetID(gSavedSettings.getString("UIImgInvisibleUUID")), | ||
213 | mOriginalImageAssetID(owner->getImageAssetID()), | 216 | mOriginalImageAssetID(owner->getImageAssetID()), |
214 | mLabel(label), | 217 | mLabel(label), |
215 | mTentativeLabel(NULL), | 218 | mTentativeLabel(NULL), |
@@ -231,6 +234,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker( | |||
231 | childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); | 234 | childSetAction("Default",LLFloaterTexturePicker::onBtnSetToDefault,this); |
232 | childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); | 235 | childSetAction("None", LLFloaterTexturePicker::onBtnNone,this); |
233 | childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); | 236 | childSetAction("Blank", LLFloaterTexturePicker::onBtnWhite,this); |
237 | childSetAction("Invisible", LLFloaterTexturePicker::onBtnInvisible,this); | ||
234 | 238 | ||
235 | 239 | ||
236 | childSetCommitCallback("show_folders_check", onShowFolders, this); | 240 | childSetCommitCallback("show_folders_check", onShowFolders, this); |
@@ -571,6 +575,7 @@ void LLFloaterTexturePicker::draw() | |||
571 | 575 | ||
572 | childSetEnabled("Default", mImageAssetID != mOwner->getDefaultImageAssetID()); | 576 | childSetEnabled("Default", mImageAssetID != mOwner->getDefaultImageAssetID()); |
573 | childSetEnabled("Blank", mImageAssetID != mWhiteImageAssetID ); | 577 | childSetEnabled("Blank", mImageAssetID != mWhiteImageAssetID ); |
578 | childSetEnabled("Invisible", mOwner->getAllowInvisibleTexture() && mImageAssetID != mInvisibleImageAssetID ); | ||
574 | childSetEnabled("None", mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); | 579 | childSetEnabled("None", mOwner->getAllowNoTexture() && !mImageAssetID.isNull() ); |
575 | 580 | ||
576 | LLFloater::draw(); | 581 | LLFloater::draw(); |
@@ -706,6 +711,15 @@ void LLFloaterTexturePicker::onBtnWhite(void* userdata) | |||
706 | 711 | ||
707 | 712 | ||
708 | // static | 713 | // static |
714 | void LLFloaterTexturePicker::onBtnInvisible(void* userdata) | ||
715 | { | ||
716 | LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; | ||
717 | self->setImageID(self->mInvisibleImageAssetID); | ||
718 | self->commitIfImmediateSet(); | ||
719 | } | ||
720 | |||
721 | |||
722 | // static | ||
709 | void LLFloaterTexturePicker::onBtnNone(void* userdata) | 723 | void LLFloaterTexturePicker::onBtnNone(void* userdata) |
710 | { | 724 | { |
711 | LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; | 725 | LLFloaterTexturePicker* self = (LLFloaterTexturePicker*) userdata; |
@@ -918,6 +932,7 @@ LLTextureCtrl::LLTextureCtrl( | |||
918 | mDefaultImageName( default_image_name ), | 932 | mDefaultImageName( default_image_name ), |
919 | mLabel( label ), | 933 | mLabel( label ), |
920 | mAllowNoTexture( FALSE ), | 934 | mAllowNoTexture( FALSE ), |
935 | mAllowInvisibleTexture(FALSE), | ||
921 | mImmediateFilterPermMask( PERM_NONE ), | 936 | mImmediateFilterPermMask( PERM_NONE ), |
922 | mNonImmediateFilterPermMask( PERM_NONE ), | 937 | mNonImmediateFilterPermMask( PERM_NONE ), |
923 | mCanApplyImmediately( FALSE ), | 938 | mCanApplyImmediately( FALSE ), |
@@ -977,6 +992,8 @@ LLXMLNodePtr LLTextureCtrl::getXML(bool save_children) const | |||
977 | 992 | ||
978 | node->createChild("allow_no_texture", TRUE)->setBoolValue(mAllowNoTexture); | 993 | node->createChild("allow_no_texture", TRUE)->setBoolValue(mAllowNoTexture); |
979 | 994 | ||
995 | node->createChild("allow_invisible_texture", TRUE)->setBoolValue(mAllowInvisibleTexture); | ||
996 | |||
980 | node->createChild("can_apply_immediately", TRUE)->setBoolValue(mCanApplyImmediately ); | 997 | node->createChild("can_apply_immediately", TRUE)->setBoolValue(mCanApplyImmediately ); |
981 | 998 | ||
982 | return node; | 999 | return node; |
@@ -1005,6 +1022,9 @@ LLView* LLTextureCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor | |||
1005 | BOOL allow_no_texture = FALSE; | 1022 | BOOL allow_no_texture = FALSE; |
1006 | node->getAttributeBOOL("allow_no_texture", allow_no_texture); | 1023 | node->getAttributeBOOL("allow_no_texture", allow_no_texture); |
1007 | 1024 | ||
1025 | BOOL allow_invisible_texture = FALSE; | ||
1026 | node->getAttributeBOOL("allow_invisible_texture", allow_invisible_texture); | ||
1027 | |||
1008 | BOOL can_apply_immediately = FALSE; | 1028 | BOOL can_apply_immediately = FALSE; |
1009 | node->getAttributeBOOL("can_apply_immediately", can_apply_immediately); | 1029 | node->getAttributeBOOL("can_apply_immediately", can_apply_immediately); |
1010 | 1030 | ||
@@ -1021,6 +1041,7 @@ LLView* LLTextureCtrl::fromXML(LLXMLNodePtr node, LLView *parent, LLUICtrlFactor | |||
1021 | LLUUID(default_image_id), | 1041 | LLUUID(default_image_id), |
1022 | default_image_name ); | 1042 | default_image_name ); |
1023 | texture_picker->setAllowNoTexture(allow_no_texture); | 1043 | texture_picker->setAllowNoTexture(allow_no_texture); |
1044 | texture_picker->setAllowInvisibleTexture(allow_invisible_texture); | ||
1024 | texture_picker->setCanApplyImmediately(can_apply_immediately); | 1045 | texture_picker->setCanApplyImmediately(can_apply_immediately); |
1025 | 1046 | ||
1026 | texture_picker->initFromXML(node, parent); | 1047 | texture_picker->initFromXML(node, parent); |
diff --git a/linden/indra/newview/lltexturectrl.h b/linden/indra/newview/lltexturectrl.h index 623f15e..dccdbc5 100644 --- a/linden/indra/newview/lltexturectrl.h +++ b/linden/indra/newview/lltexturectrl.h | |||
@@ -110,6 +110,9 @@ public: | |||
110 | void setAllowNoTexture( BOOL b ) { mAllowNoTexture = b; } | 110 | void setAllowNoTexture( BOOL b ) { mAllowNoTexture = b; } |
111 | bool getAllowNoTexture() const { return mAllowNoTexture; } | 111 | bool getAllowNoTexture() const { return mAllowNoTexture; } |
112 | 112 | ||
113 | void setAllowInvisibleTexture(BOOL b) { mAllowInvisibleTexture = b; } | ||
114 | bool getAllowInvisibleTexture() const { return mAllowInvisibleTexture; } | ||
115 | |||
113 | const LLUUID& getImageItemID() { return mImageItemID; } | 116 | const LLUUID& getImageItemID() { return mImageItemID; } |
114 | 117 | ||
115 | void setImageAssetID(const LLUUID &image_asset_id); | 118 | void setImageAssetID(const LLUUID &image_asset_id); |
@@ -174,6 +177,7 @@ private: | |||
174 | LLTextBox* mCaption; | 177 | LLTextBox* mCaption; |
175 | std::string mLabel; | 178 | std::string mLabel; |
176 | BOOL mAllowNoTexture; // If true, the user can select "none" as an option | 179 | BOOL mAllowNoTexture; // If true, the user can select "none" as an option |
180 | BOOL mAllowInvisibleTexture; // If true, the user can select "Invisible" as an option | ||
177 | LLCoordGL mLastFloaterLeftTop; | 181 | LLCoordGL mLastFloaterLeftTop; |
178 | PermissionMask mImmediateFilterPermMask; | 182 | PermissionMask mImmediateFilterPermMask; |
179 | PermissionMask mNonImmediateFilterPermMask; | 183 | PermissionMask mNonImmediateFilterPermMask; |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_texture_ctrl.xml b/linden/indra/newview/skins/default/xui/en-us/floater_texture_ctrl.xml index feb243a..97b12e0 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_texture_ctrl.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_texture_ctrl.xml | |||
@@ -27,6 +27,9 @@ | |||
27 | <button bottom="-252" enabled="true" follows="left|bottom" font="SansSerifSmall" | 27 | <button bottom="-252" enabled="true" follows="left|bottom" font="SansSerifSmall" |
28 | halign="center" height="20" label="Blank" label_selected="Blank" left="4" | 28 | halign="center" height="20" label="Blank" label_selected="Blank" left="4" |
29 | mouse_opaque="true" name="Blank" scale_image="true" width="64" /> | 29 | mouse_opaque="true" name="Blank" scale_image="true" width="64" /> |
30 | <button bottom="-252" enabled="false" follows="left|bottom" font="SansSerifSmall" | ||
31 | halign="center" height="20" label="Invisible" label_selected="Invisible" left="72" | ||
32 | mouse_opaque="true" name="Invisible" scale_image="true" width="64" /> | ||
30 | <check_box bottom="-44" enabled="true" follows="left|top" font="SansSerifSmall" | 33 | <check_box bottom="-44" enabled="true" follows="left|top" font="SansSerifSmall" |
31 | height="24" initial_value="true" label="Show Folders" left="175" | 34 | height="24" initial_value="true" label="Show Folders" left="175" |
32 | mouse_opaque="true" name="show_folders_check" radio_style="false" | 35 | mouse_opaque="true" name="show_folders_check" radio_style="false" |
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml index 2e721ec..2e1ac50 100644 --- a/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml +++ b/linden/indra/newview/skins/default/xui/en-us/floater_tools.xml | |||
@@ -1026,7 +1026,7 @@ | |||
1026 | 1026 | ||
1027 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" | 1027 | <panel border="true" bottom="-383" follows="left|top|right|bottom" height="367" |
1028 | label="Texture" left="1" mouse_opaque="false" name="Texture" width="270"> | 1028 | label="Texture" left="1" mouse_opaque="false" name="Texture" width="270"> |
1029 | <texture_picker allow_no_texture="false" bottom="-90" can_apply_immediately="true" | 1029 | <texture_picker allow_no_texture="false" allow_invisible_texture="true" bottom="-90" can_apply_immediately="true" |
1030 | default_image_name="Default" follows="left|top" height="80" label="Texture:" | 1030 | default_image_name="Default" follows="left|top" height="80" label="Texture:" |
1031 | left="10" mouse_opaque="true" name="texture control" | 1031 | left="10" mouse_opaque="true" name="texture control" |
1032 | tool_tip="Click to choose a picture" width="64" /> | 1032 | tool_tip="Click to choose a picture" width="64" /> |