Skip to content
Snippets Groups Projects
Commit 0a60b2eb authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Add simfeature debug view

parent 22985813
No related branches found
No related tags found
No related merge requests found
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
// library // library
#include "llclipboard.h" #include "llclipboard.h"
#include "llfloaterreg.h" #include "llfloaterreg.h"
#include "llsdserialize.h"
#include "lltrans.h"
#include "llview.h" #include "llview.h"
// newview // newview
...@@ -301,6 +303,20 @@ namespace ...@@ -301,6 +303,20 @@ namespace
} }
} }
void spawn_debug_simfeatures()
{
if (LLViewerRegion* regionp = gAgent.getRegion())
{
LLSD sim_features, args;
std::stringstream features_str;
regionp->getSimulatorFeatures(sim_features);
LLSDSerialize::toPrettyXML(sim_features, features_str);
args["title"] = llformat("%s - %s", LLTrans::getString("SimulatorFeaturesTitle").c_str(), regionp->getName().c_str());
args["data"] = features_str.str();
LLFloaterReg::showInstance("generic_text", args);
}
}
} }
//////////////////////////////////////////////////////// ////////////////////////////////////////////////////////
...@@ -318,6 +334,8 @@ void ALViewerMenu::initialize_menus() ...@@ -318,6 +334,8 @@ void ALViewerMenu::initialize_menus()
commit.add("Avatar.ManageEstate", [](LLUICtrl* ctrl, const LLSD& param) { manage_estate(param); }); commit.add("Avatar.ManageEstate", [](LLUICtrl* ctrl, const LLSD& param) { manage_estate(param); });
commit.add("Avatar.TeleportTo", [](LLUICtrl* ctrl, const LLSD& param) { teleport_to(); }); commit.add("Avatar.TeleportTo", [](LLUICtrl* ctrl, const LLSD& param) { teleport_to(); });
commit.add("Advanced.DebugSimFeatures", [](LLUICtrl* ctrl, const LLSD& param) { spawn_debug_simfeatures(); });
commit.add("Object.CopyID", [](LLUICtrl* ctrl, const LLSD& param) { object_copy_key(); }); commit.add("Object.CopyID", [](LLUICtrl* ctrl, const LLSD& param) { object_copy_key(); });
commit.add("Object.EditParticles", [](LLUICtrl* ctrl, const LLSD& param) { edit_particle_source(); }); commit.add("Object.EditParticles", [](LLUICtrl* ctrl, const LLSD& param) { edit_particle_source(); });
commit.add("Object.AlchemyExplode", [](LLUICtrl* ctrl, const LLSD& param) { object_explode(); }); commit.add("Object.AlchemyExplode", [](LLUICtrl* ctrl, const LLSD& param) { object_explode(); });
......
...@@ -2838,6 +2838,12 @@ function="World.EnvPreset" ...@@ -2838,6 +2838,12 @@ function="World.EnvPreset"
function="Advanced.DumpInfoToConsole" function="Advanced.DumpInfoToConsole"
parameter="capabilities" /> parameter="capabilities" />
</menu_item_call> </menu_item_call>
<menu_item_call
label="View Simulator Features"
name="View Simulator Features">
<menu_item_call.on_click
function="Advanced.DebugSimFeatures" />
</menu_item_call>
<menu_item_separator/> <menu_item_separator/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment