From 2fed5a972282902bb709535f6d4dd17705e622e8 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 19 Sep 2008 21:39:17 -0500 Subject: VWR-2947: Create event callbacks for Advanced menu functions. Part of VWR-2896: Convert "Advanced" menu to XUI. --- linden/indra/newview/llviewermenu.cpp | 2612 ++++++++++++++++++++++++++++++--- 1 file changed, 2439 insertions(+), 173 deletions(-) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 3e99384..ae37d96 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -750,10 +750,13 @@ void init_menus() gLandmarkMenu = menu; */ + // Advanced (Client) menu is XUI now! \o/ + /* menu = new LLMenuGL(CLIENT_MENU_NAME); init_client_menu(menu); gMenuBarView->appendMenu( menu ); menu->updateParent(LLMenuGL::sMenuContainer); + */ menu = new LLMenuGL(SERVER_MENU_NAME); init_server_menu(menu); @@ -7720,203 +7723,2315 @@ class LLWorldDayCycle : public view_listener_t -static void addMenu(view_listener_t *menu, const char *name) -{ - sMenus.push_back(menu); - menu->registerListener(gMenuHolder, name); -} -void initialize_menus() -{ - // File menu - init_menu_file(); +//------------------------------------------------------------------- +// Advanced menu +//------------------------------------------------------------------- - // Edit menu - addMenu(new LLEditUndo(), "Edit.Undo"); - addMenu(new LLEditRedo(), "Edit.Redo"); - addMenu(new LLEditCut(), "Edit.Cut"); - addMenu(new LLEditCopy(), "Edit.Copy"); - addMenu(new LLEditPaste(), "Edit.Paste"); - addMenu(new LLEditDelete(), "Edit.Delete"); - addMenu(new LLEditSearch(), "Edit.Search"); - addMenu(new LLEditSelectAll(), "Edit.SelectAll"); - addMenu(new LLEditDeselect(), "Edit.Deselect"); - addMenu(new LLEditDuplicate(), "Edit.Duplicate"); - addMenu(new LLEditTakeOff(), "Edit.TakeOff"); - addMenu(new LLEditEnableUndo(), "Edit.EnableUndo"); - addMenu(new LLEditEnableRedo(), "Edit.EnableRedo"); - addMenu(new LLEditEnableCut(), "Edit.EnableCut"); - addMenu(new LLEditEnableCopy(), "Edit.EnableCopy"); - addMenu(new LLEditEnablePaste(), "Edit.EnablePaste"); - addMenu(new LLEditEnableDelete(), "Edit.EnableDelete"); - addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll"); - addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect"); - addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); - addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); - addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); +/////////////////// +// SHOW CONSOLES // +/////////////////// - // View menu - addMenu(new LLViewMouselook(), "View.Mouselook"); - addMenu(new LLViewBuildMode(), "View.BuildMode"); - addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam"); - addMenu(new LLViewResetView(), "View.ResetView"); - addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); - addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); - addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); - addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); - addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); - addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); - addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); - addMenu(new LLViewZoomOut(), "View.ZoomOut"); - addMenu(new LLViewZoomIn(), "View.ZoomIn"); - addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); - addMenu(new LLViewFullscreen(), "View.Fullscreen"); - addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); - addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); - addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); +class LLAdvancedToggleConsole : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString console_type = userdata.asString(); + if ("frame" == console_type) + { + toggle_visibility( (void*)gDebugView->mFrameStatView ); + } + else if ("texture" == console_type) + { + toggle_visibility( (void*)gTextureView ); + } + else if ("debug" == console_type) + { + toggle_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) ); + } + else if ("fast timers" == console_type) + { + toggle_visibility( (void*)gDebugView->mFastTimerView ); + } + else if ("memory" == console_type) + { + toggle_visibility( (void*)gDebugView->mMemoryView ); + } + return true; + } +}; - addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode"); - addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); - addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); - addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); - addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); - addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); - addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); - // World menu - addMenu(new LLWorldChat(), "World.Chat"); - addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); - addMenu(new LLWorldFly(), "World.Fly"); - addMenu(new LLWorldEnableFly(), "World.EnableFly"); - addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); - addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); - addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); - addMenu(new LLWorldSetAway(), "World.SetAway"); - addMenu(new LLWorldSetBusy(), "World.SetBusy"); +class LLAdvancedCheckConsole : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString console_type = userdata["data"].asString(); + bool new_value = false; + if ("frame" == console_type) + { + new_value = get_visibility( (void*)gDebugView->mFrameStatView ); + } + else if ("texture" == console_type) + { + new_value = get_visibility( (void*)gTextureView ); + } + else if ("debug" == console_type) + { + new_value = get_visibility( (void*)((LLView*)gDebugView->mDebugConsolep) ); + } + else if ("fast timers" == console_type) + { + new_value = get_visibility( (void*)gDebugView->mFastTimerView ); + } + else if ("memory" == console_type) + { + new_value = get_visibility( (void*)gDebugView->mMemoryView ); + } - addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); - addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); - addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome"); - addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand"); + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; - addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun"); - - (new LLWorldEnvSettings())->registerListener(gMenuHolder, "World.EnvSettings"); - (new LLWorldWaterSettings())->registerListener(gMenuHolder, "World.WaterSettings"); - (new LLWorldPostProcess())->registerListener(gMenuHolder, "World.PostProcess"); - (new LLWorldDayCycle())->registerListener(gMenuHolder, "World.DayCycle"); - // Tools menu - addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); - addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); - addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects"); - addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); - addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); - addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); - addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); - addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY"); - addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid"); - addMenu(new LLToolsLink(), "Tools.Link"); - addMenu(new LLToolsUnlink(), "Tools.Unlink"); - addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations"); - addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection"); - addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake"); - addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy"); - addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); - addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); - addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); - addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); - addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); - addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); - addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); - addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy"); - addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory"); - addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory"); +////////////////////////// +// DUMP INFO TO CONSOLE // +////////////////////////// - /*addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject"); - addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/ - // Help menu - // most items use the ShowFloater method +class LLAdvancedDumpInfoToConsole : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString info_type = userdata.asString(); + if ("region" == info_type) + { + handle_region_dump_settings(NULL); + } + else if ("group" == info_type) + { + handle_dump_group_info(NULL); + } + else if ("capabilities" == info_type) + { + handle_dump_capabilities_info(NULL); + } + return true; + } +}; - // Self pie menu - addMenu(new LLSelfStandUp(), "Self.StandUp"); - addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); - addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp"); - addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); - // Avatar pie menu - addMenu(new LLObjectMute(), "Avatar.Mute"); - addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend"); - addMenu(new LLAvatarFreeze(), "Avatar.Freeze"); - addMenu(new LLAvatarDebug(), "Avatar.Debug"); - addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); - addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); - addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); - addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); - addMenu(new LLAvatarEject(), "Avatar.Eject"); - addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); - - addMenu(new LLObjectEnableMute(), "Avatar.EnableMute"); - addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); - addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject"); +/////////////////////////////// +// RELOAD SETTINGS OVERRIDES // +/////////////////////////////// - // Object pie menu - addMenu(new LLObjectOpen(), "Object.Open"); - addMenu(new LLObjectBuild(), "Object.Build"); - addMenu(new LLObjectTouch(), "Object.Touch"); - addMenu(new LLObjectSitOrStand(), "Object.SitOrStand"); - addMenu(new LLObjectDelete(), "Object.Delete"); - addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar"); - addMenu(new LLObjectReturn(), "Object.Return"); - addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse"); - addMenu(new LLObjectMute(), "Object.Mute"); - addMenu(new LLObjectBuy(), "Object.Buy"); - addMenu(new LLObjectEdit(), "Object.Edit"); - addMenu(new LLObjectInspect(), "Object.Inspect"); - addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); - addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); - addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand"); - addMenu(new LLObjectEnableDelete(), "Object.EnableDelete"); - addMenu(new LLObjectEnableWear(), "Object.EnableWear"); - addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); - addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); - addMenu(new LLObjectEnableMute(), "Object.EnableMute"); - addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); +class LLAdvancedReloadSettingsOverrides : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + reload_personal_settings_overrides(NULL); + return true; + } +}; - /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); - addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); - addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp"); - addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere"); - addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/ - // Attachment pie menu - addMenu(new LLAttachmentDrop(), "Attachment.Drop"); - addMenu(new LLAttachmentDetach(), "Attachment.Detach"); - addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop"); - addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach"); +////////////// +// HUD INFO // +////////////// - // Land pie menu - addMenu(new LLLandBuild(), "Land.Build"); - addMenu(new LLLandSit(), "Land.Sit"); - addMenu(new LLLandBuyPass(), "Land.BuyPass"); - addMenu(new LLLandEdit(), "Land.Edit"); - addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass"); +class LLAdvancedToggleHUDInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString info_type = userdata.asString(); + if ("velocity" == info_type) + { + toggle_visibility( (void*)gVelocityBar ); + } + else if ("camera" == info_type) + { + gDisplayCameraPos = !(gDisplayCameraPos); + } + else if ("wind" == info_type) + { + gDisplayWindInfo = !(gDisplayWindInfo); + } + else if ("fov" == info_type) + { + gDisplayFOV = !(gDisplayFOV); + } + return true; + } +}; - // Generic actions - addMenu(new LLShowFloater(), "ShowFloater"); - addMenu(new LLPromptShowURL(), "PromptShowURL"); - addMenu(new LLPromptShowFile(), "PromptShowFile"); - addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); - addMenu(new LLShowAgentGroups(), "ShowAgentGroups"); - addMenu(new LLToggleControl(), "ToggleControl"); +class LLAdvancedCheckHUDInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString info_type = userdata["data"].asString(); + bool new_value = false; + if ("velocity" == info_type) + { + new_value = get_visibility( (void*)gVelocityBar ); + } + else if ("camera" == info_type) + { + new_value = gDisplayCameraPos; + } + else if ("wind" == info_type) + { + new_value = gDisplayWindInfo; + } + else if ("fov" == info_type) + { + new_value = gDisplayFOV; + } + + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + + return true; + } +}; + + + +/////////////////////// +// CLEAR GROUP CACHE // +/////////////////////// + + +class LLAdvancedClearGroupCache : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLGroupMgr::debugClearAllGroups(NULL); + return true; + } +}; + + + + +///////////////// +// RENDER TYPE // +///////////////// + + +U32 render_type_from_string(LLString render_type) +{ + if ("simple" == render_type) + { + return LLPipeline::RENDER_TYPE_SIMPLE; + } + else if ("alpha" == render_type) + { + return LLPipeline::RENDER_TYPE_ALPHA; + } + else if ("tree" == render_type) + { + return LLPipeline::RENDER_TYPE_TREE; + } + else if ("avatar" == render_type) + { + return LLPipeline::RENDER_TYPE_AVATAR; + } + else if ("terrain" == render_type) + { + return LLPipeline::RENDER_TYPE_TERRAIN; + } + else if ("sky" == render_type) + { + return LLPipeline::RENDER_TYPE_SKY; + } + else if ("water" == render_type) + { + return LLPipeline::RENDER_TYPE_WATER; + } + else if ("ground" == render_type) + { + return LLPipeline::RENDER_TYPE_GROUND; + } + else if ("volume" == render_type) + { + return LLPipeline::RENDER_TYPE_VOLUME; + } + else if ("grass" == render_type) + { + return LLPipeline::RENDER_TYPE_GRASS; + } + else if ("clouds" == render_type) + { + return LLPipeline::RENDER_TYPE_CLOUDS; + } + else if ("particles" == render_type) + { + return LLPipeline::RENDER_TYPE_PARTICLES; + } + else if ("bump" == render_type) + { + return LLPipeline::RENDER_TYPE_BUMP; + } + else + { + return 0; + } +} + + +class LLAdvancedToggleRenderType : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 render_type = render_type_from_string( userdata.asString() ); + if ( render_type != 0 ) + { + LLPipeline::toggleRenderTypeControl( (void*)render_type ); + } + return true; + } +}; + + +class LLAdvancedCheckRenderType : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 render_type = render_type_from_string( userdata["data"].asString() ); + bool new_value = false; + + if ( render_type != 0 ) + { + new_value = LLPipeline::hasRenderTypeControl( (void*)render_type ); + } + + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////// +// FEATURE // +///////////// + + +U32 feature_from_string(LLString feature) +{ + if ("ui" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_UI; + } + else if ("selected" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_SELECTED; + } + else if ("highlighted" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_HIGHLIGHTED; + } + else if ("dynamic textures" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_DYNAMIC_TEXTURES; + } + else if ("foot shadows" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_FOOT_SHADOWS; + } + else if ("fog" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_FOG; + } + else if ("palette" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_PALETTE; + } + else if ("fr info" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_FR_INFO; + } + else if ("flexible" == feature) + { + return LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE; + } + else + { + return 0; + } +}; + + +class LLAdvancedToggleFeature : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 feature = feature_from_string( userdata.asString() ); + + if ( feature != 0 ) + { + LLPipeline::toggleRenderDebugFeature( (void*)feature ); + } + + return true; + } +}; + + +class LLAdvancedCheckFeature : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 feature = feature_from_string( userdata["data"].asString() ); + bool new_value = false; + + if ( feature != 0 ) + { + new_value = LLPipeline::toggleRenderDebugFeatureControl( (void*)feature ); + } + + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////// +// INFO DISPLAY // +////////////////// + + +U32 info_display_from_string(LLString info_display) +{ + if ("verify" == info_display) + { + return LLPipeline::RENDER_DEBUG_VERIFY; + } + else if ("bboxes" == info_display) + { + return LLPipeline::RENDER_DEBUG_BBOXES; + } + else if ("points" == info_display) + { + return LLPipeline::RENDER_DEBUG_POINTS; + } + else if ("octree" == info_display) + { + return LLPipeline::RENDER_DEBUG_OCTREE; + } + else if ("occlusion" == info_display) + { + return LLPipeline::RENDER_DEBUG_OCCLUSION; + } + else if ("render batches" == info_display) + { + return LLPipeline::RENDER_DEBUG_BATCH_SIZE; + } + else if ("texture anim" == info_display) + { + return LLPipeline::RENDER_DEBUG_TEXTURE_ANIM; + } + else if ("texture priority" == info_display) + { + return LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY; + } + else if ("shame" == info_display) + { + return LLPipeline::RENDER_DEBUG_SHAME; + } + else if ("texture area" == info_display) + { + return LLPipeline::RENDER_DEBUG_TEXTURE_AREA; + } + else if ("face area" == info_display) + { + return LLPipeline::RENDER_DEBUG_FACE_AREA; + } + else if ("picking" == info_display) + { + return LLPipeline::RENDER_DEBUG_PICKING; + } + else if ("lights" == info_display) + { + return LLPipeline::RENDER_DEBUG_LIGHTS; + } + else if ("particles" == info_display) + { + return LLPipeline::RENDER_DEBUG_PARTICLES; + } + else if ("composition" == info_display) + { + return LLPipeline::RENDER_DEBUG_COMPOSITION; + } + else if ("glow" == info_display) + { + return LLPipeline::RENDER_DEBUG_GLOW; + } + else + { + return 0; + } +}; + + +class LLAdvancedToggleInfoDisplay : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 info_display = info_display_from_string( userdata.asString() ); + + if ( info_display != 0 ) + { + LLPipeline::toggleRenderDebug( (void*)info_display ); + } + + return true; + } +}; + + +class LLAdvancedCheckInfoDisplay : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + U32 info_display = info_display_from_string( userdata["data"].asString() ); + bool new_value = false; + + if ( info_display != 0 ) + { + new_value = LLPipeline::toggleRenderDebugControl( (void*)info_display ); + } + + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////// +// SELECT BUFFER // +/////////////////// + + +class LLAdvancedToggleSelectBuffer : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugSelect = !(gDebugSelect); + return true; + } +}; + +class LLAdvancedCheckSelectBuffer : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugSelect; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////// +// RANDOMIZE FRAMERATE // +///////////////////////// + + +class LLAdvancedToggleRandomizeFramerate : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gRandomizeFramerate = !(gRandomizeFramerate); + return true; + } +}; + +class LLAdvancedCheckRandomizeFramerate : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gRandomizeFramerate; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////// +// PERIODIC SLOW FRAME // +///////////////////////// + + +class LLAdvancedTogglePeriodicSlowFrame : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gPeriodicSlowFrame = !(gPeriodicSlowFrame); + return true; + } +}; + +class LLAdvancedCheckPeriodicSlowFrame : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gPeriodicSlowFrame; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////// +// FRAME TEST // +//////////////// + + +class LLAdvancedToggleFrameTest : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLPipeline::sRenderFrameTest = !(LLPipeline::sRenderFrameTest); + return true; + } +}; + +class LLAdvancedCheckFrameTest : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLPipeline::sRenderFrameTest; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////////// +// HIDE SELECTED OBJECTS // +/////////////////////////// + + +class LLAdvancedToggleHideSelectedObjects : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gHideSelectedObjects = !(gHideSelectedObjects); + return true; + } +}; + +class LLAdvancedCheckHideSelectedObjects : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gHideSelectedObjects; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////////// +// SELECTED TEXTURE INFO // +/////////////////////////// + + +class LLAdvancedSelectedTextureInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_selected_texture_info(NULL); + return true; + } +}; + + + +////////////////////// +// TOGGLE WIREFRAME // +////////////////////// + + +class LLAdvancedToggleWireframe : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gUseWireframe = !(gUseWireframe); + return true; + } +}; + +class LLAdvancedCheckWireframe : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gUseWireframe; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////// +// DISABLE TEXTURES // +////////////////////// + + +class LLAdvancedToggleDisableTextures : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + menu_toggle_variable((void*)&LLViewerImage::sDontLoadVolumeTextures); + return true; + } +}; + +class LLAdvancedCheckDisableTextures : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = menu_check_variable((void*)&LLViewerImage::sDontLoadVolumeTextures); + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////////// +// DUMP SCRIPTED CAMERA // +////////////////////////// + + +class LLAdvancedDumpScriptedCamera : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_dump_followcam(NULL); + return true; + } +}; + + + +////////////////////////////// +// DUMP REGION OBJECT CACHE // +////////////////////////////// + + +class LLAdvancedDumpRegionObjectCache : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_dump_region_object_cache(NULL); + return true; + } +}; + + + +//////////////// +// SLURL TEST // +//////////////// + + +class LLAdvancedSLURLTest : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_slurl_test(NULL); + return true; + } +}; + + + +//////////////////////// +// TOGGLE EDITABLE UI // +//////////////////////// + + +class LLAdvancedToggleEditableUI : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + edit_ui(NULL); + return true; + } +}; + +// *TODO: Add corresponding "Check" for EditableUI, so it can +// become a menu_item_check. Need to add check_edit_ui(void*) +// or functional equivalent to do that. + + + +////////////////////// +// ASYNC KEYSTROKES // +////////////////////// + + +class LLAdvancedToggleAsyncKeystrokes : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gHandleKeysAsync = !(gHandleKeysAsync); + return true; + } +}; + +class LLAdvancedCheckAsyncKeystrokes : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gHandleKeysAsync; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////// +// DUMP SELECT MGR // +///////////////////// + + +class LLAdvancedDumpSelectMgr : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + dump_select_mgr(NULL); + return true; + } +}; + + + +//////////////////// +// DUMP INVENTORY // +//////////////////// + + +class LLAdvancedDumpInventory : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + dump_inventory(NULL); + return true; + } +}; + + + +/////////////////////// +// DUMP FOCUS HOLDER // +/////////////////////// + + +class LLAdvancedDumpFocusHolder : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_dump_focus(NULL); + return true; + } +}; + + + +//////////////////////////////// +// PRINT SELECTED OBJECT INFO // +//////////////////////////////// + + +class LLAdvancedPrintSelectedObjectInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + print_object_info(NULL); + return true; + } +}; + + + +////////////////////// +// PRINT AGENT INFO // +////////////////////// + + +class LLAdvancedPrintAgentInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + print_agent_nvpairs(NULL); + return true; + } +}; + + + +//////////////////////////////// +// PRINT TEXTURE MEMORY STATS // +//////////////////////////////// + + +class LLAdvancedPrintTextureMemoryStats : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + output_statistics(NULL); + return true; + } +}; + + + +////////////////////// +// DEBUG SELECT MGR // +////////////////////// + + +class LLAdvancedToggleDebugSelectMgr : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugSelectMgr = !(gDebugSelectMgr); + return true; + } +}; + +class LLAdvancedCheckDebugSelectMgr : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugSelectMgr; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////// +// DEBUG CLICKS // +////////////////// + + +class LLAdvancedToggleDebugClicks : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugClicks = !(gDebugClicks); + return true; + } +}; + +class LLAdvancedCheckDebugClicks : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugClicks; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////// +// DEBUG VIEWS // +///////////////// + + +class LLAdvancedToggleDebugViews : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLView::sDebugRects = !(LLView::sDebugRects); + return true; + } +}; + +class LLAdvancedCheckDebugViews : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLView::sDebugRects; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////// +// XUI NAME TOOLTIPS // +/////////////////////// + + +class LLAdvancedToggleXUINameTooltips : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + toggle_show_xui_names(NULL); + return true; + } +}; + +class LLAdvancedCheckXUINameTooltips : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = check_show_xui_names(NULL); + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////////// +// DEBUG MOUSE EVENTS // +//////////////////////// + + +class LLAdvancedToggleDebugMouseEvents : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLView::sDebugMouseHandling = !(LLView::sDebugMouseHandling); + return true; + } +}; + +class LLAdvancedCheckDebugMouseEvents : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLView::sDebugMouseHandling; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////// +// DEBUG KEYS // +//////////////// + + +class LLAdvancedToggleDebugKeys : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLView::sDebugKeys = !(LLView::sDebugKeys); + return true; + } +}; + +class LLAdvancedCheckDebugKeys : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLView::sDebugKeys; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////// +// DEBUG WINDOW PROC // +/////////////////////// + + +class LLAdvancedToggleDebugWindowProc : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugWindowProc = !(gDebugWindowProc); + return true; + } +}; + +class LLAdvancedCheckDebugWindowProc : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugWindowProc; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////////////// +// DEBUG TEXT EDITOR TIPS // +//////////////////////////// + + +class LLAdvancedToggleDebugTextEditorTips : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugTextEditorTips = !(gDebugTextEditorTips); + return true; + } +}; + +class LLAdvancedCheckDebugTextEditorTips : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugTextEditorTips; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////// +// SHOW FLOATER TEST // +/////////////////////// + + +class LLAdvancedShowFloaterTest : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterTest::show(NULL); + return true; + } +}; + + + +///////////////////////// +// EXPORT MENUS TO XML // +///////////////////////// + + +class LLAdvancedExportMenusToXML : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_export_menus_to_xml(NULL); + return true; + } +}; + + + +///////////// +// EDIT UI // +///////////// + + +class LLAdvancedEditUI : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterEditUI::show(NULL); + return true; + } +}; + + + +////////////////////// +// LOAD UI FROM XML // +////////////////////// + + +class LLAdvancedLoadUIFromXML : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_load_from_xml(NULL); + return true; + } +}; + + + +//////////////////// +// SAVE UI TO XML // +//////////////////// + + +class LLAdvancedSaveUIToXML : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_save_to_xml(NULL); + return true; + } +}; + + + +/////////////// +// XUI NAMES // +/////////////// + + +class LLAdvancedToggleXUINames : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + toggle_show_xui_names(NULL); + return true; + } +}; + +class LLAdvancedCheckXUINames : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = check_show_xui_names(NULL); + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////////// +// GRAB BAKED TEXTURE // +//////////////////////// + + +class LLAdvancedGrabBakedTexture : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString texture_type = userdata.asString(); + if ("eyes" == texture_type) + { + handle_grab_texture( (void*)LLVOAvatar::TEX_EYES_BAKED ); + } + else if ("head" == texture_type) + { + handle_grab_texture( (void*)LLVOAvatar::TEX_HEAD_BAKED ); + } + else if ("upper" == texture_type) + { + handle_grab_texture( (void*)LLVOAvatar::TEX_UPPER_BAKED ); + } + else if ("lower" == texture_type) + { + handle_grab_texture( (void*)LLVOAvatar::TEX_SKIRT_BAKED ); + } + else if ("skirt" == texture_type) + { + handle_grab_texture( (void*)LLVOAvatar::TEX_SKIRT_BAKED ); + } + + return true; + } +}; + +class LLAdvancedEnableGrabBakedTexture : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString texture_type = userdata["data"].asString(); + bool new_value = false; + + if ("iris" == texture_type) + { + new_value = enable_grab_texture( (void*)LLVOAvatar::TEX_EYES_BAKED ); + } + else if ("head" == texture_type) + { + new_value = enable_grab_texture( (void*)LLVOAvatar::TEX_HEAD_BAKED ); + } + else if ("upper" == texture_type) + { + new_value = enable_grab_texture( (void*)LLVOAvatar::TEX_UPPER_BAKED ); + } + else if ("lower" == texture_type) + { + new_value = enable_grab_texture( (void*)LLVOAvatar::TEX_LOWER_BAKED ); + } + else if ("skirt" == texture_type) + { + new_value = enable_grab_texture( (void*)LLVOAvatar::TEX_SKIRT_BAKED ); + } + + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////// +// ALLOW IDLE / AFK // +////////////////////// + + +class LLAdvancedToggleAllowIdleAFK : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gAllowIdleAFK = !(gAllowIdleAFK); + return true; + } +}; + +class LLAdvancedCheckAllowIdleAFK : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gAllowIdleAFK; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////// +// APPEARANCE TO XML // +/////////////////////// + + +class LLAdvancedAppearanceToXML : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::dumpArchetypeXML(NULL); + return true; + } +}; + + + +/////////////////////////////// +// TOGGLE CHARACTER GEOMETRY // +/////////////////////////////// + + +class LLAdvancedToggleCharacterGeometry : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_god_request_avatar_geometry(NULL); + return true; + } +}; + +class LLAdvancedEnableCharacterGeometry : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + enable_god_customer_service(NULL); + return true; + } +}; + + + +///////////////////////////// +// TEST MALE / TEST FEMALE // +///////////////////////////// + + +class LLAdvancedTestMale : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_test_male(NULL); + return true; + } +}; + + +class LLAdvancedTestFemale : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_test_female(NULL); + return true; + } +}; + + + +/////////////// +// TOGGLE PG // +/////////////// + + +class LLAdvancedTogglePG : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_toggle_pg(NULL); + return true; + } +}; + + + +///////////////////////// +// ALLOW SELECT AVATAR // +///////////////////////// + + +class LLAdvancedToggleAllowSelectAvatar : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gAllowSelectAvatar = !(gAllowSelectAvatar); + return true; + } +}; + +class LLAdvancedCheckAllowSelectAvatar : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gAllowSelectAvatar; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////////////// +// ALLOW TAP-TAP-HOLD RUN // +//////////////////////////// + + +class LLAdvancedToggleAllowTapTapHoldRun : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gAllowTapTapHoldRun = !(gAllowTapTapHoldRun); + return true; + } +}; + +class LLAdvancedCheckAllowTapTapHoldRun : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gAllowTapTapHoldRun; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////////// +// FORCE PARAMS TO DEFAULT // +///////////////////////////// + + +class LLAdvancedForceParamsToDefault : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLAgent::clearVisualParams(NULL); + return true; + } +}; + + + +////////////////////////// +// RELOAD VERTEX SHADER // +////////////////////////// + + +class LLAdvancedReloadVertexShader : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + reload_vertex_shader(NULL); + return true; + } +}; + + + +//////////////////// +// ANIMATION INFO // +//////////////////// + + +class LLAdvancedToggleAnimationInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::sShowAnimationDebug = !(LLVOAvatar::sShowAnimationDebug); + return true; + } +}; + +class LLAdvancedCheckAnimationInfo : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLVOAvatar::sShowAnimationDebug; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////////////// +// SLOW MOTION ANIMATIONS // +//////////////////////////// + + +class LLAdvancedToggleSlowMotionAnimations : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + slow_mo_animations(NULL); + return true; + } +}; + +// *TODO: Add a corresponding "Check" event for SlowMotionAnimations, +// so that it can become a menu_item_check with the "X" indicator. +// See indra/newview/skins/xui/en_us/menu_viewer.xml + + + +////////////////// +// SHOW LOOK AT // +////////////////// + + +class LLAdvancedToggleShowLookAt : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLHUDEffectLookAt::sDebugLookAt = !(LLHUDEffectLookAt::sDebugLookAt); + return true; + } +}; + +class LLAdvancedCheckShowLookAt : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLHUDEffectLookAt::sDebugLookAt; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////// +// SHOW POINT AT // +/////////////////// + + +class LLAdvancedToggleShowPointAt : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLHUDEffectPointAt::sDebugPointAt = !(LLHUDEffectPointAt::sDebugPointAt); + return true; + } +}; + +class LLAdvancedCheckShowPointAt : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLHUDEffectPointAt::sDebugPointAt; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////// +// DEBUG JOINT UPDATES // +///////////////////////// + + +class LLAdvancedToggleDebugJointUpdates : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::sJointDebug = !(LLVOAvatar::sJointDebug); + return true; + } +}; + +class LLAdvancedCheckDebugJointUpdates : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLVOAvatar::sJointDebug; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////// +// DISABLE LOD // +///////////////// + + +class LLAdvancedToggleDisableLOD : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLViewerJoint::sDisableLOD = !(LLViewerJoint::sDisableLOD); + return true; + } +}; + +class LLAdvancedCheckDisableLOD : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLViewerJoint::sDisableLOD; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////// +// DEBUG CHARACTER VIS // +///////////////////////// + + +class LLAdvancedToggleDebugCharacterVis : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::sDebugInvisible = !(LLVOAvatar::sDebugInvisible); + return true; + } +}; + +class LLAdvancedCheckDebugCharacterVis : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLVOAvatar::sDebugInvisible; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////////// +// SHOW COLLISION PLANE // +////////////////////////// + +/*************************** + * + * Disabled. See DEV-14477 + * + *************************** + +class LLAdvancedToggleShowCollisionPlane : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::sShowFootPlane = !(LLVOAvatar::sShowFootPlane); + return true; + } +}; + +class LLAdvancedCheckShowCollisionPlane : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLVOAvatar::sShowFootPlane; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + +***************************/ + + +///////////////////////////// +// SHOW COLLISION SKELETON // +///////////////////////////// + + +class LLAdvancedToggleShowCollisionSkeleton : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLVOAvatar::sShowCollisionVolumes = !(LLVOAvatar::sShowCollisionVolumes); + return true; + } +}; + +class LLAdvancedCheckShowCollisionSkeleton : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLVOAvatar::sShowCollisionVolumes; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////////// +// DISPLAY AGENT TARGET // +////////////////////////// + + +class LLAdvancedToggleDisplayAgentTarget : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLAgent::sDebugDisplayTarget = !(LLAgent::sDebugDisplayTarget); + return true; + } +}; + +class LLAdvancedCheckDisplayAgentTarget : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLAgent::sDebugDisplayTarget; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +/////////////////////////// +// DEBUG AVATAR ROTATION // +/////////////////////////// + + +class LLAdvancedToggleDebugAvatarRotation : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gDebugAvatarRotation = !(gDebugAvatarRotation); + return true; + } +}; + +class LLAdvancedCheckDebugAvatarRotation : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gDebugAvatarRotation; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////////// +// DUMP ATTACHMENTS // +////////////////////// + + +class LLAdvancedDumpAttachments : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_dump_attachments(NULL); + return true; + } +}; + + + +///////////////////// +// REBAKE TEXTURES // +///////////////////// + + +class LLAdvancedRebakeTextures : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_rebake_textures(NULL); + return true; + } +}; + + + +/////////////////////////// +// DEBUG AVATAR TEXTURES // +/////////////////////////// + + +class LLAdvancedDebugAvatarTextures : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_debug_avatar_textures(NULL); + return true; + } +}; + + + +//////////////////////////////// +// DUMP AVATAR LOCAL TEXTURES // +//////////////////////////////// + + +class LLAdvancedDumpAvatarLocalTextures : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_dump_avatar_local_textures(NULL); + return true; + } +}; + + + +///////////////// +// MESSAGE LOG // +///////////////// + + +class LLAdvancedEnableMessageLog : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_viewer_enable_message_log(NULL); + return true; + } +}; + +class LLAdvancedDisableMessageLog : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_viewer_disable_message_log(NULL); + return true; + } +}; + + + +///////////////// +// DROP PACKET // +///////////////// + + +class LLAdvancedDropPacket : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + drop_packet(NULL); + return true; + } +}; + + + +///////////////////////// +// FRAME STATS LOGGING // +///////////////////////// + + +class LLAdvancedFrameStatsLogging : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString command = userdata.asString(); + if ("start logging" == command) + { + LLFrameStats::startLogging(NULL); + } + else if ("stop logging" == command) + { + LLFrameStats::stopLogging(NULL); + } + else if ("timed logging 10" == command) + { + LLFrameStats::timedLogging10(NULL); + } + else if ("timed logging 30" == command) + { + LLFrameStats::timedLogging30(NULL); + } + else if ("timed logging 60" == command) + { + LLFrameStats::timedLogging60(NULL); + } + + return true; + } +}; + + + +///////////////// +// AGENT PILOT // +///////////////// + + +class LLAdvancedAgentPilot : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLString command = userdata.asString(); + if ("start playback" == command) + { + LLAgentPilot::startPlayback(NULL); + } + else if ("stop playback" == command) + { + LLAgentPilot::stopPlayback(NULL); + } + else if ("start record" == command) + { + LLAgentPilot::startRecord(NULL); + } + else if ("stop record" == command) + { + LLAgentPilot::saveRecord(NULL); + } + + return true; + } +}; + + + +////////////////////// +// AGENT PILOT LOOP // +////////////////////// + + +class LLAdvancedToggleAgentPilotLoop : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLAgentPilot::sLoop = !(LLAgentPilot::sLoop); + return true; + } +}; + +class LLAdvancedCheckAgentPilotLoop : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = LLAgentPilot::sLoop; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +///////////////////////// +// SHOW OBJECT UPDATES // +///////////////////////// + + +class LLAdvancedToggleShowObjectUpdates : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + gShowObjectUpdates = !(gShowObjectUpdates); + return true; + } +}; + +class LLAdvancedCheckShowObjectUpdates : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = gShowObjectUpdates; + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +//////////////////// +// COMPRESS IMAGE // +//////////////////// + + +class LLAdvancedCompressImage : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_compress_image(NULL); + return true; + } +}; + + + +////////////////////// +// CLOTHING FLOATER // +////////////////////// + + +class LLAdvancedToggleClothingFloater : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_clothing(NULL); + return true; + } +}; + +// There is no LLAdvancedCheckClothingFloater. + + + +///////////////////////// +// SHOW DEBUG SETTINGS // +///////////////////////// + + +class LLAdvancedShowDebugSettings : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterSettingsDebug::show(NULL); + return true; + } +}; + + + +//////////////////////// +// VIEW ADMIN OPTIONS // +//////////////////////// + + +class LLAdvancedToggleViewAdminOptions : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_admin_override_toggle(NULL); + return true; + } +}; + +class LLAdvancedCheckViewAdminOptions : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + bool new_value = check_admin_override(NULL); + LLString control_name = userdata["control"].asString(); + gMenuHolder->findControl(control_name)->setValue(new_value); + return true; + } +}; + + + +////////////////// +// ADMIN STATUS // +////////////////// + + +class LLAdvancedRequestAdminStatus : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_god_mode(NULL); + return true; + } +}; + +class LLAdvancedLeaveAdminStatus : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + handle_leave_god_mode(NULL); + return true; + } +}; + + + +static void addMenu(view_listener_t *menu, const char *name) +{ + sMenus.push_back(menu); + menu->registerListener(gMenuHolder, name); +} + +void initialize_menus() +{ + // File menu + init_menu_file(); + + // Edit menu + addMenu(new LLEditUndo(), "Edit.Undo"); + addMenu(new LLEditRedo(), "Edit.Redo"); + addMenu(new LLEditCut(), "Edit.Cut"); + addMenu(new LLEditCopy(), "Edit.Copy"); + addMenu(new LLEditPaste(), "Edit.Paste"); + addMenu(new LLEditDelete(), "Edit.Delete"); + addMenu(new LLEditSearch(), "Edit.Search"); + addMenu(new LLEditSelectAll(), "Edit.SelectAll"); + addMenu(new LLEditDeselect(), "Edit.Deselect"); + addMenu(new LLEditDuplicate(), "Edit.Duplicate"); + addMenu(new LLEditTakeOff(), "Edit.TakeOff"); + + addMenu(new LLEditEnableUndo(), "Edit.EnableUndo"); + addMenu(new LLEditEnableRedo(), "Edit.EnableRedo"); + addMenu(new LLEditEnableCut(), "Edit.EnableCut"); + addMenu(new LLEditEnableCopy(), "Edit.EnableCopy"); + addMenu(new LLEditEnablePaste(), "Edit.EnablePaste"); + addMenu(new LLEditEnableDelete(), "Edit.EnableDelete"); + addMenu(new LLEditEnableSelectAll(), "Edit.EnableSelectAll"); + addMenu(new LLEditEnableDeselect(), "Edit.EnableDeselect"); + addMenu(new LLEditEnableDuplicate(), "Edit.EnableDuplicate"); + addMenu(new LLEditEnableTakeOff(), "Edit.EnableTakeOff"); + addMenu(new LLEditEnableCustomizeAvatar(), "Edit.EnableCustomizeAvatar"); + + // View menu + addMenu(new LLViewMouselook(), "View.Mouselook"); + addMenu(new LLViewBuildMode(), "View.BuildMode"); + addMenu(new LLViewJoystickFlycam(), "View.JoystickFlycam"); + addMenu(new LLViewResetView(), "View.ResetView"); + addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); + addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); + addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); + addMenu(new LLViewToggleBeacon(), "View.ToggleBeacon"); + addMenu(new LLViewBeaconWidth(), "View.BeaconWidth"); + addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); + addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); + addMenu(new LLViewZoomOut(), "View.ZoomOut"); + addMenu(new LLViewZoomIn(), "View.ZoomIn"); + addMenu(new LLViewZoomDefault(), "View.ZoomDefault"); + addMenu(new LLViewFullscreen(), "View.Fullscreen"); + addMenu(new LLViewDefaultUISize(), "View.DefaultUISize"); + + addMenu(new LLViewEnableMouselook(), "View.EnableMouselook"); + addMenu(new LLViewEnableLastChatter(), "View.EnableLastChatter"); + + addMenu(new LLViewCheckBuildMode(), "View.CheckBuildMode"); + addMenu(new LLViewCheckJoystickFlycam(), "View.CheckJoystickFlycam"); + addMenu(new LLViewCheckShowHoverTips(), "View.CheckShowHoverTips"); + addMenu(new LLViewCheckHighlightTransparent(), "View.CheckHighlightTransparent"); + addMenu(new LLViewCheckBeaconEnabled(), "View.CheckBeaconEnabled"); + addMenu(new LLViewCheckRenderType(), "View.CheckRenderType"); + addMenu(new LLViewCheckHUDAttachments(), "View.CheckHUDAttachments"); + + // World menu + addMenu(new LLWorldChat(), "World.Chat"); + addMenu(new LLWorldAlwaysRun(), "World.AlwaysRun"); + addMenu(new LLWorldFly(), "World.Fly"); + addMenu(new LLWorldEnableFly(), "World.EnableFly"); + addMenu(new LLWorldCreateLandmark(), "World.CreateLandmark"); + addMenu(new LLWorldSetHomeLocation(), "World.SetHomeLocation"); + addMenu(new LLWorldTeleportHome(), "World.TeleportHome"); + addMenu(new LLWorldSetAway(), "World.SetAway"); + addMenu(new LLWorldSetBusy(), "World.SetBusy"); + + addMenu(new LLWorldEnableCreateLandmark(), "World.EnableCreateLandmark"); + addMenu(new LLWorldEnableSetHomeLocation(), "World.EnableSetHomeLocation"); + addMenu(new LLWorldEnableTeleportHome(), "World.EnableTeleportHome"); + addMenu(new LLWorldEnableBuyLand(), "World.EnableBuyLand"); + + addMenu(new LLWorldCheckAlwaysRun(), "World.CheckAlwaysRun"); + + (new LLWorldEnvSettings())->registerListener(gMenuHolder, "World.EnvSettings"); + (new LLWorldWaterSettings())->registerListener(gMenuHolder, "World.WaterSettings"); + (new LLWorldPostProcess())->registerListener(gMenuHolder, "World.PostProcess"); + (new LLWorldDayCycle())->registerListener(gMenuHolder, "World.DayCycle"); + + // Tools menu + addMenu(new LLToolsSelectTool(), "Tools.SelectTool"); + addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects"); + addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects"); + addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding"); + addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection"); + addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius"); + addMenu(new LLToolsEditLinkedParts(), "Tools.EditLinkedParts"); + addMenu(new LLToolsSnapObjectXY(), "Tools.SnapObjectXY"); + addMenu(new LLToolsUseSelectionForGrid(), "Tools.UseSelectionForGrid"); + addMenu(new LLToolsLink(), "Tools.Link"); + addMenu(new LLToolsUnlink(), "Tools.Unlink"); + addMenu(new LLToolsStopAllAnimations(), "Tools.StopAllAnimations"); + addMenu(new LLToolsLookAtSelection(), "Tools.LookAtSelection"); + addMenu(new LLToolsBuyOrTake(), "Tools.BuyOrTake"); + addMenu(new LLToolsTakeCopy(), "Tools.TakeCopy"); + addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); + addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); + addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); + + addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); + addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); + addMenu(new LLToolsEnableUnlink(), "Tools.EnableUnlink"); + addMenu(new LLToolsEnableBuyOrTake(), "Tools.EnableBuyOrTake"); + addMenu(new LLToolsEnableTakeCopy(), "Tools.EnableTakeCopy"); + addMenu(new LLToolsEnableSaveToInventory(), "Tools.SaveToInventory"); + addMenu(new LLToolsEnableSaveToObjectInventory(), "Tools.SaveToObjectInventory"); + + /*addMenu(new LLToolsVisibleBuyObject(), "Tools.VisibleBuyObject"); + addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/ + + // Help menu + // most items use the ShowFloater method + + // Self pie menu + addMenu(new LLSelfStandUp(), "Self.StandUp"); + addMenu(new LLSelfRemoveAllAttachments(), "Self.RemoveAllAttachments"); + + addMenu(new LLSelfEnableStandUp(), "Self.EnableStandUp"); + addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments"); + + // Avatar pie menu + addMenu(new LLObjectMute(), "Avatar.Mute"); + addMenu(new LLAvatarAddFriend(), "Avatar.AddFriend"); + addMenu(new LLAvatarFreeze(), "Avatar.Freeze"); + addMenu(new LLAvatarDebug(), "Avatar.Debug"); + addMenu(new LLAvatarVisibleDebug(), "Avatar.VisibleDebug"); + addMenu(new LLAvatarEnableDebug(), "Avatar.EnableDebug"); + addMenu(new LLAvatarInviteToGroup(), "Avatar.InviteToGroup"); + addMenu(new LLAvatarGiveCard(), "Avatar.GiveCard"); + addMenu(new LLAvatarEject(), "Avatar.Eject"); + addMenu(new LLAvatarSendIM(), "Avatar.SendIM"); + + addMenu(new LLObjectEnableMute(), "Avatar.EnableMute"); + addMenu(new LLAvatarEnableAddFriend(), "Avatar.EnableAddFriend"); + addMenu(new LLAvatarEnableFreezeEject(), "Avatar.EnableFreezeEject"); + + // Object pie menu + addMenu(new LLObjectOpen(), "Object.Open"); + addMenu(new LLObjectBuild(), "Object.Build"); + addMenu(new LLObjectTouch(), "Object.Touch"); + addMenu(new LLObjectSitOrStand(), "Object.SitOrStand"); + addMenu(new LLObjectDelete(), "Object.Delete"); + addMenu(new LLObjectAttachToAvatar(), "Object.AttachToAvatar"); + addMenu(new LLObjectReturn(), "Object.Return"); + addMenu(new LLObjectReportAbuse(), "Object.ReportAbuse"); + addMenu(new LLObjectMute(), "Object.Mute"); + addMenu(new LLObjectBuy(), "Object.Buy"); + addMenu(new LLObjectEdit(), "Object.Edit"); + addMenu(new LLObjectInspect(), "Object.Inspect"); + + addMenu(new LLObjectEnableOpen(), "Object.EnableOpen"); + addMenu(new LLObjectEnableTouch(), "Object.EnableTouch"); + addMenu(new LLObjectEnableSitOrStand(), "Object.EnableSitOrStand"); + addMenu(new LLObjectEnableDelete(), "Object.EnableDelete"); + addMenu(new LLObjectEnableWear(), "Object.EnableWear"); + addMenu(new LLObjectEnableReturn(), "Object.EnableReturn"); + addMenu(new LLObjectEnableReportAbuse(), "Object.EnableReportAbuse"); + addMenu(new LLObjectEnableMute(), "Object.EnableMute"); + addMenu(new LLObjectEnableBuy(), "Object.EnableBuy"); + + /*addMenu(new LLObjectVisibleTouch(), "Object.VisibleTouch"); + addMenu(new LLObjectVisibleCustomTouch(), "Object.VisibleCustomTouch"); + addMenu(new LLObjectVisibleStandUp(), "Object.VisibleStandUp"); + addMenu(new LLObjectVisibleSitHere(), "Object.VisibleSitHere"); + addMenu(new LLObjectVisibleCustomSit(), "Object.VisibleCustomSit");*/ + + // Attachment pie menu + addMenu(new LLAttachmentDrop(), "Attachment.Drop"); + addMenu(new LLAttachmentDetach(), "Attachment.Detach"); + + addMenu(new LLAttachmentEnableDrop(), "Attachment.EnableDrop"); + addMenu(new LLAttachmentEnableDetach(), "Attachment.EnableDetach"); + + // Land pie menu + addMenu(new LLLandBuild(), "Land.Build"); + addMenu(new LLLandSit(), "Land.Sit"); + addMenu(new LLLandBuyPass(), "Land.BuyPass"); + addMenu(new LLLandEdit(), "Land.Edit"); + + addMenu(new LLLandEnableBuyPass(), "Land.EnableBuyPass"); + + // Generic actions + addMenu(new LLShowFloater(), "ShowFloater"); + addMenu(new LLPromptShowURL(), "PromptShowURL"); + addMenu(new LLPromptShowFile(), "PromptShowFile"); + addMenu(new LLShowAgentProfile(), "ShowAgentProfile"); + addMenu(new LLShowAgentGroups(), "ShowAgentGroups"); + addMenu(new LLToggleControl(), "ToggleControl"); addMenu(new LLGoToObject(), "GoToObject"); addMenu(new LLPayObject(), "PayObject"); @@ -7928,4 +10043,155 @@ void initialize_menus() addMenu(new LLSomethingSelected(), "SomethingSelected"); addMenu(new LLSomethingSelectedNoHUD(), "SomethingSelectedNoHUD"); addMenu(new LLEditableSelected(), "EditableSelected"); + + + // Advanced (top level menu) + addMenu(new LLAdvancedToggleConsole(), "Advanced.ToggleConsole"); + addMenu(new LLAdvancedCheckConsole(), "Advanced.CheckConsole"); + addMenu(new LLAdvancedDumpInfoToConsole(), "Advanced.DumpInfoToConsole"); + addMenu(new LLAdvancedReloadSettingsOverrides(), "Advanced.ReloadSettingsOverrides"); + + // Advanced > HUD Info + addMenu(new LLAdvancedToggleHUDInfo(), "Advanced.ToggleHUDInfo"); + addMenu(new LLAdvancedCheckHUDInfo(), "Advanced.CheckHUDInfo"); + + addMenu(new LLAdvancedClearGroupCache(), "Advanced.ClearGroupCache"); + + // Advanced > Render > Types + addMenu(new LLAdvancedToggleRenderType(), "Advanced.ToggleRenderType"); + addMenu(new LLAdvancedCheckRenderType(), "Advanced.CheckRenderType"); + + // Advanced > Render > Features + addMenu(new LLAdvancedToggleFeature(), "Advanced.ToggleFeature"); + addMenu(new LLAdvancedCheckFeature(), "Advanced.CheckFeature"); + + // Advanced > Render > Info Displays + addMenu(new LLAdvancedToggleInfoDisplay(), "Advanced.ToggleInfoDisplay"); + addMenu(new LLAdvancedCheckInfoDisplay(), "Advanced.CheckInfoDisplay"); + addMenu(new LLAdvancedToggleSelectBuffer(), "Advanced.ToggleSelectBuffer"); + addMenu(new LLAdvancedCheckSelectBuffer(), "Advanced.CheckSelectBuffer"); + addMenu(new LLAdvancedToggleRandomizeFramerate(), "Advanced.ToggleRandomizeFramerate"); + addMenu(new LLAdvancedCheckRandomizeFramerate(), "Advanced.CheckRandomizeFramerate"); + addMenu(new LLAdvancedTogglePeriodicSlowFrame(), "Advanced.TogglePeriodicSlowFrame"); + addMenu(new LLAdvancedCheckPeriodicSlowFrame(), "Advanced.CheckPeriodicSlowFrame"); + addMenu(new LLAdvancedToggleFrameTest(), "Advanced.ToggleFrameTest"); + addMenu(new LLAdvancedCheckFrameTest(), "Advanced.CheckFrameTest"); + addMenu(new LLAdvancedToggleHideSelectedObjects(), "Advanced.ToggleHideSelectedObjects"); + addMenu(new LLAdvancedCheckHideSelectedObjects(), "Advanced.CheckHideSelectedObjects"); + addMenu(new LLAdvancedSelectedTextureInfo(), "Advanced.SelectedTextureInfo"); + addMenu(new LLAdvancedToggleWireframe(), "Advanced.ToggleWireframe"); + addMenu(new LLAdvancedCheckWireframe(), "Advanced.CheckWireframe"); + addMenu(new LLAdvancedToggleDisableTextures(), "Advanced.ToggleDisableTextures"); + addMenu(new LLAdvancedCheckDisableTextures(), "Advanced.CheckDisableTextures"); + + // Advanced > World + addMenu(new LLAdvancedDumpScriptedCamera(), "Advanced.DumpScriptedCamera"); + addMenu(new LLAdvancedDumpRegionObjectCache(), "Advanced.DumpRegionObjectCache"); + + // Advanced > UI + addMenu(new LLAdvancedSLURLTest(), "Advanced.SLURLTest"); + addMenu(new LLAdvancedToggleEditableUI(), "Advanced.ToggleEditableUI"); + //addMenu(new LLAdvancedCheckEditableUI(), "Advanced.CheckEditableUI"); + addMenu(new LLAdvancedToggleAsyncKeystrokes(), "Advanced.ToggleAsyncKeystrokes"); + addMenu(new LLAdvancedCheckAsyncKeystrokes(), "Advanced.CheckAsyncKeystrokes"); + addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr"); + addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory"); + addMenu(new LLAdvancedDumpFocusHolder(), "Advanced.DumpFocusHolder"); + addMenu(new LLAdvancedPrintSelectedObjectInfo(), "Advanced.PrintSelectedObjectInfo"); + addMenu(new LLAdvancedPrintAgentInfo(), "Advanced.PrintAgentInfo"); + addMenu(new LLAdvancedPrintTextureMemoryStats(), "Advanced.PrintTextureMemoryStats"); + addMenu(new LLAdvancedToggleDebugSelectMgr(), "Advanced.ToggleDebugSelectMgr"); + addMenu(new LLAdvancedCheckDebugSelectMgr(), "Advanced.CheckDebugSelectMgr"); + addMenu(new LLAdvancedToggleDebugClicks(), "Advanced.ToggleDebugClicks"); + addMenu(new LLAdvancedCheckDebugClicks(), "Advanced.CheckDebugClicks"); + addMenu(new LLAdvancedCheckDebugViews(), "Advanced.CheckDebugViews"); + addMenu(new LLAdvancedToggleDebugViews(), "Advanced.ToggleDebugViews"); + addMenu(new LLAdvancedToggleXUINameTooltips(), "Advanced.ToggleXUINameTooltips"); + addMenu(new LLAdvancedCheckXUINameTooltips(), "Advanced.CheckXUINameTooltips"); + addMenu(new LLAdvancedToggleDebugMouseEvents(), "Advanced.ToggleDebugMouseEvents"); + addMenu(new LLAdvancedCheckDebugMouseEvents(), "Advanced.CheckDebugMouseEvents"); + addMenu(new LLAdvancedToggleDebugKeys(), "Advanced.ToggleDebugKeys"); + addMenu(new LLAdvancedCheckDebugKeys(), "Advanced.CheckDebugKeys"); + addMenu(new LLAdvancedToggleDebugWindowProc(), "Advanced.ToggleDebugWindowProc"); + addMenu(new LLAdvancedCheckDebugWindowProc(), "Advanced.CheckDebugWindowProc"); + addMenu(new LLAdvancedToggleDebugTextEditorTips(), "Advanced.ToggleDebugTextEditorTips"); + addMenu(new LLAdvancedCheckDebugTextEditorTips(), "Advanced.CheckDebugTextEditorTips"); + + // Advanced > XUI + addMenu(new LLAdvancedShowFloaterTest(), "Advanced.ShowFloaterTest"); + addMenu(new LLAdvancedExportMenusToXML(), "Advanced.ExportMenusToXML"); + addMenu(new LLAdvancedEditUI(), "Advanced.EditUI"); + addMenu(new LLAdvancedLoadUIFromXML(), "Advanced.LoadUIFromXML"); + addMenu(new LLAdvancedSaveUIToXML(), "Advanced.SaveUIToXML"); + addMenu(new LLAdvancedToggleXUINames(), "Advanced.ToggleXUINames"); + addMenu(new LLAdvancedCheckXUINames(), "Advanced.CheckXUINames"); + + // Advanced > Character > Grab Baked Texture + addMenu(new LLAdvancedGrabBakedTexture(), "Advanced.GrabBakedTexture"); + addMenu(new LLAdvancedEnableGrabBakedTexture(), "Advanced.EnableGrabBakedTexture"); + + // Advanced > Character > Character Tests + addMenu(new LLAdvancedToggleAllowIdleAFK(), "Advanced.ToggleAllowIdleAFK"); + addMenu(new LLAdvancedCheckAllowIdleAFK(), "Advanced.CheckAllowIdleAFK"); + addMenu(new LLAdvancedAppearanceToXML(), "Advanced.AppearanceToXML"); + addMenu(new LLAdvancedToggleCharacterGeometry(), "Advanced.ToggleCharacterGeometry"); + addMenu(new LLAdvancedTestMale(), "Advanced.TestMale"); + addMenu(new LLAdvancedTestFemale(), "Advanced.TestFemale"); + addMenu(new LLAdvancedTogglePG(), "Advanced.TogglePG"); + addMenu(new LLAdvancedToggleAllowSelectAvatar(), "Advanced.ToggleAllowSelectAvatar"); + addMenu(new LLAdvancedCheckAllowSelectAvatar(), "Advanced.CheckAllowSelectAvatar"); + + // Advanced > Character (toplevel) + addMenu(new LLAdvancedToggleAllowTapTapHoldRun(), "Advanced.ToggleAllowTapTapHoldRun"); + addMenu(new LLAdvancedCheckAllowTapTapHoldRun(), "Advanced.CheckAllowTapTapHoldRun"); + addMenu(new LLAdvancedForceParamsToDefault(), "Advanced.ForceParamsToDefault"); + addMenu(new LLAdvancedReloadVertexShader(), "Advanced.ReloadVertexShader"); + addMenu(new LLAdvancedToggleAnimationInfo(), "Advanced.ToggleAnimationInfo"); + addMenu(new LLAdvancedCheckAnimationInfo(), "Advanced.CheckAnimationInfo"); + addMenu(new LLAdvancedToggleSlowMotionAnimations(), "Advanced.ToggleSlowMotionAnimations"); + //addMenu(new LLAdvancedCheckSlowMotionAnimations(), "Advanced.CheckSlowMotionAnimations"); + addMenu(new LLAdvancedToggleShowLookAt(), "Advanced.ToggleShowLookAt"); + addMenu(new LLAdvancedCheckShowLookAt(), "Advanced.CheckShowLookAt"); + addMenu(new LLAdvancedToggleShowPointAt(), "Advanced.ToggleShowPointAt"); + addMenu(new LLAdvancedCheckShowPointAt(), "Advanced.CheckShowPointAt"); + addMenu(new LLAdvancedToggleDebugJointUpdates(), "Advanced.ToggleDebugJointUpdates"); + addMenu(new LLAdvancedCheckDebugJointUpdates(), "Advanced.CheckDebugJointUpdates"); + addMenu(new LLAdvancedToggleDisableLOD(), "Advanced.ToggleDisableLOD"); + addMenu(new LLAdvancedCheckDisableLOD(), "Advanced.CheckDisableLOD"); + addMenu(new LLAdvancedToggleDebugCharacterVis(), "Advanced.ToggleDebugCharacterVis"); + addMenu(new LLAdvancedCheckDebugCharacterVis(), "Advanced.CheckDebugCharacterVis"); +// addMenu(new LLAdvancedToggleShowCollisionPlane(), "Advanced.ToggleShowCollisionPlane"); +// addMenu(new LLAdvancedCheckShowCollisionPlane(), "Advanced.CheckShowCollisionPlane"); + addMenu(new LLAdvancedToggleShowCollisionSkeleton(), "Advanced.ToggleShowCollisionSkeleton"); + addMenu(new LLAdvancedCheckShowCollisionSkeleton(), "Advanced.CheckShowCollisionSkeleton"); + addMenu(new LLAdvancedToggleDisplayAgentTarget(), "Advanced.ToggleDisplayAgentTarget"); + addMenu(new LLAdvancedCheckDisplayAgentTarget(), "Advanced.CheckDisplayAgentTarget"); + addMenu(new LLAdvancedToggleDebugAvatarRotation(), "Advanced.ToggleDebugAvatarRotation"); + addMenu(new LLAdvancedCheckDebugAvatarRotation(), "Advanced.CheckDebugAvatarRotation"); + addMenu(new LLAdvancedDumpAttachments(), "Advanced.DumpAttachments"); + addMenu(new LLAdvancedRebakeTextures(), "Advanced.RebakeTextures"); + addMenu(new LLAdvancedDebugAvatarTextures(), "Advanced.DebugAvatarTextures"); + addMenu(new LLAdvancedDumpAvatarLocalTextures(), "Advanced.DumpAvatarLocalTextures"); + + // Advanced > Network + addMenu(new LLAdvancedEnableMessageLog(), "Advanced.EnableMessageLog"); + addMenu(new LLAdvancedDisableMessageLog(), "Advanced.DisableMessageLog"); + addMenu(new LLAdvancedDropPacket(), "Advanced.DropPacket"); + + // Advanced > Recorder + addMenu(new LLAdvancedFrameStatsLogging(), "Advanced.FrameStatsLogging"); + addMenu(new LLAdvancedAgentPilot(), "Advanced.AgentPilot"); + addMenu(new LLAdvancedToggleAgentPilotLoop(), "Advanced.ToggleAgentPilotLoop"); + addMenu(new LLAdvancedCheckAgentPilotLoop(), "Advanced.CheckAgentPilotLoop"); + + // Advanced (toplevel) + addMenu(new LLAdvancedToggleShowObjectUpdates(), "Advanced.ToggleShowObjectUpdates"); + addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates"); + addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage"); + addMenu(new LLAdvancedToggleClothingFloater(), "Advanced.ToggleClothingFloater"); + addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings"); + addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions"); + addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions"); + addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus"); + addMenu(new LLAdvancedLeaveAdminStatus(), "Advanced.LeaveAdminStatus"); } -- cgit v1.1 From 3282c5ff73176cb9fe8a8be6a372790516237448 Mon Sep 17 00:00:00 2001 From: Michelle2 Zenovka Date: Sat, 20 Sep 2008 13:16:14 -0500 Subject: VWR-5082: 'Set permissions on selected task inventory' feature. --- linden/indra/newview/llviewermenu.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'linden/indra/newview/llviewermenu.cpp') diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 3e99384..1ec71ac 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp @@ -86,6 +86,7 @@ #include "llfloateravatarinfo.h" #include "llfloateravatartextures.h" #include "llfloaterbuildoptions.h" +#include "llfloaterbulkpermission.h" #include "llfloaterbump.h" #include "llfloaterbuy.h" #include "llfloaterbuycontents.h" @@ -6239,6 +6240,17 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& noscriptmsg, cons } } +class LLToolsSetBulkPerms : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLFloaterBulkPermission* queue = NULL; + queue = LLFloaterBulkPermission::create(); + return true; + } +}; + + class LLToolsSelectedScriptAction : public view_listener_t { bool handleEvent(LLPointer event, const LLSD& userdata) @@ -7827,6 +7839,7 @@ void initialize_menus() addMenu(new LLToolsSaveToInventory(), "Tools.SaveToInventory"); addMenu(new LLToolsSaveToObjectInventory(), "Tools.SaveToObjectInventory"); addMenu(new LLToolsSelectedScriptAction(), "Tools.SelectedScriptAction"); + addMenu(new LLToolsSetBulkPerms(), "Tools.SetBulkPerms"); addMenu(new LLToolsEnableToolNotPie(), "Tools.EnableToolNotPie"); addMenu(new LLToolsEnableLink(), "Tools.EnableLink"); -- cgit v1.1