diff options
author | Jacek Antonelli | 2009-05-31 22:16:58 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-05-31 22:16:58 -0500 |
commit | 2cc402c47a814d126f2643483e1812eb56d81f6f (patch) | |
tree | 2a3c86d21fd423757b58d9bddd52df29b79c3bea /linden/indra | |
parent | Added a separator between Wear and Restore to Last Position. (diff) | |
download | meta-impy-2cc402c47a814d126f2643483e1812eb56d81f6f.zip meta-impy-2cc402c47a814d126f2643483e1812eb56d81f6f.tar.gz meta-impy-2cc402c47a814d126f2643483e1812eb56d81f6f.tar.bz2 meta-impy-2cc402c47a814d126f2643483e1812eb56d81f6f.tar.xz |
Added a confirmation dialog for Take Off All Clothes.
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llagent.cpp | 19 | ||||
-rw-r--r-- | linden/indra/newview/llagent.h | 8 | ||||
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | linden/indra/newview/skins/default/xui/en-us/alerts.xml | 15 |
4 files changed, 41 insertions, 3 deletions
diff --git a/linden/indra/newview/llagent.cpp b/linden/indra/newview/llagent.cpp index 46dc6f3..8c4e8b3 100644 --- a/linden/indra/newview/llagent.cpp +++ b/linden/indra/newview/llagent.cpp | |||
@@ -7432,6 +7432,25 @@ void LLAgent::userRemoveWearable( void* userdata ) | |||
7432 | } | 7432 | } |
7433 | } | 7433 | } |
7434 | 7434 | ||
7435 | |||
7436 | // static | ||
7437 | void LLAgent::userRemoveAllClothesConfirm() | ||
7438 | { | ||
7439 | gViewerWindow->alertXml("ConfirmRemoveAllClothes", | ||
7440 | LLAgent::userRemoveAllClothesCallback, NULL); | ||
7441 | } | ||
7442 | |||
7443 | // static | ||
7444 | void LLAgent::userRemoveAllClothesCallback(S32 option, void *userdata) | ||
7445 | { | ||
7446 | if( option == 0 ) | ||
7447 | { | ||
7448 | // They confirmed it. Here we go! | ||
7449 | LLAgent::userRemoveAllClothes(NULL); | ||
7450 | } | ||
7451 | } | ||
7452 | |||
7453 | |||
7435 | void LLAgent::userRemoveAllClothes( void* userdata ) | 7454 | void LLAgent::userRemoveAllClothes( void* userdata ) |
7436 | { | 7455 | { |
7437 | // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. | 7456 | // We have to do this up front to avoid having to deal with the case of multiple wearables being dirty. |
diff --git a/linden/indra/newview/llagent.h b/linden/indra/newview/llagent.h index dd204af..4d24aee 100644 --- a/linden/indra/newview/llagent.h +++ b/linden/indra/newview/llagent.h | |||
@@ -668,8 +668,12 @@ public: | |||
668 | static void stopFidget(); | 668 | static void stopFidget(); |
669 | static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); | 669 | static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); |
670 | static void userRemoveWearable( void* userdata ); // userdata is EWearableType | 670 | static void userRemoveWearable( void* userdata ); // userdata is EWearableType |
671 | static void userRemoveAllClothes( void* userdata ); // userdata is NULL | 671 | |
672 | static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL | 672 | static void userRemoveAllClothesConfirm(); |
673 | static void userRemoveAllClothesCallback(S32 option, void *userdata); | ||
674 | static void userRemoveAllClothes( void* userdata ); // userdata is NULL | ||
675 | static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL | ||
676 | |||
673 | static void userRemoveAllAttachments( void* userdata); // userdata is NULL | 677 | static void userRemoveAllAttachments( void* userdata); // userdata is NULL |
674 | static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType | 678 | static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType |
675 | 679 | ||
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 4194ff7..d477b0c 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -7352,7 +7352,7 @@ class LLEditTakeOff : public view_listener_t | |||
7352 | } | 7352 | } |
7353 | else if (clothing == "all") | 7353 | else if (clothing == "all") |
7354 | { | 7354 | { |
7355 | LLAgent::userRemoveAllClothes(NULL); | 7355 | LLAgent::userRemoveAllClothesConfirm(); |
7356 | } | 7356 | } |
7357 | return true; | 7357 | return true; |
7358 | } | 7358 | } |
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index 6bfefdb..cb37663 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml | |||
@@ -5115,5 +5115,20 @@ WARNING: Don't restore if you aren't sure where the object will go! | |||
5115 | 5115 | ||
5116 | </alert> | 5116 | </alert> |
5117 | 5117 | ||
5118 | <alert modal="true" name="ConfirmRemoveAllClothes"> | ||
5119 | <message name="message"> | ||
5120 | Are you sure you want to take off all clothes? | ||
5121 | </message> | ||
5122 | <ignore name="ignore"> | ||
5123 | When taking off all clothes | ||
5124 | </ignore> | ||
5125 | <option name="Take Off"> | ||
5126 | Take Off | ||
5127 | </option> | ||
5128 | <option name="Cancel"> | ||
5129 | Cancel | ||
5130 | </option> | ||
5131 | </alert> | ||
5132 | |||
5118 | </alerts> | 5133 | </alerts> |
5119 | 5134 | ||