Add Script Info menu entry to the self pie menu...
From the comments in llfloaterscriptlimits.cpp, it seems like this was intended to be a feature.
This commit is contained in:
@@ -149,6 +149,7 @@
|
||||
#include "llfloaterregioninfo.h"
|
||||
#include "llfloaterreporter.h"
|
||||
#include "llfloaterscriptdebug.h"
|
||||
#include "llfloaterscriptlimits.h"
|
||||
#include "llfloatersettingsdebug.h"
|
||||
|
||||
#include "llfloaterenvsettings.h"
|
||||
@@ -2553,6 +2554,16 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class LLSelfVisibleScriptInfo : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
if (LLViewerRegion* region = gAgent.getRegion())
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(!region->getCapability("AttachmentResources").empty());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
BOOL enable_has_attachments(void*)
|
||||
{
|
||||
|
||||
@@ -6671,6 +6682,10 @@ class LLShowFloater : public view_listener_t
|
||||
{
|
||||
LLFloaterScriptDebug::show(LLUUID::null);
|
||||
}
|
||||
else if (floater_name == "script info")
|
||||
{
|
||||
LLFloaterScriptLimits::showInstance();
|
||||
}
|
||||
else if (floater_name == "help f1")
|
||||
{
|
||||
llinfos << "Spawning HTML help window" << llendl;
|
||||
@@ -9606,6 +9621,7 @@ void initialize_menus()
|
||||
|
||||
addMenu(new LLSelfEnableSitOrStand(), "Self.EnableSitOrStand");
|
||||
addMenu(new LLSelfEnableRemoveAllAttachments(), "Self.EnableRemoveAllAttachments");
|
||||
addMenu(new LLSelfVisibleScriptInfo(), "Self.VisibleScriptInfo");
|
||||
|
||||
// Avatar pie menu
|
||||
|
||||
|
||||
@@ -97,6 +97,10 @@
|
||||
<on_click function="Object.ScriptCount" />
|
||||
<on_visible function="Object.VisibleScriptCount" />
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Script Info" mouse_opaque="true" name="Script Info">
|
||||
<on_click function="ShowFloater" userdata="script info" />
|
||||
<on_visible function="Self.VisibleScriptInfo" />
|
||||
</menu_item_call>
|
||||
<menu_item_call enabled="true" label="Debug..." mouse_opaque="true" name="Debug Layers">
|
||||
<on_click function="Avatar.Debug" />
|
||||
</menu_item_call>
|
||||
|
||||
Reference in New Issue
Block a user