aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloatercustomize.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-09-06 18:24:57 -0500
committerJacek Antonelli2008-09-06 18:25:07 -0500
commit798d367d54a6c6379ad355bd8345fa40e31e7fe9 (patch)
tree1921f1708cd0240648c97bc02df2c2ab5f2fc41e /linden/indra/newview/llfloatercustomize.cpp
parentSecond Life viewer sources 1.20.15 (diff)
downloadmeta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.zip
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.gz
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.bz2
meta-impy-798d367d54a6c6379ad355bd8345fa40e31e7fe9.tar.xz
Second Life viewer sources 1.21.0-RC
Diffstat (limited to 'linden/indra/newview/llfloatercustomize.cpp')
-rw-r--r--linden/indra/newview/llfloatercustomize.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/linden/indra/newview/llfloatercustomize.cpp b/linden/indra/newview/llfloatercustomize.cpp
index 535ef52..7db075a 100644
--- a/linden/indra/newview/llfloatercustomize.cpp
+++ b/linden/indra/newview/llfloatercustomize.cpp
@@ -131,13 +131,13 @@ protected:
131class LLWearableSaveAsDialog : public LLModalDialog 131class LLWearableSaveAsDialog : public LLModalDialog
132{ 132{
133private: 133private:
134 LLString mItemName; 134 std::string mItemName;
135 void (*mCommitCallback)(LLWearableSaveAsDialog*,void*); 135 void (*mCommitCallback)(LLWearableSaveAsDialog*,void*);
136 void* mCallbackUserData; 136 void* mCallbackUserData;
137 137
138public: 138public:
139 LLWearableSaveAsDialog( const LLString& desc, void(*commit_cb)(LLWearableSaveAsDialog*,void*), void* userdata ) 139 LLWearableSaveAsDialog( const std::string& desc, void(*commit_cb)(LLWearableSaveAsDialog*,void*), void* userdata )
140 : LLModalDialog( "", 240, 100 ), 140 : LLModalDialog( LLStringUtil::null, 240, 100 ),
141 mCommitCallback( commit_cb ), 141 mCommitCallback( commit_cb ),
142 mCallbackUserData( userdata ) 142 mCallbackUserData( userdata )
143 { 143 {
@@ -157,13 +157,13 @@ public:
157 edit->selectAll(); 157 edit->selectAll();
158 } 158 }
159 159
160 const LLString& getItemName() { return mItemName; } 160 const std::string& getItemName() { return mItemName; }
161 161
162 static void onSave( void* userdata ) 162 static void onSave( void* userdata )
163 { 163 {
164 LLWearableSaveAsDialog* self = (LLWearableSaveAsDialog*) userdata; 164 LLWearableSaveAsDialog* self = (LLWearableSaveAsDialog*) userdata;
165 self->mItemName = self->childGetValue("name ed").asString(); 165 self->mItemName = self->childGetValue("name ed").asString();
166 LLString::trim(self->mItemName); 166 LLStringUtil::trim(self->mItemName);
167 if( !self->mItemName.empty() ) 167 if( !self->mItemName.empty() )
168 { 168 {
169 if( self->mCommitCallback ) 169 if( self->mCommitCallback )
@@ -198,14 +198,14 @@ BOOL edit_wearable_for_teens(EWearableType type)
198class LLMakeOutfitDialog : public LLModalDialog 198class LLMakeOutfitDialog : public LLModalDialog
199{ 199{
200private: 200private:
201 LLString mFolderName; 201 std::string mFolderName;
202 void (*mCommitCallback)(LLMakeOutfitDialog*,void*); 202 void (*mCommitCallback)(LLMakeOutfitDialog*,void*);
203 void* mCallbackUserData; 203 void* mCallbackUserData;
204 std::vector<std::pair<std::string,S32> > mCheckBoxList; 204 std::vector<std::pair<std::string,S32> > mCheckBoxList;
205 205
206public: 206public:
207 LLMakeOutfitDialog( void(*commit_cb)(LLMakeOutfitDialog*,void*), void* userdata ) 207 LLMakeOutfitDialog( void(*commit_cb)(LLMakeOutfitDialog*,void*), void* userdata )
208 : LLModalDialog("",515, 510, TRUE ), 208 : LLModalDialog(LLStringUtil::null,515, 510, TRUE ),
209 mCommitCallback( commit_cb ), 209 mCommitCallback( commit_cb ),
210 mCallbackUserData( userdata ) 210 mCallbackUserData( userdata )
211 { 211 {
@@ -214,14 +214,14 @@ public:
214 // Build list of check boxes 214 // Build list of check boxes
215 for( S32 i = 0; i < WT_COUNT; i++ ) 215 for( S32 i = 0; i < WT_COUNT; i++ )
216 { 216 {
217 LLString name = LLString("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)i ); 217 std::string name = std::string("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)i );
218 mCheckBoxList.push_back(std::make_pair(name,i)); 218 mCheckBoxList.push_back(std::make_pair(name,i));
219 // Hide teen items 219 // Hide teen items
220 if (gAgent.isTeen() && 220 if (gAgent.isTeen() &&
221 !edit_wearable_for_teens((EWearableType)i)) 221 !edit_wearable_for_teens((EWearableType)i))
222 { 222 {
223 // hide wearable checkboxes that don't apply to this account 223 // hide wearable checkboxes that don't apply to this account
224 LLString name = LLString("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)i ); 224 std::string name = std::string("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)i );
225 childSetVisible(name, FALSE); 225 childSetVisible(name, FALSE);
226 } 226 }
227 } 227 }
@@ -237,7 +237,7 @@ public:
237 LLViewerJointAttachment* attachment = curiter->second; 237 LLViewerJointAttachment* attachment = curiter->second;
238 S32 attachment_pt = curiter->first; 238 S32 attachment_pt = curiter->first;
239 BOOL object_attached = ( attachment->getNumObjects() > 0 ); 239 BOOL object_attached = ( attachment->getNumObjects() > 0 );
240 LLString name = LLString("checkbox_") + attachment->getName(); 240 std::string name = std::string("checkbox_") + attachment->getName();
241 mCheckBoxList.push_back(std::make_pair(name,attachment_pt)); 241 mCheckBoxList.push_back(std::make_pair(name,attachment_pt));
242 childSetEnabled(name, object_attached); 242 childSetEnabled(name, object_attached);
243 } 243 }
@@ -269,13 +269,13 @@ public:
269 LLModalDialog::draw(); 269 LLModalDialog::draw();
270 } 270 }
271 271
272 const LLString& getFolderName() { return mFolderName; } 272 const std::string& getFolderName() { return mFolderName; }
273 273
274 void setWearableToInclude( S32 wearable, S32 enabled, S32 selected ) 274 void setWearableToInclude( S32 wearable, S32 enabled, S32 selected )
275 { 275 {
276 if( (0 <= wearable) && (wearable < WT_COUNT) ) 276 if( (0 <= wearable) && (wearable < WT_COUNT) )
277 { 277 {
278 LLString name = LLString("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)wearable ); 278 std::string name = std::string("checkbox_") + LLWearable::typeToTypeLabel( (EWearableType)wearable );
279 childSetEnabled(name, enabled); 279 childSetEnabled(name, enabled);
280 childSetValue(name, selected); 280 childSetValue(name, selected);
281 } 281 }
@@ -285,7 +285,7 @@ public:
285 { 285 {
286 for( S32 i = 0; i < (S32)mCheckBoxList.size(); i++) 286 for( S32 i = 0; i < (S32)mCheckBoxList.size(); i++)
287 { 287 {
288 LLString name = mCheckBoxList[i].first; 288 std::string name = mCheckBoxList[i].first;
289 BOOL checked = childGetValue(name).asBoolean(); 289 BOOL checked = childGetValue(name).asBoolean();
290 if (i < WT_COUNT ) 290 if (i < WT_COUNT )
291 { 291 {
@@ -309,7 +309,7 @@ public:
309 { 309 {
310 LLMakeOutfitDialog* self = (LLMakeOutfitDialog*) userdata; 310 LLMakeOutfitDialog* self = (LLMakeOutfitDialog*) userdata;
311 self->mFolderName = self->childGetValue("name ed").asString(); 311 self->mFolderName = self->childGetValue("name ed").asString();
312 LLString::trim(self->mFolderName); 312 LLStringUtil::trim(self->mFolderName);
313 if( !self->mFolderName.empty() ) 313 if( !self->mFolderName.empty() )
314 { 314 {
315 if( self->mCommitCallback ) 315 if( self->mCommitCallback )
@@ -365,9 +365,9 @@ struct LLSubpart
365{ 365{
366 LLSubpart() : mSex( SEX_BOTH ) {} 366 LLSubpart() : mSex( SEX_BOTH ) {}
367 367
368 LLString mButtonName; 368 std::string mButtonName;
369 LLString mTargetJoint; 369 std::string mTargetJoint;
370 LLString mEditGroup; 370 std::string mEditGroup;
371 LLVector3d mTargetOffset; 371 LLVector3d mTargetOffset;
372 LLVector3d mCameraOffset; 372 LLVector3d mCameraOffset;
373 ESex mSex; 373 ESex mSex;
@@ -385,11 +385,11 @@ public:
385 virtual void draw(); 385 virtual void draw();
386 virtual BOOL isDirty() const; // LLUICtrl 386 virtual BOOL isDirty() const; // LLUICtrl
387 387
388 void addSubpart(const LLString& name, ESubpart id, LLSubpart* part ); 388 void addSubpart(const std::string& name, ESubpart id, LLSubpart* part );
389 void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, const LLUUID& default_image_id, BOOL allow_no_texture ); 389 void addTextureDropTarget( LLVOAvatar::ETextureIndex te, const std::string& name, const LLUUID& default_image_id, BOOL allow_no_texture );
390 void addColorSwatch( LLVOAvatar::ETextureIndex te, const LLString& name ); 390 void addColorSwatch( LLVOAvatar::ETextureIndex te, const std::string& name );
391 391
392 const char* getLabel() { return LLWearable::typeToTypeLabel( mType ); } 392 const std::string& getLabel() { return LLWearable::typeToTypeLabel( mType ); }
393 EWearableType getType() { return mType; } 393 EWearableType getType() { return mType; }
394 394
395 LLSubpart* getCurrentSubpart() { return mSubpartList[mCurrentSubpart]; } 395 LLSubpart* getCurrentSubpart() { return mSubpartList[mCurrentSubpart]; }
@@ -433,8 +433,8 @@ public:
433private: 433private:
434 EWearableType mType; 434 EWearableType mType;
435 BOOL mCanTakeOff; 435 BOOL mCanTakeOff;
436 std::map<LLString, S32> mTextureList; 436 std::map<std::string, S32> mTextureList;
437 std::map<LLString, S32> mColorList; 437 std::map<std::string, S32> mColorList;
438 std::map<ESubpart, LLSubpart*> mSubpartList; 438 std::map<ESubpart, LLSubpart*> mSubpartList;
439 ESubpart mCurrentSubpart; 439 ESubpart mCurrentSubpart;
440 LLUndoBuffer* mUndoBuffer; 440 LLUndoBuffer* mUndoBuffer;
@@ -453,7 +453,7 @@ LLPanelEditWearable::LLPanelEditWearable( EWearableType type )
453BOOL LLPanelEditWearable::postBuild() 453BOOL LLPanelEditWearable::postBuild()
454{ 454{
455 LLAssetType::EType asset_type = LLWearable::typeToAssetType( mType ); 455 LLAssetType::EType asset_type = LLWearable::typeToAssetType( mType );
456 LLString icon_name = (asset_type == LLAssetType::AT_CLOTHING ? 456 std::string icon_name = (asset_type == LLAssetType::AT_CLOTHING ?
457 "inv_item_clothing.tga" : 457 "inv_item_clothing.tga" :
458 "inv_item_skin.tga" ); 458 "inv_item_skin.tga" );
459 childSetValue("icon", icon_name); 459 childSetValue("icon", icon_name);
@@ -489,7 +489,7 @@ LLPanelEditWearable::~LLPanelEditWearable()
489 } 489 }
490} 490}
491 491
492void LLPanelEditWearable::addSubpart( const LLString& name, ESubpart id, LLSubpart* part ) 492void LLPanelEditWearable::addSubpart( const std::string& name, ESubpart id, LLSubpart* part )
493{ 493{
494 if (!name.empty()) 494 if (!name.empty())
495 { 495 {
@@ -694,7 +694,7 @@ void LLPanelEditWearable::onSelectAutoWearOption(S32 option, void* data)
694 wearable->getPermissions().getMaskNextOwner(), cb); 694 wearable->getPermissions().getMaskNextOwner(), cb);
695 } 695 }
696} 696}
697void LLPanelEditWearable::addColorSwatch( LLVOAvatar::ETextureIndex te, const LLString& name ) 697void LLPanelEditWearable::addColorSwatch( LLVOAvatar::ETextureIndex te, const std::string& name )
698{ 698{
699 childSetCommitCallback(name, LLPanelEditWearable::onColorCommit, this); 699 childSetCommitCallback(name, LLPanelEditWearable::onColorCommit, this);
700 mColorList[name] = te; 700 mColorList[name] = te;
@@ -729,7 +729,7 @@ void LLPanelEditWearable::onColorCommit( LLUICtrl* ctrl, void* userdata )
729} 729}
730 730
731 731
732void LLPanelEditWearable::addTextureDropTarget( LLVOAvatar::ETextureIndex te, const LLString& name, 732void LLPanelEditWearable::addTextureDropTarget( LLVOAvatar::ETextureIndex te, const std::string& name,
733 const LLUUID& default_image_id, BOOL allow_no_texture ) 733 const LLUUID& default_image_id, BOOL allow_no_texture )
734{ 734{
735 childSetCommitCallback(name, LLPanelEditWearable::onTextureCommit, this); 735 childSetCommitCallback(name, LLPanelEditWearable::onTextureCommit, this);
@@ -870,14 +870,14 @@ void LLPanelEditWearable::draw()
870 { 870 {
871 // *TODO:Translate 871 // *TODO:Translate
872 childSetVisible("title_no_modify", TRUE); 872 childSetVisible("title_no_modify", TRUE);
873 childSetTextArg("title_no_modify", "[DESC]", LLString(LLWearable::typeToTypeLabel( mType ))); 873 childSetTextArg("title_no_modify", "[DESC]", std::string(LLWearable::typeToTypeLabel( mType )));
874 874
875 for( std::map<LLString, S32>::iterator iter = mTextureList.begin(); 875 for( std::map<std::string, S32>::iterator iter = mTextureList.begin();
876 iter != mTextureList.end(); ++iter ) 876 iter != mTextureList.end(); ++iter )
877 { 877 {
878 childSetVisible(iter->first, FALSE ); 878 childSetVisible(iter->first, FALSE );
879 } 879 }
880 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 880 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
881 iter != mColorList.end(); ++iter ) 881 iter != mColorList.end(); ++iter )
882 { 882 {
883 childSetVisible(iter->first, FALSE ); 883 childSetVisible(iter->first, FALSE );
@@ -887,20 +887,20 @@ void LLPanelEditWearable::draw()
887 { 887 {
888 // *TODO:Translate 888 // *TODO:Translate
889 childSetVisible("title_loading", TRUE); 889 childSetVisible("title_loading", TRUE);
890 childSetTextArg("title_loading", "[DESC]", LLString(LLWearable::typeToTypeLabel( mType ))); 890 childSetTextArg("title_loading", "[DESC]", std::string(LLWearable::typeToTypeLabel( mType )));
891 891
892 LLString path; 892 std::string path;
893 const LLUUID& item_id = gAgent.getWearableItem( wearable->getType() ); 893 const LLUUID& item_id = gAgent.getWearableItem( wearable->getType() );
894 gInventory.appendPath(item_id, path); 894 gInventory.appendPath(item_id, path);
895 childSetVisible("path", TRUE); 895 childSetVisible("path", TRUE);
896 childSetTextArg("path", "[PATH]", path); 896 childSetTextArg("path", "[PATH]", path);
897 897
898 for( std::map<LLString, S32>::iterator iter = mTextureList.begin(); 898 for( std::map<std::string, S32>::iterator iter = mTextureList.begin();
899 iter != mTextureList.end(); ++iter ) 899 iter != mTextureList.end(); ++iter )
900 { 900 {
901 childSetVisible(iter->first, FALSE ); 901 childSetVisible(iter->first, FALSE );
902 } 902 }
903 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 903 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
904 iter != mColorList.end(); ++iter ) 904 iter != mColorList.end(); ++iter )
905 { 905 {
906 childSetVisible(iter->first, FALSE ); 906 childSetVisible(iter->first, FALSE );
@@ -911,16 +911,16 @@ void LLPanelEditWearable::draw()
911 childSetVisible("title", TRUE); 911 childSetVisible("title", TRUE);
912 childSetTextArg("title", "[DESC]", wearable->getName() ); 912 childSetTextArg("title", "[DESC]", wearable->getName() );
913 913
914 LLString path; 914 std::string path;
915 const LLUUID& item_id = gAgent.getWearableItem( wearable->getType() ); 915 const LLUUID& item_id = gAgent.getWearableItem( wearable->getType() );
916 gInventory.appendPath(item_id, path); 916 gInventory.appendPath(item_id, path);
917 childSetVisible("path", TRUE); 917 childSetVisible("path", TRUE);
918 childSetTextArg("path", "[PATH]", path); 918 childSetTextArg("path", "[PATH]", path);
919 919
920 for( std::map<LLString, S32>::iterator iter = mTextureList.begin(); 920 for( std::map<std::string, S32>::iterator iter = mTextureList.begin();
921 iter != mTextureList.end(); ++iter ) 921 iter != mTextureList.end(); ++iter )
922 { 922 {
923 LLString name = iter->first; 923 std::string name = iter->first;
924 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(name); 924 LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(name);
925 S32 te_index = iter->second; 925 S32 te_index = iter->second;
926 childSetVisible(name, is_copyable && is_modifiable && is_complete ); 926 childSetVisible(name, is_copyable && is_modifiable && is_complete );
@@ -938,10 +938,10 @@ void LLPanelEditWearable::draw()
938 } 938 }
939 } 939 }
940 940
941 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 941 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
942 iter != mColorList.end(); ++iter ) 942 iter != mColorList.end(); ++iter )
943 { 943 {
944 LLString name = iter->first; 944 std::string name = iter->first;
945 S32 te_index = iter->second; 945 S32 te_index = iter->second;
946 childSetVisible(name, is_modifiable && is_complete ); 946 childSetVisible(name, is_modifiable && is_complete );
947 childSetEnabled(name, is_modifiable && is_complete ); 947 childSetEnabled(name, is_modifiable && is_complete );
@@ -956,14 +956,14 @@ void LLPanelEditWearable::draw()
956 { 956 {
957 // *TODO:Translate 957 // *TODO:Translate
958 childSetVisible("title_not_worn", TRUE); 958 childSetVisible("title_not_worn", TRUE);
959 childSetTextArg("title_not_worn", "[DESC]", LLString(LLWearable::typeToTypeLabel( mType ))); 959 childSetTextArg("title_not_worn", "[DESC]", std::string(LLWearable::typeToTypeLabel( mType )));
960 960
961 for( std::map<LLString, S32>::iterator iter = mTextureList.begin(); 961 for( std::map<std::string, S32>::iterator iter = mTextureList.begin();
962 iter != mTextureList.end(); ++iter ) 962 iter != mTextureList.end(); ++iter )
963 { 963 {
964 childSetVisible(iter->first, FALSE ); 964 childSetVisible(iter->first, FALSE );
965 } 965 }
966 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 966 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
967 iter != mColorList.end(); ++iter ) 967 iter != mColorList.end(); ++iter )
968 { 968 {
969 childSetVisible(iter->first, FALSE ); 969 childSetVisible(iter->first, FALSE );
@@ -1006,7 +1006,7 @@ void LLPanelEditWearable::setVisible(BOOL visible)
1006 gEditMenuHandler = NULL; 1006 gEditMenuHandler = NULL;
1007 } 1007 }
1008 1008
1009 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 1009 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
1010 iter != mColorList.end(); ++iter ) 1010 iter != mColorList.end(); ++iter )
1011 { 1011 {
1012 // this forces any open color pickers to cancel their selection 1012 // this forces any open color pickers to cancel their selection
@@ -1079,12 +1079,12 @@ void LLPanelEditWearable::setUIPermissions(U32 perm_mask, BOOL is_complete)
1079 childSetEnabled("Save As", is_copyable && is_complete); 1079 childSetEnabled("Save As", is_copyable && is_complete);
1080 childSetEnabled("Randomize", is_modifiable && is_complete); 1080 childSetEnabled("Randomize", is_modifiable && is_complete);
1081 childSetEnabled("sex radio", is_modifiable && is_complete); 1081 childSetEnabled("sex radio", is_modifiable && is_complete);
1082 for( std::map<LLString, S32>::iterator iter = mTextureList.begin(); 1082 for( std::map<std::string, S32>::iterator iter = mTextureList.begin();
1083 iter != mTextureList.end(); ++iter ) 1083 iter != mTextureList.end(); ++iter )
1084 { 1084 {
1085 childSetVisible(iter->first, is_copyable && is_modifiable && is_complete ); 1085 childSetVisible(iter->first, is_copyable && is_modifiable && is_complete );
1086 } 1086 }
1087 for( std::map<LLString, S32>::iterator iter = mColorList.begin(); 1087 for( std::map<std::string, S32>::iterator iter = mColorList.begin();
1088 iter != mColorList.end(); ++iter ) 1088 iter != mColorList.end(); ++iter )
1089 { 1089 {
1090 childSetVisible(iter->first, is_modifiable && is_complete ); 1090 childSetVisible(iter->first, is_modifiable && is_complete );
@@ -1097,7 +1097,7 @@ void LLPanelEditWearable::setUIPermissions(U32 perm_mask, BOOL is_complete)
1097class LLScrollingPanelParam : public LLScrollingPanel 1097class LLScrollingPanelParam : public LLScrollingPanel
1098{ 1098{
1099public: 1099public:
1100 LLScrollingPanelParam( const LLString& name, LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify ); 1100 LLScrollingPanelParam( const std::string& name, LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify );
1101 virtual ~LLScrollingPanelParam(); 1101 virtual ~LLScrollingPanelParam();
1102 1102
1103 virtual void draw(); 1103 virtual void draw();
@@ -1144,7 +1144,7 @@ const S32 PARAM_HINT_LABEL_HEIGHT = 16;
1144const S32 PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH + LLPANEL_BORDER_WIDTH); 1144const S32 PARAM_PANEL_WIDTH = 2 * (3* BTN_BORDER + PARAM_HINT_WIDTH + LLPANEL_BORDER_WIDTH);
1145const S32 PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH; 1145const S32 PARAM_PANEL_HEIGHT = 2 * BTN_BORDER + PARAM_HINT_HEIGHT + PARAM_HINT_LABEL_HEIGHT + 4 * LLPANEL_BORDER_WIDTH;
1146 1146
1147LLScrollingPanelParam::LLScrollingPanelParam( const LLString& name, 1147LLScrollingPanelParam::LLScrollingPanelParam( const std::string& name,
1148 LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify ) 1148 LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify )
1149 : LLScrollingPanel( name, LLRect( 0, PARAM_PANEL_HEIGHT, PARAM_PANEL_WIDTH, 0 ) ), 1149 : LLScrollingPanel( name, LLRect( 0, PARAM_PANEL_HEIGHT, PARAM_PANEL_WIDTH, 0 ) ),
1150 mParam(param), 1150 mParam(param),
@@ -1169,8 +1169,8 @@ LLScrollingPanelParam::LLScrollingPanelParam( const LLString& name,
1169 childSetCommitCallback("param slider", LLScrollingPanelParam::onSliderMoved, this); 1169 childSetCommitCallback("param slider", LLScrollingPanelParam::onSliderMoved, this);
1170 1170
1171 // *TODO::translate 1171 // *TODO::translate
1172 LLString min_name = param->getMinDisplayName(); 1172 std::string min_name = param->getMinDisplayName();
1173 LLString max_name = param->getMaxDisplayName(); 1173 std::string max_name = param->getMaxDisplayName();
1174 childSetValue("min param text", min_name); 1174 childSetValue("min param text", min_name);
1175 childSetValue("max param text", max_name); 1175 childSetValue("max param text", max_name);
1176 1176
@@ -1502,7 +1502,7 @@ F32 LLScrollingPanelParam::percentToWeight( F32 percent )
1502 return percent / 100.f * (param->getMaxWeight() - param->getMinWeight()) + param->getMinWeight(); 1502 return percent / 100.f * (param->getMaxWeight() - param->getMinWeight()) + param->getMinWeight();
1503} 1503}
1504 1504
1505const LLString& LLFloaterCustomize::getEditGroup() 1505const std::string& LLFloaterCustomize::getEditGroup()
1506{ 1506{
1507 return getCurrentWearablePanel()->getCurrentSubpart()->mEditGroup; 1507 return getCurrentWearablePanel()->getCurrentSubpart()->mEditGroup;
1508} 1508}
@@ -1523,7 +1523,7 @@ struct WearablePanelData
1523}; 1523};
1524 1524
1525LLFloaterCustomize::LLFloaterCustomize() 1525LLFloaterCustomize::LLFloaterCustomize()
1526: LLFloater("customize"), 1526: LLFloater(std::string("customize")),
1527 mScrollingPanelList( NULL ), 1527 mScrollingPanelList( NULL ),
1528 mGenePool( NULL ), 1528 mGenePool( NULL ),
1529 mInventoryObserver(NULL), 1529 mInventoryObserver(NULL),
@@ -1616,7 +1616,7 @@ void LLFloaterCustomize::setCurrentWearableType( EWearableType type )
1616 if( gFloaterCustomize 1616 if( gFloaterCustomize
1617 && gFloaterCustomize->mWearablePanelList[type_int]) 1617 && gFloaterCustomize->mWearablePanelList[type_int])
1618 { 1618 {
1619 LLString panelname = gFloaterCustomize->mWearablePanelList[type_int]->getName(); 1619 std::string panelname = gFloaterCustomize->mWearablePanelList[type_int]->getName();
1620 gFloaterCustomize->childShowTab("customize tab container", panelname); 1620 gFloaterCustomize->childShowTab("customize tab container", panelname);
1621 gFloaterCustomize->switchToDefaultSubpart(); 1621 gFloaterCustomize->switchToDefaultSubpart();
1622 } 1622 }
@@ -1650,7 +1650,7 @@ void LLFloaterCustomize::onBtnSnapshot( void* userdata )
1650 success = jpeg_image->encode(raw, 0.0f); 1650 success = jpeg_image->encode(raw, 0.0f);
1651 if(!success) return; 1651 if(!success) return;
1652 1652
1653 LLString filepath("C:\\snapshot"); 1653 std::string filepath("C:\\snapshot");
1654 filepath += ".jpg"; 1654 filepath += ".jpg";
1655 1655
1656 success = jpeg_image->save(filepath); 1656 success = jpeg_image->save(filepath);
@@ -1885,7 +1885,7 @@ void LLFloaterCustomize::initWearablePanels()
1885 part->mEditGroup = "eyes"; 1885 part->mEditGroup = "eyes";
1886 part->mTargetOffset.setVec(0.f, 0.f, 0.05f); 1886 part->mTargetOffset.setVec(0.f, 0.f, 0.05f);
1887 part->mCameraOffset.setVec(-0.5f, 0.05f, 0.07f); 1887 part->mCameraOffset.setVec(-0.5f, 0.05f, 0.07f);
1888 panel->addSubpart( "", SUBPART_EYES, part ); 1888 panel->addSubpart( LLStringUtil::null, SUBPART_EYES, part );
1889 1889
1890 panel->addTextureDropTarget(LLVOAvatar::TEX_EYES_IRIS, "Iris", 1890 panel->addTextureDropTarget(LLVOAvatar::TEX_EYES_IRIS, "Iris",
1891 LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ), 1891 LLUUID( gSavedSettings.getString( "UIImgDefaultEyesUUID" ) ),
@@ -1902,7 +1902,7 @@ void LLFloaterCustomize::initWearablePanels()
1902 part->mEditGroup = "shirt"; 1902 part->mEditGroup = "shirt";
1903 part->mTargetOffset.setVec(0.f, 0.f, 0.3f); 1903 part->mTargetOffset.setVec(0.f, 0.f, 0.3f);
1904 part->mCameraOffset.setVec(-1.f, 0.15f, 0.3f); 1904 part->mCameraOffset.setVec(-1.f, 0.15f, 0.3f);
1905 panel->addSubpart( "", SUBPART_SHIRT, part ); 1905 panel->addSubpart( LLStringUtil::null, SUBPART_SHIRT, part );
1906 1906
1907 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_SHIRT, "Fabric", 1907 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_SHIRT, "Fabric",
1908 LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ), 1908 LLUUID( gSavedSettings.getString( "UIImgDefaultShirtUUID" ) ),
@@ -1920,7 +1920,7 @@ void LLFloaterCustomize::initWearablePanels()
1920 part->mEditGroup = "pants"; 1920 part->mEditGroup = "pants";
1921 part->mTargetOffset.setVec(0.f, 0.f, -0.5f); 1921 part->mTargetOffset.setVec(0.f, 0.f, -0.5f);
1922 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f); 1922 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f);
1923 panel->addSubpart( "", SUBPART_PANTS, part ); 1923 panel->addSubpart( LLStringUtil::null, SUBPART_PANTS, part );
1924 1924
1925 panel->addTextureDropTarget(LLVOAvatar::TEX_LOWER_PANTS, "Fabric", 1925 panel->addTextureDropTarget(LLVOAvatar::TEX_LOWER_PANTS, "Fabric",
1926 LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ), 1926 LLUUID( gSavedSettings.getString( "UIImgDefaultPantsUUID" ) ),
@@ -1940,7 +1940,7 @@ void LLFloaterCustomize::initWearablePanels()
1940 part->mEditGroup = "shoes"; 1940 part->mEditGroup = "shoes";
1941 part->mTargetOffset.setVec(0.f, 0.f, -0.5f); 1941 part->mTargetOffset.setVec(0.f, 0.f, -0.5f);
1942 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f); 1942 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f);
1943 panel->addSubpart( "", SUBPART_SHOES, part ); 1943 panel->addSubpart( LLStringUtil::null, SUBPART_SHOES, part );
1944 1944
1945 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_SHOES, "Fabric", 1945 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_SHOES, "Fabric",
1946 LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ), 1946 LLUUID( gSavedSettings.getString( "UIImgDefaultShoesUUID" ) ),
@@ -1961,7 +1961,7 @@ void LLFloaterCustomize::initWearablePanels()
1961 part->mEditGroup = "socks"; 1961 part->mEditGroup = "socks";
1962 part->mTargetOffset.setVec(0.f, 0.f, -0.5f); 1962 part->mTargetOffset.setVec(0.f, 0.f, -0.5f);
1963 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f); 1963 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f);
1964 panel->addSubpart( "", SUBPART_SOCKS, part ); 1964 panel->addSubpart( LLStringUtil::null, SUBPART_SOCKS, part );
1965 1965
1966 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_SOCKS, "Fabric", 1966 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_SOCKS, "Fabric",
1967 LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ), 1967 LLUUID( gSavedSettings.getString( "UIImgDefaultSocksUUID" ) ),
@@ -1981,7 +1981,7 @@ void LLFloaterCustomize::initWearablePanels()
1981 part->mEditGroup = "jacket"; 1981 part->mEditGroup = "jacket";
1982 part->mTargetOffset.setVec(0.f, 0.f, 0.f); 1982 part->mTargetOffset.setVec(0.f, 0.f, 0.f);
1983 part->mCameraOffset.setVec(-2.f, 0.1f, 0.3f); 1983 part->mCameraOffset.setVec(-2.f, 0.1f, 0.3f);
1984 panel->addSubpart( "", SUBPART_JACKET, part ); 1984 panel->addSubpart( LLStringUtil::null, SUBPART_JACKET, part );
1985 1985
1986 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_JACKET, "Upper Fabric", 1986 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_JACKET, "Upper Fabric",
1987 LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ), 1987 LLUUID( gSavedSettings.getString( "UIImgDefaultJacketUUID" ) ),
@@ -2004,7 +2004,7 @@ void LLFloaterCustomize::initWearablePanels()
2004 part->mEditGroup = "skirt"; 2004 part->mEditGroup = "skirt";
2005 part->mTargetOffset.setVec(0.f, 0.f, -0.5f); 2005 part->mTargetOffset.setVec(0.f, 0.f, -0.5f);
2006 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f); 2006 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f);
2007 panel->addSubpart( "", SUBPART_SKIRT, part ); 2007 panel->addSubpart( LLStringUtil::null, SUBPART_SKIRT, part );
2008 2008
2009 panel->addTextureDropTarget( LLVOAvatar::TEX_SKIRT, "Fabric", 2009 panel->addTextureDropTarget( LLVOAvatar::TEX_SKIRT, "Fabric",
2010 LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ), 2010 LLUUID( gSavedSettings.getString( "UIImgDefaultSkirtUUID" ) ),
@@ -2025,7 +2025,7 @@ void LLFloaterCustomize::initWearablePanels()
2025 part->mEditGroup = "gloves"; 2025 part->mEditGroup = "gloves";
2026 part->mTargetOffset.setVec(0.f, 0.f, 0.f); 2026 part->mTargetOffset.setVec(0.f, 0.f, 0.f);
2027 part->mCameraOffset.setVec(-1.f, 0.15f, 0.f); 2027 part->mCameraOffset.setVec(-1.f, 0.15f, 0.f);
2028 panel->addSubpart( "", SUBPART_GLOVES, part ); 2028 panel->addSubpart( LLStringUtil::null, SUBPART_GLOVES, part );
2029 2029
2030 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_GLOVES, "Fabric", 2030 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_GLOVES, "Fabric",
2031 LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ), 2031 LLUUID( gSavedSettings.getString( "UIImgDefaultGlovesUUID" ) ),
@@ -2046,7 +2046,7 @@ void LLFloaterCustomize::initWearablePanels()
2046 part->mEditGroup = "undershirt"; 2046 part->mEditGroup = "undershirt";
2047 part->mTargetOffset.setVec(0.f, 0.f, 0.3f); 2047 part->mTargetOffset.setVec(0.f, 0.f, 0.3f);
2048 part->mCameraOffset.setVec(-1.f, 0.15f, 0.3f); 2048 part->mCameraOffset.setVec(-1.f, 0.15f, 0.3f);
2049 panel->addSubpart( "", SUBPART_UNDERSHIRT, part ); 2049 panel->addSubpart( LLStringUtil::null, SUBPART_UNDERSHIRT, part );
2050 2050
2051 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_UNDERSHIRT, "Fabric", 2051 panel->addTextureDropTarget( LLVOAvatar::TEX_UPPER_UNDERSHIRT, "Fabric",
2052 LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), 2052 LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ),
@@ -2066,7 +2066,7 @@ void LLFloaterCustomize::initWearablePanels()
2066 part->mEditGroup = "underpants"; 2066 part->mEditGroup = "underpants";
2067 part->mTargetOffset.setVec(0.f, 0.f, -0.5f); 2067 part->mTargetOffset.setVec(0.f, 0.f, -0.5f);
2068 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f); 2068 part->mCameraOffset.setVec(-1.6f, 0.15f, -0.5f);
2069 panel->addSubpart( "", SUBPART_UNDERPANTS, part ); 2069 panel->addSubpart( LLStringUtil::null, SUBPART_UNDERPANTS, part );
2070 2070
2071 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_UNDERPANTS, "Fabric", 2071 panel->addTextureDropTarget( LLVOAvatar::TEX_LOWER_UNDERPANTS, "Fabric",
2072 LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ), 2072 LLUUID( gSavedSettings.getString( "UIImgDefaultUnderwearUUID" ) ),
@@ -2173,7 +2173,7 @@ void LLFloaterCustomize::initScrollingPanelList()
2173 getChild<LLScrollableContainerView>("panel_container"); 2173 getChild<LLScrollableContainerView>("panel_container");
2174 // LLScrollingPanelList's do not import correctly 2174 // LLScrollingPanelList's do not import correctly
2175// mScrollingPanelList = LLUICtrlFactory::getScrollingPanelList(this, "panel_list"); 2175// mScrollingPanelList = LLUICtrlFactory::getScrollingPanelList(this, "panel_list");
2176 mScrollingPanelList = new LLScrollingPanelList("panel_list", LLRect()); 2176 mScrollingPanelList = new LLScrollingPanelList(std::string("panel_list"), LLRect());
2177 if (scroll_container) 2177 if (scroll_container)
2178 { 2178 {
2179 scroll_container->setScrolledView(mScrollingPanelList); 2179 scroll_container->setScrolledView(mScrollingPanelList);