From 2cc402c47a814d126f2643483e1812eb56d81f6f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 31 May 2009 22:16:58 -0500 Subject: Added a confirmation dialog for Take Off All Clothes. --- linden/indra/newview/llagent.cpp | 19 +++++++++++++++++++ linden/indra/newview/llagent.h | 8 ++++++-- linden/indra/newview/llviewermenu.cpp | 2 +- .../indra/newview/skins/default/xui/en-us/alerts.xml | 15 +++++++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) (limited to 'linden/indra') 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 ) } } + +// static +void LLAgent::userRemoveAllClothesConfirm() +{ + gViewerWindow->alertXml("ConfirmRemoveAllClothes", + LLAgent::userRemoveAllClothesCallback, NULL); +} + +// static +void LLAgent::userRemoveAllClothesCallback(S32 option, void *userdata) +{ + if( option == 0 ) + { + // They confirmed it. Here we go! + LLAgent::userRemoveAllClothes(NULL); + } +} + + void LLAgent::userRemoveAllClothes( void* userdata ) { // 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: static void stopFidget(); static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data); static void userRemoveWearable( void* userdata ); // userdata is EWearableType - static void userRemoveAllClothes( void* userdata ); // userdata is NULL - static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL + + static void userRemoveAllClothesConfirm(); + static void userRemoveAllClothesCallback(S32 option, void *userdata); + static void userRemoveAllClothes( void* userdata ); // userdata is NULL + static void userRemoveAllClothesStep2(BOOL proceed, void* userdata ); // userdata is NULL + static void userRemoveAllAttachments( void* userdata); // userdata is NULL static BOOL selfHasWearable( void* userdata ); // userdata is EWearableType 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 } else if (clothing == "all") { - LLAgent::userRemoveAllClothes(NULL); + LLAgent::userRemoveAllClothesConfirm(); } return true; } 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! + + + Are you sure you want to take off all clothes? + + + When taking off all clothes + + + + + -- cgit v1.1