diff options
author | McCabe Maxsted | 2009-09-06 20:53:19 -0700 |
---|---|---|
committer | McCabe Maxsted | 2009-09-06 20:53:19 -0700 |
commit | ad45708178b7e014faad753fab00cd9cd58df5a7 (patch) | |
tree | 2c97e50254a8a95deedae0a556b4972954e1c81c /linden/indra/newview/llviewermenu.cpp | |
parent | Ported sit anywhere feature from Emerald viewer (diff) | |
download | meta-impy-ad45708178b7e014faad753fab00cd9cd58df5a7.zip meta-impy-ad45708178b7e014faad753fab00cd9cd58df5a7.tar.gz meta-impy-ad45708178b7e014faad753fab00cd9cd58df5a7.tar.bz2 meta-impy-ad45708178b7e014faad753fab00cd9cd58df5a7.tar.xz |
Ported phantom avatar option from Emerald viewer
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 727f357..3be857e 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -7583,6 +7583,36 @@ class LLAdvancedToggleSit: public view_listener_t | |||
7583 | }; | 7583 | }; |
7584 | 7584 | ||
7585 | 7585 | ||
7586 | ///////////// | ||
7587 | // PHANTOM // | ||
7588 | ///////////// | ||
7589 | |||
7590 | class LLAdvancedTogglePhantom: public view_listener_t | ||
7591 | { | ||
7592 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7593 | { | ||
7594 | LLAgent::togglePhantom(); | ||
7595 | BOOL ph = LLAgent::getPhantom(); | ||
7596 | LLChat chat; | ||
7597 | chat.mSourceType = CHAT_SOURCE_SYSTEM; | ||
7598 | chat.mText = llformat("%s%s","Phantom ",(ph ? "On" : "Off")); | ||
7599 | LLFloaterChat::addChat(chat); | ||
7600 | //gMenuHolder->findControl(userdata["control"].asString())->setValue(ph); | ||
7601 | return true; | ||
7602 | } | ||
7603 | |||
7604 | }; | ||
7605 | |||
7606 | class LLAdvancedCheckPhantom: public view_listener_t | ||
7607 | { | ||
7608 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
7609 | { | ||
7610 | gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAgent::getPhantom()); | ||
7611 | return true; | ||
7612 | } | ||
7613 | }; | ||
7614 | |||
7615 | |||
7586 | /////////////////////// | 7616 | /////////////////////// |
7587 | // CLEAR GROUP CACHE // | 7617 | // CLEAR GROUP CACHE // |
7588 | /////////////////////// | 7618 | /////////////////////// |
@@ -9599,6 +9629,8 @@ void initialize_menus() | |||
9599 | addMenu(new LLWorldSetAway(), "World.SetAway"); | 9629 | addMenu(new LLWorldSetAway(), "World.SetAway"); |
9600 | addMenu(new LLWorldSetBusy(), "World.SetBusy"); | 9630 | addMenu(new LLWorldSetBusy(), "World.SetBusy"); |
9601 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); | 9631 | addMenu(new LLAdvancedToggleSit(), "Advanced.ToggleSit"); |
9632 | addMenu(new LLAdvancedTogglePhantom(), "Advanced.TogglePhantom"); | ||
9633 | addMenu(new LLAdvancedCheckPhantom(), "Advanced.CheckPhantom"); | ||
9602 | 9634 | ||
9603 | addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); | 9635 | addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); |
9604 | addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); | 9636 | addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); |