diff options
Diffstat (limited to 'linden/indra/newview/llviewermenu.cpp')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index a83c11b..0f6e5c4 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -238,6 +238,8 @@ | |||
238 | #include "llfloaterteleporthistory.h" | 238 | #include "llfloaterteleporthistory.h" |
239 | #include "slfloatermediafilter.h" | 239 | #include "slfloatermediafilter.h" |
240 | 240 | ||
241 | #include "rcmoapradar.h" | ||
242 | |||
241 | using namespace LLVOAvatarDefines; | 243 | using namespace LLVOAvatarDefines; |
242 | void init_client_menu(LLMenuGL* menu); | 244 | void init_client_menu(LLMenuGL* menu); |
243 | void init_server_menu(LLMenuGL* menu); | 245 | void init_server_menu(LLMenuGL* menu); |
@@ -1096,10 +1098,10 @@ void init_debug_ui_menu(LLMenuGL* menu) | |||
1096 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); | 1098 | menu->append(new LLMenuItemCallGL("Editable UI", &edit_ui)); |
1097 | menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); | 1099 | menu->append(new LLMenuItemCallGL( "Dump SelectMgr", &dump_select_mgr)); |
1098 | menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); | 1100 | menu->append(new LLMenuItemCallGL( "Dump Inventory", &dump_inventory)); |
1099 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus, NULL, NULL, 'F', MASK_ALT | MASK_CONTROL)); | 1101 | menu->append(new LLMenuItemCallGL( "Dump Focus Holder", &handle_dump_focus)); |
1100 | menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info, NULL, NULL, 'P', MASK_CONTROL|MASK_SHIFT )); | 1102 | menu->append(new LLMenuItemCallGL( "Print Selected Object Info", &print_object_info)); |
1101 | menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs, NULL, NULL, 'P', MASK_SHIFT )); | 1103 | menu->append(new LLMenuItemCallGL( "Print Agent Info", &print_agent_nvpairs)); |
1102 | menu->append(new LLMenuItemCallGL( "Memory Stats", &output_statistics, NULL, NULL, 'M', MASK_SHIFT | MASK_ALT | MASK_CONTROL)); | 1104 | menu->append(new LLMenuItemCallGL( "Memory Stats", &output_statistics)); |
1103 | menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", | 1105 | menu->append(new LLMenuItemCheckGL("Double-Click Auto-Pilot", |
1104 | menu_toggle_control, NULL, menu_check_control, | 1106 | menu_toggle_control, NULL, menu_check_control, |
1105 | (void*)"DoubleClickAutoPilot")); | 1107 | (void*)"DoubleClickAutoPilot")); |
@@ -1256,7 +1258,6 @@ void init_debug_rendering_menu(LLMenuGL* menu) | |||
1256 | sub_menu->append(new LLMenuItemCheckGL("Octree", &LLPipeline::toggleRenderDebug, NULL, | 1258 | sub_menu->append(new LLMenuItemCheckGL("Octree", &LLPipeline::toggleRenderDebug, NULL, |
1257 | &LLPipeline::toggleRenderDebugControl, | 1259 | &LLPipeline::toggleRenderDebugControl, |
1258 | (void*)LLPipeline::RENDER_DEBUG_OCTREE)); | 1260 | (void*)LLPipeline::RENDER_DEBUG_OCTREE)); |
1259 | // For Imprudence 1.3 - need to XUIfy | ||
1260 | sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta", &LLPipeline::toggleRenderDebug, NULL, | 1261 | sub_menu->append(new LLMenuItemCheckGL("Shadow Frusta", &LLPipeline::toggleRenderDebug, NULL, |
1261 | &LLPipeline::toggleRenderDebugControl, | 1262 | &LLPipeline::toggleRenderDebugControl, |
1262 | (void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)); | 1263 | (void*)LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA)); |
@@ -5216,6 +5217,24 @@ class LLViewEnableLastChatter : public view_listener_t | |||
5216 | } | 5217 | } |
5217 | }; | 5218 | }; |
5218 | 5219 | ||
5220 | class LLViewToggleRadar: public view_listener_t | ||
5221 | { | ||
5222 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
5223 | { | ||
5224 | LLFloaterAvatarList::toggle(0); | ||
5225 | return true; | ||
5226 | } | ||
5227 | }; | ||
5228 | |||
5229 | class LLViewToggleMOAPRadar: public view_listener_t | ||
5230 | { | ||
5231 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | ||
5232 | { | ||
5233 | LLFloaterMOAPRadar::toggle(0); | ||
5234 | return true; | ||
5235 | } | ||
5236 | }; | ||
5237 | |||
5219 | class LLEditEnableDeselect : public view_listener_t | 5238 | class LLEditEnableDeselect : public view_listener_t |
5220 | { | 5239 | { |
5221 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 5240 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
@@ -8946,12 +8965,6 @@ class LLAdvancedToggleAssetBrowser: public view_listener_t | |||
8946 | { | 8965 | { |
8947 | //open the floater | 8966 | //open the floater |
8948 | LLFloaterAssetBrowser::show(0); | 8967 | LLFloaterAssetBrowser::show(0); |
8949 | |||
8950 | bool vis = false; | ||
8951 | if(LLFloaterAssetBrowser::getInstance()) | ||
8952 | { | ||
8953 | vis = (bool)LLFloaterAssetBrowser::getInstance()->getVisible(); | ||
8954 | } | ||
8955 | return true; | 8968 | return true; |
8956 | } | 8969 | } |
8957 | }; | 8970 | }; |
@@ -9058,7 +9071,7 @@ class LLAdvancedToggleRenderType : public view_listener_t | |||
9058 | { | 9071 | { |
9059 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9072 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9060 | { | 9073 | { |
9061 | U32 render_type = render_type_from_string( userdata.asString() ); | 9074 | intptr_t render_type = render_type_from_string( userdata.asString() ); |
9062 | if ( render_type != 0 ) | 9075 | if ( render_type != 0 ) |
9063 | { | 9076 | { |
9064 | LLPipeline::toggleRenderTypeControl( (void*)render_type ); | 9077 | LLPipeline::toggleRenderTypeControl( (void*)render_type ); |
@@ -9072,7 +9085,7 @@ class LLAdvancedCheckRenderType : public view_listener_t | |||
9072 | { | 9085 | { |
9073 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9086 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9074 | { | 9087 | { |
9075 | U32 render_type = render_type_from_string( userdata["data"].asString() ); | 9088 | intptr_t render_type = render_type_from_string( userdata["data"].asString() ); |
9076 | bool new_value = false; | 9089 | bool new_value = false; |
9077 | 9090 | ||
9078 | if ( render_type != 0 ) | 9091 | if ( render_type != 0 ) |
@@ -9138,7 +9151,7 @@ class LLAdvancedToggleFeature : public view_listener_t | |||
9138 | { | 9151 | { |
9139 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9152 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9140 | { | 9153 | { |
9141 | U32 feature = feature_from_string( userdata.asString() ); | 9154 | intptr_t feature = feature_from_string( userdata.asString() ); |
9142 | 9155 | ||
9143 | if ( feature != 0 ) | 9156 | if ( feature != 0 ) |
9144 | { | 9157 | { |
@@ -9154,7 +9167,7 @@ class LLAdvancedCheckFeature : public view_listener_t | |||
9154 | { | 9167 | { |
9155 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9168 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9156 | { | 9169 | { |
9157 | U32 feature = feature_from_string( userdata["data"].asString() ); | 9170 | intptr_t feature = feature_from_string( userdata["data"].asString() ); |
9158 | bool new_value = false; | 9171 | bool new_value = false; |
9159 | 9172 | ||
9160 | if ( feature != 0 ) | 9173 | if ( feature != 0 ) |
@@ -9249,6 +9262,10 @@ U32 info_display_from_string(std::string info_display) | |||
9249 | { | 9262 | { |
9250 | return LLPipeline::RENDER_DEBUG_SCULPTED; | 9263 | return LLPipeline::RENDER_DEBUG_SCULPTED; |
9251 | } | 9264 | } |
9265 | else if ("shadow frusta" == info_display) | ||
9266 | { | ||
9267 | return LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA; | ||
9268 | } | ||
9252 | else | 9269 | else |
9253 | { | 9270 | { |
9254 | return 0; | 9271 | return 0; |
@@ -9260,7 +9277,7 @@ class LLAdvancedToggleInfoDisplay : public view_listener_t | |||
9260 | { | 9277 | { |
9261 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9278 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9262 | { | 9279 | { |
9263 | U32 info_display = info_display_from_string( userdata.asString() ); | 9280 | intptr_t info_display = info_display_from_string( userdata.asString() ); |
9264 | 9281 | ||
9265 | if ( info_display != 0 ) | 9282 | if ( info_display != 0 ) |
9266 | { | 9283 | { |
@@ -9276,7 +9293,7 @@ class LLAdvancedCheckInfoDisplay : public view_listener_t | |||
9276 | { | 9293 | { |
9277 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 9294 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
9278 | { | 9295 | { |
9279 | U32 info_display = info_display_from_string( userdata["data"].asString() ); | 9296 | intptr_t info_display = info_display_from_string( userdata["data"].asString() ); |
9280 | bool new_value = false; | 9297 | bool new_value = false; |
9281 | 9298 | ||
9282 | if ( info_display != 0 ) | 9299 | if ( info_display != 0 ) |
@@ -11215,6 +11232,8 @@ void initialize_menus() | |||
11215 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); | 11232 | addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); |
11216 | addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam"); | 11233 | addMenu(new LLViewEnableJoystickFlycam(), "View.EnableJoystickFlycam"); |
11217 | addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); | 11234 | addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); |
11235 | addMenu(new LLViewToggleRadar(), "View.ToggleAvatarList"); | ||
11236 | addMenu(new LLViewToggleMOAPRadar(), "View.ToggleMOAPList"); | ||
11218 | 11237 | ||
11219 | addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode"); | 11238 | addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode"); |
11220 | addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); | 11239 | addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); |