Update administrative tools code from upstream

Updates LLFloaterTopObjects code to have parcel filter(STAT_FILTER_BY_PARCEL_NAME) and use the CallbackRegistrar
Top Objects XML (and Translation) bits updated in part from Firestorm, as LL Viewer lacks certain buttons and the old xml was too far behind
- Translators may want to have a look at this... although you sorta need to have estate powers for it to be of any worth... *sigh*
Updates LLFloaterGodTools to use CallbackRegistrar
This commit is contained in:
Lirusaito
2013-07-13 16:38:20 -04:00
parent cf2f455430
commit ffe403e0f0
12 changed files with 942 additions and 718 deletions

View File

@@ -63,6 +63,7 @@ enum LAND_STAT_FLAGS
STAT_FILTER_BY_PARCEL = 0x00000001,
STAT_FILTER_BY_OWNER = 0x00000002,
STAT_FILTER_BY_OBJECT = 0x00000004,
STAT_FILTER_BY_PARCEL_NAME = 0x00000008,
STAT_REQUEST_LAST_ENTRY = 0x80000000,
};

View File

@@ -62,7 +62,6 @@
#include "llviewerwindow.h"
#include "llworld.h"
#include "llfloateravatarpicker.h"
#include "llnotify.h"
#include "llxfermanager.h"
#include "llvlcomposition.h"
#include "llsurface.h"
@@ -77,9 +76,9 @@
const F32 SECONDS_BETWEEN_UPDATE_REQUESTS = 5.0f;
// *****************************************************************************
//*****************************************************************************
// LLFloaterGodTools
// *****************************************************************************
//*****************************************************************************
void LLFloaterGodTools::onOpen()
{
@@ -100,6 +99,7 @@ void LLFloaterGodTools::onOpen()
}
}
// static
void LLFloaterGodTools::refreshAll()
{
@@ -121,36 +121,31 @@ LLFloaterGodTools::LLFloaterGodTools()
mCurrentHost(LLHost::invalid),
mUpdateTimer()
{
LLCallbackMap::map_t factory_map;
factory_map["grid"] = LLCallbackMap(createPanelGrid, this);
factory_map["region"] = LLCallbackMap(createPanelRegion, this);
factory_map["objects"] = LLCallbackMap(createPanelObjects, this);
factory_map["request"] = LLCallbackMap(createPanelRequest, this);
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml", &factory_map);
mFactoryMap["grid"] = LLCallbackMap(createPanelGrid, this);
mFactoryMap["region"] = LLCallbackMap(createPanelRegion, this);
mFactoryMap["objects"] = LLCallbackMap(createPanelObjects, this);
mFactoryMap["request"] = LLCallbackMap(createPanelRequest, this);
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_god_tools.xml", &getFactoryMap());
}
BOOL LLFloaterGodTools::postBuild()
{
getChild<LLTabContainer>("GodTools Tabs")->setCommitCallback(boost::bind(&LLFloaterGodTools::onTabChanged,_1,_2));
sendRegionInfoRequest();
getChild<LLTabContainer>("GodTools Tabs")->selectTabByName("region");
childSetTextArg("land cost text", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
getChild<LLUICtrl>("land cost text")->setTextArg("[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
return TRUE;
}
// static
void* LLFloaterGodTools::createPanelGrid(void *userdata)
{
return new LLPanelGridTools("grid");
return new LLPanelGridTools();
}
// static
void* LLFloaterGodTools::createPanelRegion(void *userdata)
{
LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
self->mPanelRegionTools = new LLPanelRegionTools("region");
self->mPanelRegionTools = new LLPanelRegionTools();
return self->mPanelRegionTools;
}
@@ -158,14 +153,14 @@ void* LLFloaterGodTools::createPanelRegion(void *userdata)
void* LLFloaterGodTools::createPanelObjects(void *userdata)
{
LLFloaterGodTools* self = (LLFloaterGodTools*)userdata;
self->mPanelObjectTools = new LLPanelObjectTools("objects");
self->mPanelObjectTools = new LLPanelObjectTools();
return self->mPanelObjectTools;
}
// static
void* LLFloaterGodTools::createPanelRequest(void *userdata)
{
return new LLPanelRequestTools("region");
return new LLPanelRequestTools();
}
LLFloaterGodTools::~LLFloaterGodTools()
@@ -226,14 +221,6 @@ void LLFloaterGodTools::showPanel(const std::string& panel_name)
panel->setFocus(TRUE);
}
//static
void LLFloaterGodTools::onTabChanged(LLUICtrl* ctrl, const LLSD& param)
{
LLPanel* panel = (LLPanel*)ctrl->getChildView(param.asString(),false,false);
if (panel)
panel->setFocus(TRUE);
}
// static
void LLFloaterGodTools::processRegionInfo(LLMessageSystem* msg)
{
@@ -403,9 +390,9 @@ void LLFloaterGodTools::sendGodUpdateRegionInfo()
}
}
// *****************************************************************************
//*****************************************************************************
// LLPanelRegionTools
// *****************************************************************************
//*****************************************************************************
// || Region |______________________________________
@@ -440,72 +427,37 @@ const F32 PRICE_PER_METER_MIN = 0.f;
const F32 PRICE_PER_METER_MAX = 100.f;
LLPanelRegionTools::LLPanelRegionTools(const std::string& title)
: LLPanel(title)
LLPanelRegionTools::LLPanelRegionTools()
: LLPanel()
{
mCommitCallbackRegistrar.add("RegionTools.ChangeAnything", boost::bind(&LLPanelRegionTools::onChangeAnything, this));
mCommitCallbackRegistrar.add("RegionTools.ChangePrelude", boost::bind(&LLPanelRegionTools::onChangePrelude, this));
mCommitCallbackRegistrar.add("RegionTools.BakeTerrain", boost::bind(&LLPanelRegionTools::onBakeTerrain, this));
mCommitCallbackRegistrar.add("RegionTools.RevertTerrain", boost::bind(&LLPanelRegionTools::onRevertTerrain, this));
mCommitCallbackRegistrar.add("RegionTools.SwapTerrain", boost::bind(&LLPanelRegionTools::onSwapTerrain, this));
mCommitCallbackRegistrar.add("RegionTools.Refresh", boost::bind(&LLPanelRegionTools::onRefresh, this));
mCommitCallbackRegistrar.add("RegionTools.ApplyChanges", boost::bind(&LLPanelRegionTools::onApplyChanges, this));
mCommitCallbackRegistrar.add("RegionTools.SelectRegion", boost::bind(&LLPanelRegionTools::onSelectRegion, this));
mCommitCallbackRegistrar.add("RegionTools.SaveState", boost::bind(&LLPanelRegionTools::onSaveState, this));
}
BOOL LLPanelRegionTools::postBuild()
{
LLLineEditor* region_name = getChild<LLLineEditor>("region name");
region_name->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
region_name->setKeystrokeCallback(boost::bind(&LLPanelRegionTools::onChangeSimName, this));
region_name->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe);
getChild<LLLineEditor>("region name")->setKeystrokeCallback(boost::bind(&LLPanelRegionTools::onChangeSimName, this));
getChild<LLLineEditor>("region name")->setPrevalidate(&LLLineEditor::prevalidatePrintableNotPipe);
getChild<LLLineEditor>("estate")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChild<LLLineEditor>("parentestate")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChildView("parentestate")->setEnabled(FALSE);
getChild<LLLineEditor>("gridposx")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChildView("gridposx")->setEnabled(FALSE);
getChild<LLLineEditor>("gridposy")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChildView("gridposy")->setEnabled(FALSE);
getChild<LLLineEditor>("redirectx")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChild<LLLineEditor>("redirecty")->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChild<LLUICtrl>("check prelude")->setCommitCallback(boost::bind(&LLPanelRegionTools:: onChangePrelude, this));
getChild<LLUICtrl>("check fixed sun")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("check reset home")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("check visible")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("check damage")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("block dwell")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("block terraform")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("allow transfer")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("is sandbox")->setCommitCallback( boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("is gaming")->setVisible((gAgent.getRegion()->getGamingFlags() & REGION_GAMING_PRESENT) && !(gAgent.getRegion()->getGamingFlags() & REGION_GAMING_HIDE_GOD_FLOATER));
getChild<LLUICtrl>("is gaming")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("hide from search")->setVisible(!gHippoGridManager->getConnectedGrid()->isSecondLife());
getChild<LLUICtrl>("hide from search")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
childSetAction("Bake Terrain", boost::bind(&LLPanelRegionTools::onBakeTerrain, this));
childSetAction("Revert Terrain", boost::bind(&LLPanelRegionTools::onRevertTerrain, this));
childSetAction("Swap Terrain", boost::bind(&LLPanelRegionTools::onSwapTerrain, this));
LLLineEditor* estate = getChild<LLLineEditor>("estate name");
estate->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
estate->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
LLLineEditor* parentestate = getChild<LLLineEditor>("parentestate");
parentestate->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
parentestate->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
parentestate->setEnabled(false);
LLLineEditor* gridposx = getChild<LLLineEditor>("gridposx");
gridposx->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
gridposx->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
gridposx->setEnabled(false);
LLLineEditor* gridposy = getChild<LLLineEditor>("gridposy");
gridposy->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
gridposy->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
gridposy->setEnabled(false);
LLLineEditor* redirectx = getChild<LLLineEditor>("redirectx");
redirectx->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
redirectx->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
LLLineEditor* redirecty = getChild<LLLineEditor>("redirecty");
redirecty->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
redirecty->setPrevalidate(&LLLineEditor::prevalidatePositiveS32);
getChild<LLUICtrl>("billable factor")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLUICtrl>("land cost")->setCommitCallback(boost::bind(&LLPanelRegionTools::onChangeAnything, this));
getChild<LLButton>("Refresh")->setClickedCallback(boost::bind(&LLPanelRegionTools::onRefresh, this));
getChild<LLButton>("Apply")->setClickedCallback(boost::bind(&LLPanelRegionTools::onApplyChanges, this));
getChild<LLButton>("Select Region")->setClickedCallback(boost::bind(&LLPanelRegionTools::onSelectRegion, this));
getChild<LLButton>("Autosave now")->setClickedCallback(boost::bind(&LLPanelRegionTools::onSaveState,(void*)NULL));
return TRUE;
}
@@ -592,8 +544,7 @@ void LLPanelRegionTools::enableAllWidgets()
getChildView("Autosave now")->setEnabled(TRUE);
}
//static
void LLPanelRegionTools::onSaveState(void*)
void LLPanelRegionTools::onSaveState(void* userdata)
{
if (gAgent.isGodlike())
{
@@ -918,12 +869,13 @@ void LLPanelRegionTools::onSelectRegion()
// LEFT R2 RIGHT
const F32 HOURS_TO_RADIANS = (2.f*F_PI)/24.f;
const char FLOATER_GRID_ADMIN_TITLE[] = "Grid Administration";
LLPanelGridTools::LLPanelGridTools(const std::string& name) :
LLPanel(name)
LLPanelGridTools::LLPanelGridTools() :
LLPanel()
{
mCommitCallbackRegistrar.add("GridTools.KickAllUsers", boost::bind(&LLPanelGridTools::onClickKickAll, this));
mCommitCallbackRegistrar.add("GridTools.FlushMapVisibilityCaches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
}
// Destroys the object
@@ -933,9 +885,6 @@ LLPanelGridTools::~LLPanelGridTools()
BOOL LLPanelGridTools::postBuild()
{
childSetAction("Kick all users", boost::bind(&LLPanelGridTools::onClickKickAll, this));
childSetAction("Flush This Region's Map Visibility Caches", boost::bind(&LLPanelGridTools::onClickFlushMapVisibilityCaches, this));
return TRUE;
}
@@ -943,7 +892,6 @@ void LLPanelGridTools::refresh()
{
}
void LLPanelGridTools::onClickKickAll()
{
LLNotificationsUtil::add("KickAllUsers", LLSD(), LLSD(), LLPanelGridTools::confirmKick);
@@ -952,7 +900,7 @@ void LLPanelGridTools::onClickKickAll()
// static
bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& response)
{
if (LLNotification::getSelectedOption(notification, response) == 0)
if (LLNotificationsUtil::getSelectedOption(notification, response) == 0)
{
LLSD payload;
payload["kick_message"] = response["message"].asString();
@@ -964,7 +912,7 @@ bool LLPanelGridTools::confirmKick(const LLSD& notification, const LLSD& respons
// static
bool LLPanelGridTools::finishKick(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotification::getSelectedOption(notification, response);
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option == 0)
{
@@ -1036,10 +984,19 @@ bool LLPanelGridTools::flushMapVisibilityCachesConfirm(const LLSD& notification,
// LEFT RIGHT
// Default constructor
LLPanelObjectTools::LLPanelObjectTools(const std::string& title)
: LLPanel(title),
LLPanelObjectTools::LLPanelObjectTools()
: LLPanel(),
mTargetAvatar()
{
mCommitCallbackRegistrar.add("ObjectTools.ChangeAnything", boost::bind(&LLPanelObjectTools::onChangeAnything, this));
mCommitCallbackRegistrar.add("ObjectTools.DeletePublicOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeletePublicOwnedBy, this));
mCommitCallbackRegistrar.add("ObjectTools.DeleteAllScriptedOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy, this));
mCommitCallbackRegistrar.add("ObjectTools.DeleteAllOwnedBy", boost::bind(&LLPanelObjectTools::onClickDeleteAllOwnedBy, this));
mCommitCallbackRegistrar.add("ObjectTools.ApplyChanges", boost::bind(&LLPanelObjectTools::onApplyChanges, this));
mCommitCallbackRegistrar.add("ObjectTools.Set", boost::bind(&LLPanelObjectTools::onClickSet, this));
mCommitCallbackRegistrar.add("ObjectTools.GetTopColliders", boost::bind(&LLPanelObjectTools::onGetTopColliders, this));
mCommitCallbackRegistrar.add("ObjectTools.GetTopScripts", boost::bind(&LLPanelObjectTools::onGetTopScripts, this));
mCommitCallbackRegistrar.add("ObjectTools.GetScriptDigest", boost::bind(&LLPanelObjectTools::onGetScriptDigest, this));
}
// Destroys the object
@@ -1050,22 +1007,6 @@ LLPanelObjectTools::~LLPanelObjectTools()
BOOL LLPanelObjectTools::postBuild()
{
getChild<LLUICtrl>("disable scripts")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
getChild<LLUICtrl>("disable collisions")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
getChild<LLUICtrl>("disable physics")->setCommitCallback(boost::bind(&LLPanelObjectTools::onChangeAnything, this));
childSetAction("Apply", boost::bind(&LLPanelObjectTools::onApplyChanges, this));
childSetAction("Set Target", boost::bind(&LLPanelObjectTools::onClickSet, this));
childSetAction("Delete Target's Scripted Objects On Others Land", boost::bind(&LLPanelObjectTools::onClickDeletePublicOwnedBy, this));
childSetAction("Delete Target's Scripted Objects On *Any* Land", boost::bind(&LLPanelObjectTools::onClickDeleteAllScriptedOwnedBy, this));
childSetAction("Delete *ALL* Of Target's Objects", boost::bind(&LLPanelObjectTools::onClickDeleteAllOwnedBy, this));
childSetAction("Get Top Colliders", boost::bind(&LLPanelObjectTools::onGetTopColliders, this));
childSetAction("Get Top Scripts", boost::bind(&LLPanelObjectTools::onGetTopScripts, this));
childSetAction("Scripts digest", boost::bind(&LLPanelObjectTools::onGetScriptDigest, this));
refresh();
return TRUE;
}
@@ -1154,29 +1095,30 @@ void LLPanelObjectTools::enableAllWidgets()
getChildView("Get Top Scripts")->setEnabled(TRUE);
}
void LLPanelObjectTools::onGetTopColliders()
{
LLFloaterGodTools* god_tools = LLFloaterGodTools::instanceExists() ? LLFloaterGodTools::getInstance() : NULL;
if(!god_tools)
return;
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
if(!instance) return;
if (gAgent.isGodlike())
{
LLFloaterTopObjects::show();
instance->open();
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_COLLIDERS);
LLFloaterTopObjects::onRefresh(NULL);
instance->onRefresh();
}
}
void LLPanelObjectTools::onGetTopScripts()
{
LLFloaterGodTools* god_tools = LLFloaterGodTools::instanceExists() ? LLFloaterGodTools::getInstance() : NULL;
if(!god_tools)
return;
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
if(!instance) return;
if (gAgent.isGodlike())
{
LLFloaterTopObjects::show();
instance->open();
LLFloaterTopObjects::setMode(STAT_REPORT_TOP_SCRIPTS);
LLFloaterTopObjects::onRefresh(NULL);
instance->onRefresh();
}
}
@@ -1282,7 +1224,7 @@ void LLPanelObjectTools::onClickSetBySelection(void* data)
LLPanelObjectTools* panelp = (LLPanelObjectTools*) data;
if (!panelp) return;
const BOOL non_root_ok = TRUE;
const BOOL non_root_ok = TRUE;
LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok);
if (!node) return;
@@ -1336,9 +1278,10 @@ void LLPanelObjectTools::onApplyChanges()
const std::string SELECTION = "Selection";
const std::string AGENT_REGION = "Agent Region";
LLPanelRequestTools::LLPanelRequestTools(const std::string& name):
LLPanel(name)
LLPanelRequestTools::LLPanelRequestTools():
LLPanel()
{
mCommitCallbackRegistrar.add("GodTools.Request", boost::bind(&LLPanelRequestTools::onClickRequest, this));
}
LLPanelRequestTools::~LLPanelRequestTools()
@@ -1347,8 +1290,6 @@ LLPanelRequestTools::~LLPanelRequestTools()
BOOL LLPanelRequestTools::postBuild()
{
childSetAction("Make Request", boost::bind(&LLPanelRequestTools::onClickRequest, this));
refresh();
return TRUE;

View File

@@ -52,7 +52,7 @@ class LLTextBox;
class LLMessageSystem;
class LLFloaterGodTools
: public LLFloater, public LLSingleton<LLFloaterGodTools>
: public LLFloater, public LLSingleton<LLFloaterGodTools>
{
public:
@@ -94,8 +94,6 @@ public:
// Send possibly changed values to simulator.
void sendGodUpdateRegionInfo();
static void onTabChanged(LLUICtrl* ctrl, const LLSD& param);
public:
LLFloaterGodTools();
@@ -128,14 +126,14 @@ class LLPanelRegionTools
: public LLPanel
{
public:
LLPanelRegionTools(const std::string& name);
LLPanelRegionTools();
/*virtual*/ ~LLPanelRegionTools();
BOOL postBuild();
/*virtual*/ void refresh();
static void onSaveState(void*);
static void onSaveState(void* userdata);
void onChangeSimName();
void onChangeAnything();
@@ -190,7 +188,7 @@ class LLPanelGridTools
: public LLPanel
{
public:
LLPanelGridTools(const std::string& name);
LLPanelGridTools();
virtual ~LLPanelGridTools();
BOOL postBuild();
@@ -217,7 +215,7 @@ class LLPanelObjectTools
: public LLPanel
{
public:
LLPanelObjectTools(const std::string& name);
LLPanelObjectTools();
/*virtual*/ ~LLPanelObjectTools();
BOOL postBuild();
@@ -258,7 +256,7 @@ protected:
class LLPanelRequestTools : public LLPanel
{
public:
LLPanelRequestTools(const std::string& name);
LLPanelRequestTools();
/*virtual*/ ~LLPanelRequestTools();
BOOL postBuild();

View File

@@ -1081,8 +1081,10 @@ void LLPanelRegionDebugInfo::onClickTopColliders(void* data)
strings_t strings;
strings.push_back("1"); // one physics step
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
LLFloaterTopObjects::show();
LLFloaterTopObjects::clearList();
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
if(!instance) return;
instance->open();
instance->clearList();
self->sendEstateOwnerMessage(gMessageSystem, "colliders", invoice, strings);
}
@@ -1093,8 +1095,10 @@ void LLPanelRegionDebugInfo::onClickTopScripts(void* data)
strings_t strings;
strings.push_back("6"); // top 5 scripts
LLUUID invoice(LLFloaterRegionInfo::getLastInvoice());
LLFloaterTopObjects::show();
LLFloaterTopObjects::clearList();
LLFloaterTopObjects* instance = LLFloaterTopObjects::getInstance();
if(!instance) return;
instance->open();
instance->clearList();
self->sendEstateOwnerMessage(gMessageSystem, "scripts", invoice, strings);
}

View File

@@ -34,11 +34,11 @@
#include "llfloatertopobjects.h"
// library includes
#include "message.h"
#include "llfontgl.h"
#include "llagent.h"
#include "llavataractions.h"
#include "llbutton.h"
#include "llfloatergodtools.h"
#include "llnotificationsutil.h"
@@ -56,13 +56,13 @@
#include "llagentcamera.h"
#include "llviewerobjectlist.h"
void cmdline_printchat(std::string message);
#include "llavataractions.h"
LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
//LLFloaterTopObjects* LLFloaterTopObjects::sInstance = NULL;
// Globals
// const U32 TIME_STR_LENGTH = 30;
/*
// static
void LLFloaterTopObjects::show()
{
@@ -73,89 +73,76 @@ void LLFloaterTopObjects::show()
}
sInstance = new LLFloaterTopObjects();
LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_top_objects.xml");
sInstance->center();
}
*/
LLFloaterTopObjects::LLFloaterTopObjects()
: LLFloater(std::string("top_objects")),
mInitialized(FALSE),
mtotalScore(0.f)
{
sInstance = this;
mCommitCallbackRegistrar.add("TopObjects.ShowBeacon", boost::bind(&LLFloaterTopObjects::onClickShowBeacon, this));
mCommitCallbackRegistrar.add("TopObjects.ReturnSelected", boost::bind(&LLFloaterTopObjects::onReturnSelected, this));
mCommitCallbackRegistrar.add("TopObjects.ReturnAll", boost::bind(&LLFloaterTopObjects::onReturnAll, this));
mCommitCallbackRegistrar.add("TopObjects.DisableSelected", boost::bind(&LLFloaterTopObjects::onDisableSelected, this));
mCommitCallbackRegistrar.add("TopObjects.DisableAll", boost::bind(&LLFloaterTopObjects::onDisableAll, this));
mCommitCallbackRegistrar.add("TopObjects.Refresh", boost::bind(&LLFloaterTopObjects::onRefresh, this));
mCommitCallbackRegistrar.add("TopObjects.GetByObjectName", boost::bind(&LLFloaterTopObjects::onGetByObjectName, this));
mCommitCallbackRegistrar.add("TopObjects.GetByOwnerName", boost::bind(&LLFloaterTopObjects::onGetByOwnerName, this));
mCommitCallbackRegistrar.add("TopObjects.GetByParcelName", boost::bind(&LLFloaterTopObjects::onGetByParcelName, this));
mCommitCallbackRegistrar.add("TopObjects.CommitObjectsList",boost::bind(&LLFloaterTopObjects::onCommitObjectsList, this));
mCommitCallbackRegistrar.add("TopObjects.TeleportToObject", boost::bind(&LLFloaterTopObjects::onTeleportToObject, this));
mCommitCallbackRegistrar.add("TopObjects.Kick", boost::bind(&LLFloaterTopObjects::onKick, this));
mCommitCallbackRegistrar.add("TopObjects.Profile", boost::bind(&LLFloaterTopObjects::onProfile, this));
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_top_objects.xml");
}
LLFloaterTopObjects::~LLFloaterTopObjects()
{
sInstance = NULL;
}
// virtual
BOOL LLFloaterTopObjects::postBuild()
{
LLScrollListCtrl *objects_list = getChild<LLScrollListCtrl>("objects_list");
if (objects_list)
{
objects_list->setCommitCallback(boost::bind(&LLFloaterTopObjects::onCommitObjectsList,_1,this));
objects_list->setDoubleClickCallback(boost::bind(&LLFloaterTopObjects::onDoubleClickObjectsList,this));
objects_list->setFocus(true);
objects_list->setCommitOnSelectionChange(TRUE);
}
getChild<LLUICtrl>("objects_list")->setFocus(TRUE);
objects_list->setDoubleClickCallback(onDoubleClickObjectsList, this);
objects_list->setCommitOnSelectionChange(TRUE);
childSetAction("show_beacon_btn", onClickShowBeacon, this);
setDefaultBtn("show_beacon_btn");
childSetAction("return_selected_btn", onReturnSelected, this);
childSetAction("return_all_btn", onReturnAll, this);
childSetAction("disable_selected_btn", onDisableSelected, this);
childSetAction("disable_all_btn", onDisableAll, this);
childSetAction("refresh_btn", onRefresh, this);
childSetAction("lagwarning", onLagWarningBtn, this);
childSetAction("profile", onProfileBtn, this);
childSetAction("kick", onKickBtn, this);
childSetAction("tpto", onTPBtn, this);
childSetAction("filter_object_btn", onGetByObjectNameClicked, this);
childSetAction("filter_owner_btn", onGetByOwnerNameClicked, this);
/*
LLLineEditor* line_editor = getChild<LLLineEditor>("owner_name_editor");
if (line_editor)
{
line_editor->setCommitOnFocusLost(FALSE);
line_editor->setCommitCallback(onGetByOwnerName, this);
}
line_editor = getChild<LLLineEditor>("object_name_editor");
if (line_editor)
{
line_editor->setCommitOnFocusLost(FALSE);
line_editor->setCommitCallback(onGetByObjectName, this);
}*/
mCurrentMode = STAT_REPORT_TOP_SCRIPTS;
mFlags = 0;
mFilter.clear();
center();
return TRUE;
}
// static
void LLFloaterTopObjects::setMode(U32 mode)
{
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
if(!instance) return;
instance->mCurrentMode = mode;
}
// static
void LLFloaterTopObjects::handle_land_reply(LLMessageSystem* msg, void** data)
{
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
if(!instance) return;
// Make sure dialog is on screen
show();
sInstance->handleReply(msg, data);
instance->open();
instance->handleReply(msg, data);
//HACK: for some reason sometimes top scripts originally comes back
//with no results even though they're there
if (!sInstance->mObjectListIDs.size() && !sInstance->mInitialized)
if (!instance->mObjectListIDs.size() && !instance->mInitialized)
{
sInstance->onRefresh(NULL);
sInstance->mInitialized = TRUE;
instance->onRefresh();
instance->mInitialized = TRUE;
}
}
@@ -170,7 +157,7 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
msg->getU32Fast(_PREHASH_RequestData, _PREHASH_ReportType, mCurrentMode);
LLScrollListCtrl *list = getChild<LLScrollListCtrl>("objects_list");
S32 block_count = msg->getNumberOfBlocks("ReportData");
for (S32 block = 0; block < block_count; ++block)
{
@@ -181,9 +168,11 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
F32 score;
std::string name_buf;
std::string owner_buf;
std::string parcel_buf("unknown");
F32 mono_score = 0.f;
bool have_extended_data = false;
S32 public_urls = 0;
F32 script_memory = 0.f;
msg->getU32Fast(_PREHASH_ReportData, _PREHASH_TaskLocalID, task_local_id, block);
msg->getUUIDFast(_PREHASH_ReportData, _PREHASH_TaskID, task_id, block);
@@ -193,12 +182,18 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
msg->getF32Fast(_PREHASH_ReportData, _PREHASH_Score, score, block);
msg->getStringFast(_PREHASH_ReportData, _PREHASH_TaskName, name_buf, block);
msg->getStringFast(_PREHASH_ReportData, _PREHASH_OwnerName, owner_buf, block);
if(msg->has("DataExtended"))
{
have_extended_data = true;
msg->getU32("DataExtended", "TimeStamp", time_stamp, block);
msg->getF32("DataExtended", "MonoScore", mono_score, block);
msg->getS32(_PREHASH_ReportData,"PublicURLs",public_urls,block);
msg->getS32("DataExtended", "PublicURLs", public_urls, block);
if (msg->getSize("DataExtended", "ParcelName") > 0)
{
msg->getString("DataExtended", "ParcelName", parcel_buf, block);
msg->getF32("DataExtended", "Size", script_memory, block);
}
}
LLSD element;
@@ -206,39 +201,49 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
element["id"] = task_id;
element["object_name"] = name_buf;
element["owner_name"] = owner_buf;
element["columns"][0]["column"] = "score";
element["columns"][0]["value"] = llformat("%0.3f", score);
element["columns"][0]["font"] = "SANSSERIF";
LLSD columns;
S32 column_num = 0;
columns[column_num]["column"] = "score";
columns[column_num]["value"] = llformat("%0.3f", score);
columns[column_num++]["font"] = "SANSSERIF";
element["columns"][1]["column"] = "name";
element["columns"][1]["value"] = name_buf;
element["columns"][1]["font"] = "SANSSERIF";
if (name_buf == owner_buf)
columns[column_num]["column"] = "name";
columns[column_num]["value"] = name_buf;
if (name_buf == owner_buf)
{
element["columns"][1]["color"] = LLColor4::red.getValue();
columns[column_num]["color"] = LLColor4::red.getValue();
}
element["columns"][2]["column"] = "owner";
element["columns"][2]["value"] = owner_buf;
element["columns"][2]["font"] = "SANSSERIF";
element["columns"][3]["column"] = "location";
element["columns"][3]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
element["columns"][3]["font"] = "SANSSERIF";
element["columns"][4]["column"] = "time";
element["columns"][4]["value"] = formatted_time((time_t)time_stamp);
element["columns"][4]["font"] = "SANSSERIF";
columns[column_num++]["font"] = "SANSSERIF";
columns[column_num]["column"] = "owner";
columns[column_num]["value"] = owner_buf;
columns[column_num++]["font"] = "SANSSERIF";
columns[column_num]["column"] = "location";
columns[column_num]["value"] = llformat("<%0.1f,%0.1f,%0.1f>", location_x, location_y, location_z);
columns[column_num++]["font"] = "SANSSERIF";
columns[column_num]["column"] = "parcel";
columns[column_num]["value"] = parcel_buf;
columns[column_num++]["font"] = "SANSSERIF";
columns[column_num]["column"] = "time";
columns[column_num]["value"] = formatted_time((time_t)time_stamp);
columns[column_num++]["font"] = "SANSSERIF";
if (mCurrentMode == STAT_REPORT_TOP_SCRIPTS
&& have_extended_data)
{
element["columns"][5]["column"] = "mono_time";
element["columns"][5]["value"] = llformat("%0.3f", mono_score);
element["columns"][5]["font"] = "SANSSERIF";
columns[column_num]["column"] = "memory";
columns[column_num]["value"] = llformat("%0.0f", (script_memory / 1000.f));
columns[column_num++]["font"] = "SANSSERIF";
element["columns"][6]["column"] = "URLs";
element["columns"][6]["value"] = llformat("%d", public_urls);
element["columns"][6]["font"] = "SANSSERIF";
columns[column_num]["column"] = "URLs";
columns[column_num]["value"] = llformat("%d", public_urls);
columns[column_num++]["font"] = "SANSSERIF";
}
element["columns"] = columns;
list->addElement(element);
mObjectListData.append(element);
@@ -260,30 +265,27 @@ void LLFloaterTopObjects::handleReply(LLMessageSystem *msg, void** data)
{
setTitle(getString("top_scripts_title"));
list->setColumnLabel("score", getString("scripts_score_label"));
list->setColumnLabel("mono_time", getString("scripts_mono_time_label"));
LLUIString format = getString("top_scripts_text");
format.setArg("[COUNT]", llformat("%d", total_count));
format.setArg("[TIME]", llformat("%0.1f", mtotalScore));
childSetValue("title_text", LLSD(format));
format.setArg("[TIME]", llformat("%0.3f", mtotalScore));
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
}
else
{
setTitle(getString("top_colliders_title"));
list->setColumnLabel("score", getString("colliders_score_label"));
list->setColumnLabel("mono_time", "");
list->setColumnLabel("URLs", "");
list->setColumnLabel("memory", "");
LLUIString format = getString("top_colliders_text");
format.setArg("[COUNT]", llformat("%d", total_count));
childSetValue("title_text", LLSD(format));
getChild<LLUICtrl>("title_text")->setValue(LLSD(format));
}
}
// static
void LLFloaterTopObjects::onCommitObjectsList(LLUICtrl* ctrl, void* data)
void LLFloaterTopObjects::onCommitObjectsList()
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->updateSelectionInfo();
updateSelectionInfo();
}
void LLFloaterTopObjects::updateSelectionInfo()
@@ -297,9 +299,15 @@ void LLFloaterTopObjects::updateSelectionInfo()
std::string object_id_string = object_id.asString();
childSetValue("id_editor", LLSD(object_id_string));
childSetValue("object_name_editor", list->getFirstSelected()->getColumn(1)->getValue().asString());
childSetValue("owner_name_editor", list->getFirstSelected()->getColumn(2)->getValue().asString());
getChild<LLUICtrl>("id_editor")->setValue(LLSD(object_id_string));
LLScrollListItem* sli = list->getFirstSelected();
llassert(sli);
if (sli)
{
getChild<LLUICtrl>("object_name_editor")->setValue(sli->getColumn(1)->getValue().asString());
getChild<LLUICtrl>("owner_name_editor")->setValue(sli->getColumn(2)->getValue().asString());
getChild<LLUICtrl>("parcel_name_editor")->setValue(sli->getColumn(4)->getValue().asString());
}
}
// static
@@ -307,36 +315,12 @@ void LLFloaterTopObjects::onDoubleClickObjectsList(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->showBeacon();
self->lookAtAvatar();
}
void LLFloaterTopObjects::lookAtAvatar()
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLVOAvatar* voavatar = gObjectList.findAvatar(taskid);
if(voavatar)
{
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
gAgentCamera.changeCameraToThirdPerson();
gAgentCamera.setFocusGlobal(voavatar->getPositionGlobal(),taskid);
gAgentCamera.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal()
+ LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(),
voavatar->getPositionGlobal(),
taskid );
}
}
// static
void LLFloaterTopObjects::onClickShowBeacon(void* data)
void LLFloaterTopObjects::onClickShowBeacon()
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
if (!self) return;
self->showBeacon();
showBeacon();
}
void LLFloaterTopObjects::doToObjects(int action, bool all)
@@ -346,10 +330,10 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
LLViewerRegion* region = gAgent.getRegion();
if (!region) return;
LLCtrlListInterface *list = childGetListInterface("objects_list");
LLCtrlListInterface *list = getChild<LLUICtrl>("objects_list")->getListInterface();
if (!list || list->getItemCount() == 0) return;
std::vector<LLUUID>::iterator id_itor;
uuid_vec_t::iterator id_itor;
bool start_message = true;
@@ -400,194 +384,76 @@ void LLFloaterTopObjects::doToObjects(int action, bool all)
bool LLFloaterTopObjects::callbackReturnAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
if(!instance) return false;
if (option == 0)
{
sInstance->doToObjects(ACTION_RETURN, true);
instance->doToObjects(ACTION_RETURN, true);
}
return false;
}
void LLFloaterTopObjects::onReturnAll(void* data)
void LLFloaterTopObjects::onReturnAll()
{
LLNotificationsUtil::add("ReturnAllTopObjects", LLSD(), LLSD(), &callbackReturnAll);
}
void LLFloaterTopObjects::onReturnSelected(void* data)
void LLFloaterTopObjects::onReturnSelected()
{
sInstance->doToObjects(ACTION_RETURN, false);
doToObjects(ACTION_RETURN, false);
}
void LLFloaterTopObjects::onLagWarningBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onLagWarning(data);
}
void LLFloaterTopObjects::onLagWarning(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
std::string name = first_selected->getColumn(1)->getValue().asString();
std::string score = first_selected->getColumn(0)->getValue().asString();
std::istringstream stm;
stm.str(score);
F32 f_score;
stm >> f_score;
F32 percentage = 100.f * (f_score / 22);
std::string message = llformat(
"Hello %s, you are receiving this automated message because you are wearing heavily scripted attachments/HUDs, "
"causing excessive script lag (%5.2f ms, that's ca. %5.2f%% of the region's resources.)\n\n"
"Please remove resizer scripts or attachments to reduce your script time, thank you.",
name.c_str(),
(F32)f_score,
(F32)percentage
);
std::string my_name;
gAgent.buildFullname(my_name);
cmdline_printchat(llformat("Script time warning sent to %s: (%5.2f ms)",
name.c_str(),(F32)f_score));
send_improved_im(LLUUID(taskid),
my_name,
message,
IM_ONLINE,
IM_NOTHING_SPECIAL,
LLUUID::null,
NO_TIMESTAMP,
(U8*)EMPTY_BINARY_BUCKET,
EMPTY_BINARY_BUCKET_SIZE);
}
void LLFloaterTopObjects::onProfileBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onProfile(data);
}
void LLFloaterTopObjects::onProfile(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLAvatarActions::showProfile(first_selected->getUUID());
}
void LLFloaterTopObjects::onKickBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onKick(data);
}
void LLFloaterTopObjects::onKick(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
LLUUID taskid = first_selected->getUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", "kickestate");
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", taskid.asString().c_str());
msg->sendReliable(gAgent.getRegionHost());
}
void LLFloaterTopObjects::onTPBtn(void* data)
{
LLFloaterTopObjects* self = (LLFloaterTopObjects*)data;
self->onTP(data);
}
void LLFloaterTopObjects::onTP(void* data)
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
std::string name = first_selected->getColumn(1)->getValue().asString();
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
F32 x, y, z;
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
if (matched != 3) return;
LLVector3 pos_agent(x, y, z);
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
gAgent.teleportViaLocation( pos_global );
}
//static
bool LLFloaterTopObjects::callbackDisableAll(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
LLFloaterTopObjects* instance = instanceExists() ? getInstance() : NULL;
if(!instance) return false;
if (option == 0)
{
sInstance->doToObjects(ACTION_DISABLE, true);
instance->doToObjects(ACTION_DISABLE, true);
}
return false;
}
void LLFloaterTopObjects::onDisableAll(void* data)
void LLFloaterTopObjects::onDisableAll()
{
LLNotificationsUtil::add("DisableAllTopObjects", LLSD(), LLSD(), callbackDisableAll);
}
void LLFloaterTopObjects::onDisableSelected(void* data)
void LLFloaterTopObjects::onDisableSelected()
{
sInstance->doToObjects(ACTION_DISABLE, false);
doToObjects(ACTION_DISABLE, false);
}
//static
void LLFloaterTopObjects::clearList()
{
LLCtrlListInterface *list = sInstance->childGetListInterface("objects_list");
LLCtrlListInterface *list = childGetListInterface("objects_list");
if (list)
{
list->operateOnAll(LLCtrlListInterface::OP_DELETE);
}
sInstance->mObjectListData.clear();
sInstance->mObjectListIDs.clear();
sInstance->mtotalScore = 0.f;
mObjectListData.clear();
mObjectListIDs.clear();
mtotalScore = 0.f;
}
//static
void LLFloaterTopObjects::onRefresh(void* data)
void LLFloaterTopObjects::onRefresh()
{
U32 mode = STAT_REPORT_TOP_SCRIPTS;
U32 flags = 0;
std::string filter = "";
if (sInstance)
{
mode = sInstance->mCurrentMode;
flags = sInstance->mFlags;
filter = sInstance->mFilter;
sInstance->clearList();
}
mode = mCurrentMode;
flags = mFlags;
filter = mFilter;
clearList();
LLMessageSystem *msg = gMessageSystem;
msg->newMessageFast(_PREHASH_LandStatRequest);
@@ -602,35 +468,35 @@ void LLFloaterTopObjects::onRefresh(void* data)
msg->sendReliable(gAgent.getRegionHost());
if (sInstance)
{
sInstance->mFilter.clear();
sInstance->mFlags = 0;
}
mFilter.clear();
mFlags = 0;
}
void LLFloaterTopObjects::onGetByObjectName(LLUICtrl* ctrl, void* data)
void LLFloaterTopObjects::onGetByObjectName()
{
if (sInstance)
{
sInstance->mFlags = STAT_FILTER_BY_OBJECT;
sInstance->mFilter = sInstance->childGetText("object_name_editor");
onRefresh(NULL);
}
mFlags = STAT_FILTER_BY_OBJECT;
mFilter = getChild<LLUICtrl>("object_name_editor")->getValue().asString();
onRefresh();
}
void LLFloaterTopObjects::onGetByOwnerName(LLUICtrl* ctrl, void* data)
void LLFloaterTopObjects::onGetByOwnerName()
{
if (sInstance)
{
sInstance->mFlags = STAT_FILTER_BY_OWNER;
sInstance->mFilter = sInstance->childGetText("owner_name_editor");
onRefresh(NULL);
}
mFlags = STAT_FILTER_BY_OWNER;
mFilter = getChild<LLUICtrl>("owner_name_editor")->getValue().asString();
onRefresh();
}
void LLFloaterTopObjects::onGetByParcelName()
{
mFlags = STAT_FILTER_BY_PARCEL_NAME;
mFilter = getChild<LLUICtrl>("parcel_name_editor")->getValue().asString();
onRefresh();
}
void LLFloaterTopObjects::showBeacon()
{
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
@@ -648,4 +514,68 @@ void LLFloaterTopObjects::showBeacon()
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
std::string tooltip("");
LLTracker::trackLocation(pos_global, name, tooltip, LLTracker::LOCATION_ITEM);
const LLUUID& taskid = first_selected->getUUID();
if(LLVOAvatar* voavatar = gObjectList.findAvatar(taskid))
{
gAgentCamera.setFocusOnAvatar(FALSE, FALSE);
gAgentCamera.changeCameraToThirdPerson();
gAgentCamera.setFocusGlobal(voavatar->getPositionGlobal(),taskid);
gAgentCamera.setCameraPosAndFocusGlobal(voavatar->getPositionGlobal() + LLVector3d(3.5,1.35,0.75) * voavatar->getRotation(), voavatar->getPositionGlobal(), taskid);
}
}
void LLFloaterTopObjects::onTeleportToObject()
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
std::string pos_string = first_selected->getColumn(3)->getValue().asString();
F32 x, y, z;
S32 matched = sscanf(pos_string.c_str(), "<%g,%g,%g>", &x, &y, &z);
if (matched != 3) return;
LLVector3 pos_agent(x, y, z);
LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent);
gAgent.teleportViaLocation( pos_global );
}
void LLFloaterTopObjects::onKick()
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
const LLUUID& objectId = first_selected->getUUID();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("EstateOwnerMessage");
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_TransactionID, LLUUID::null); //not used
msg->nextBlock("MethodData");
msg->addString("Method", "kickestate");
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", objectId.asString().c_str());
msg->sendReliable(gAgent.getRegionHost());
}
void LLFloaterTopObjects::onProfile()
{
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("objects_list");
if (!list) return;
LLScrollListItem* first_selected = list->getFirstSelected();
if (!first_selected) return;
const LLUUID& objectId = first_selected->getUUID();
LLAvatarActions::showProfile(objectId);
}

View File

@@ -37,29 +37,25 @@
class LLUICtrl;
class LLFloaterTopObjects : public LLFloater
class LLFloaterTopObjects : public LLFloater, public LLSingleton<LLFloaterTopObjects>
{
friend class LLSingleton;
public:
// Opens the floater on screen.
static void show();
// static void show();
// Opens the floater if it's not on-screen.
// Juggles the UI based on method = "scripts" or "colliders"
static void handle_land_reply(LLMessageSystem* msg, void** data);
void handleReply(LLMessageSystem* msg, void** data);
static void clearList();
void clearList();
void updateSelectionInfo();
virtual BOOL postBuild();
static void onRefresh(void* data);
void onRefresh();
static void setMode(U32 mode) { if (sInstance) sInstance->mCurrentMode = mode; }
void onProfile(void* data);
void onKick(void* data);
void onTP(void* data);
void onLagWarning(void* data);
static void setMode(U32 mode);
private:
LLFloaterTopObjects();
@@ -67,31 +63,27 @@ private:
void initColumns(LLCtrlListInterface *list);
static void onCommitObjectsList(LLUICtrl* ctrl, void* data);
void onCommitObjectsList();
static void onDoubleClickObjectsList(void* data);
void lookAtAvatar();
static void onClickShowBeacon(void* data);
void onClickShowBeacon();
void doToObjects(int action, bool all);
static void onReturnAll(void* data);
static void onReturnSelected(void* data);
static void onDisableAll(void* data);
static void onDisableSelected(void* data);
void onReturnAll();
void onReturnSelected();
void onDisableAll();
void onDisableSelected();
void onTeleportToObject();
void onKick();
void onProfile();
static void onProfileBtn(void* data);
static void onKickBtn(void* data);
static void onTPBtn(void* data);
static void onLagWarningBtn(void* data);
static bool callbackReturnAll(const LLSD& notification, const LLSD& response);
static bool callbackDisableAll(const LLSD& notification, const LLSD& response);
static void onGetByOwnerName(LLUICtrl* ctrl, void* data);
static void onGetByObjectName(LLUICtrl* ctrl, void* data);
static void onGetByOwnerNameClicked(void* data) { onGetByOwnerName(NULL, data); };
static void onGetByObjectNameClicked(void* data) { onGetByObjectName(NULL, data); };
void onGetByOwnerName();
void onGetByObjectName();
void onGetByParcelName();
void showBeacon();
@@ -99,7 +91,7 @@ private:
std::string mMethod;
LLSD mObjectListData;
std::vector<LLUUID> mObjectListIDs;
uuid_vec_t mObjectListIDs;
U32 mCurrentMode;
U32 mFlags;

View File

@@ -1,40 +1,65 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="top_objects" title="wird geladen...">
<text name="title_text">Wird geladen...</text>
<floater name="top_objects" title="Top-Objekte" min_width="690">
<string name="top_scripts_title">
Top-Skripte
</string>
<string name="top_scripts_text">
[COUNT] Skripts benötigen insgesamt [TIME] ms
</string>
<string name="scripts_score_label">
Zeit
</string>
<string name="top_colliders_title">
Top-Kollisionsobjekte
</string>
<string name="top_colliders_text">
Top [COUNT] Objekte mit vielen potenziellen Kollisionen
</string>
<string name="colliders_score_label">
Wertung
</string>
<string name="none_descriptor">
Nicht gefunden.
</string>
<text name="title_text">
Wird geladen...
</text>
<scroll_list name="objects_list">
<column label="Wertung" name="score"/>
<column label="Wertung" name="score" width="65"/>
<column label="Name" name="name"/>
<column label="Eigentümer" name="owner"/>
<column label="Position" name="location"/>
<column label="Parzelle" name="parcel"/>
<column label="Uhrzeit" name="time"/>
<column label="Mono-Uhrzeit:" name="mono_time"/>
<column label="URLs" name="URLs"/>
</scroll_list>
<text name="id_text">Objekt-ID:</text>
<column label="URLs" name="URLs"/>
<column label="Speicher (KB)" name="memory"/>
</scroll_list>
<text name="id_text">
Objekt-ID:
</text>
<line_editor name="id_editor" width="560"/>
<button label="Beacon anzeigen" name="show_beacon_btn"/>
<text name="obj_name_text">Objektname:</text>
<text name="obj_name_text">
Objektname:
</text>
<line_editor name="object_name_editor" width="560"/>
<button label="Filter" name="filter_object_btn"/>
<text name="owner_name_text">Eigentümername:</text>
<text name="owner_name_text">
Eigentümer:
</text>
<line_editor name="owner_name_editor" width="560"/>
<button label="Filter" name="filter_owner_btn"/>
<button label="Auswahl zurückgeben" name="return_selected_btn"/>
<button label="Alle zurückgeben" name="return_all_btn"/>
<button label="Lag-Warnung" name="lagwarning"/>
<button label="Hinauswerfen" name="kick"/>
<button label="Auswahl deaktivieren" name="disable_selected_btn"/>
<button label="Alle deaktivieren" name="disable_all_btn"/>
<button label="Profil" name="profile"/>
<button label="TP zu" name="tpto"/>
<text name="parcel_name_text">
Parzelle:
</text>
<line_editor name="parcel_name_editor" width="560"/>
<button label="Filter" name="filter_parcel_btn"/>
<button label="Aktualisieren" name="refresh_btn"/>
<string name="top_scripts_title">Top-Skripts</string>
<string name="top_scripts_text">[COUNT] Skripts benötigen insgesamt [TIME] ms</string>
<string name="scripts_score_label">Uhrzeit</string>
<string name="scripts_mono_time_label">Mono-Uhrzeit:</string>
<string name="top_colliders_title">Top-Kollisionsobjekte</string>
<string name="top_colliders_text">Top [COUNT] Objekte mit vielen potenziellen Kollisionen</string>
<string name="colliders_score_label">Wertung</string>
<string name="none_descriptor">Nicht gefunden.</string>
<button label="Auswahl zurückgeben" name="return_selected_btn" width="150"/>
<button label="Alle zurückgeben" left_delta="150" name="return_all_btn" width="150"/>
<button label="Teleportieren zu" left_delta="150" name="teleport_to_btn" width="150"/>
<button label="Profil" left_delta="150" name="profile_btn" width="150"/>
<button label="Auswahl deaktivieren" name="disable_selected_btn" width="150"/>
<button label="Alle deaktivieren" left_delta="150" name="disable_all_btn" width="150"/>
<button label="Estate: Hinauswerfen" left_delta="150" name="estate_kick_btn" width="150"/>
</floater>

View File

@@ -8,12 +8,18 @@
label="Grid" left="1" mouse_opaque="false" name="grid" width="398">
<button bottom="-28" follows="left|top" font="SansSerif" halign="center" height="20"
label="Kick all users" label_selected="Kick all users" left="10"
mouse_opaque="true" name="Kick all users" width="100" />
mouse_opaque="true" name="Kick all users" width="100">
<button.commit_callback
function="GridTools.KickAllUsers" />
</button>
<button bottom_delta="-28" follows="left|top" font="SansSerif" halign="center"
height="20" label="Flush This Region&apos;s Map Visibility Caches"
label_selected="Flush This Region&apos;s Map Visibility Caches" left="10"
mouse_opaque="true" name="Flush This Region&apos;s Map Visibility Caches"
width="250" />
width="250">
<button.commit_callback
function="GridTools.FlushMapVisibilityCaches" />
</button>
</panel>
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
label="Region" left="1" mouse_opaque="false" name="region" width="398">
@@ -25,55 +31,97 @@
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-26"
follows="left|top|right" font="SansSerifSmall" height="16" left="70"
max_length="63" mouse_opaque="true" name="region name" width="208" />
max_length="63" mouse_opaque="true" name="region name" width="208">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Prelude" left="10" mouse_opaque="true"
name="check prelude" tool_tip="Set this to make the region a prelude."
width="180" />
width="180">
<check_box.commit_callback
function="RegionTools.ChangePrelude" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Fixed Sun" left="10" mouse_opaque="true"
name="check fixed sun"
tool_tip="Fix the sun position (like in Region/Estate &gt; Terrain."
width="180" />
width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Reset Home On Teleport" left="10"
mouse_opaque="true" name="check reset home"
tool_tip="When resident teleports out, reset their home to the destination position."
width="180" />
width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Visible" left="10" mouse_opaque="true"
name="check visible"
tool_tip="Set this to make the region visible to non-gods." width="180" />
tool_tip="Set this to make the region visible to non-gods." width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Damage" left="10" mouse_opaque="true"
name="check damage" tool_tip="Set this to enable damage in this region."
width="180" />
width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Block Traffic Tracking" left="10"
mouse_opaque="true" name="block dwell"
tool_tip="Set this to make the region not compute traffic." width="180" />
tool_tip="Set this to make the region not compute traffic." width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Block Terraform" left="10" mouse_opaque="true"
name="block terraform"
tool_tip="Set this to disallow people terraforming their land" width="180" />
tool_tip="Set this to disallow people terraforming their land" width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box bottom_delta="-20" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Sandbox" left="10" mouse_opaque="true"
name="is sandbox" tool_tip="Toggle whether this is a sandbox region."
width="180" />
<check_box name="is gaming" label="Gaming" tool_tip="Toggle whether this is a gaming region." bottom_delta="-20" follows="left|top"/>
<check_box name="hide from search" label="Hide region from search" tool_tip="Toggle whether this region is searchable at all." bottom_delta="-20" follows="left|top"/>
width="180">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box name="is gaming" label="Gaming" tool_tip="Toggle whether this is a gaming region." bottom_delta="-20" follows="left|top">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<check_box name="hide from search" label="Hide region from search" tool_tip="Toggle whether this region is searchable at all." bottom_delta="-20" follows="left|top">
<check_box.commit_callback
function="RegionTools.ChangeAnything" />
</check_box>
<button bottom_delta="-32" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Bake Terrain" label_selected="Bake Terrain" left="8"
mouse_opaque="true" name="Bake Terrain"
tool_tip="Save the current terrain as default." width="110" />
tool_tip="Save the current terrain as default." width="110">
<button.commit_callback
function="RegionTools.BakeTerrain" />
</button>
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Revert Terrain" label_selected="Revert Terrain" left="8"
mouse_opaque="true" name="Revert Terrain"
tool_tip="Replace the current terrain with default." width="110" />
tool_tip="Replace the current terrain with default." width="110">
<button.commit_callback
function="RegionTools.RevertTerrain" />
</button>
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Swap Terrain" label_selected="Swap Terrain" left="8"
mouse_opaque="true" name="Swap Terrain"
tool_tip="Swap current terrain with default." width="110" />
tool_tip="Swap current terrain with default." width="110">
<button.commit_callback
function="RegionTools.SwapTerrain" />
</button>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-46" drop_shadow_visible="true" follows="left|top" font="SansSerif"
h_pad="0" halign="left" height="16" left="200" mouse_opaque="true"
@@ -82,7 +130,10 @@
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-46"
follows="top|right" font="SansSerifSmall" height="16" left_delta="108"
max_length="10" mouse_opaque="true" name="estate" width="50" />
max_length="10" mouse_opaque="true" name="estate" width="50">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-66" drop_shadow_visible="true" follows="left|top" font="SansSerif"
h_pad="0" halign="left" height="16" left="200" mouse_opaque="true"
@@ -92,7 +143,10 @@
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-66"
follows="top|right" font="SansSerifSmall" height="16" left_delta="108"
max_length="10" mouse_opaque="true" name="parentestate"
tool_tip="This is the parent estate for this region" width="50" />
tool_tip="This is the parent estate for this region" width="50">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-86" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="200"
@@ -102,11 +156,17 @@
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-86"
follows="top|right" font="SansSerifSmall" height="16" left_delta="88"
max_length="10" mouse_opaque="true" name="gridposx"
tool_tip="This is the grid x position for this region" width="50" />
tool_tip="This is the grid x position for this region" width="50">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-86"
follows="top|right" font="SansSerifSmall" height="16" left_delta="60"
max_length="10" mouse_opaque="true" name="gridposy"
tool_tip="This is the grid y position for this region" width="40" />
tool_tip="This is the grid y position for this region" width="40">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-106" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="16" left="200"
@@ -115,13 +175,22 @@
</text>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-106"
follows="top|right" font="SansSerifSmall" height="16" left_delta="88"
max_length="10" mouse_opaque="true" name="redirectx" width="50" />
max_length="10" mouse_opaque="true" name="redirectx" width="50">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<line_editor bevel_style="in" border_style="line" border_thickness="1" bottom="-106"
follows="top|right" font="SansSerifSmall" height="16" left_delta="60"
max_length="10" mouse_opaque="true" name="redirecty" width="40" />
max_length="10" mouse_opaque="true" name="redirecty" width="40">
<line_editor.commit_callback
function="RegionTools.ChangeAnything" />
</line_editor>
<spinner bottom="-126" decimal_digits="3" follows="top|right" height="16"
increment="0.1" initial_val="1" left="308" max_val="4" min_val="0"
mouse_opaque="true" name="billable factor" width="80" />
mouse_opaque="true" name="billable factor" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-126" drop_shadow_visible="true" follows="left|top"
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"
@@ -130,7 +199,10 @@
</text>
<spinner bottom="-146" decimal_digits="3" follows="top|right" height="16" increment="1"
initial_val="1" left="308" max_val="100" min_val="0" mouse_opaque="true"
name="land cost" width="80" />
name="land cost" width="80">
<spinner.commit_callback
function="RegionTools.ChangeAnything" />
</spinner>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-146" drop_shadow_visible="true" follows="left|top"
font="SansSerif" h_pad="0" halign="left" height="16" left_delta="-108"
@@ -140,19 +212,31 @@
<button bottom="-170" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Refresh" label_selected="Refresh" left="278"
mouse_opaque="true" name="Refresh"
tool_tip="Click here to refresh the above information." width="110" />
tool_tip="Click here to refresh the above information." width="110">
<button.commit_callback
function="RegionTools.Refresh" />
</button>
<button bottom_delta="-56" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Apply" label_selected="Apply" left="278"
mouse_opaque="true" name="Apply"
tool_tip="Click here to apply any changes from above." width="110" />
tool_tip="Click here to apply any changes from above." width="110">
<button.commit_callback
function="RegionTools.ApplyChanges" />
</button>
<button bottom="-258" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Select Region" label_selected="Select Region" left="128"
mouse_opaque="true" name="Select Region"
tool_tip="Select the whole region with the land tool." width="110" />
tool_tip="Select the whole region with the land tool." width="110">
<button.commit_callback
function="RegionTools.SelectRegion" />
</button>
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Autosave now" label_selected="Autosave now" left="128"
mouse_opaque="true" name="Autosave now"
tool_tip="Save gzipped state to autosave directory." width="110" />
tool_tip="Save gzipped state to autosave directory." width="110">
<button.commit_callback
function="RegionTools.SaveState" />
</button>
</panel>
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
label="Objects" left="1" mouse_opaque="false" name="objects" width="398">
@@ -175,24 +259,39 @@
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Disable Scripts" left="10" mouse_opaque="true"
name="disable scripts"
tool_tip="Set this to disable all scripts in this region" width="110" />
tool_tip="Set this to disable all scripts in this region" width="110">
<check_box.commit_callback
function="ObjectTools.ChangeAnything" />
</check_box>
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Disable Collisions" left_delta="120"
mouse_opaque="true" name="disable collisions"
tool_tip="Set this to disable non-agent collisions in this region"
width="121" />
width="121">
<check_box.commit_callback
function="ObjectTools.ChangeAnything" />
</check_box>
<check_box bottom="-46" follows="left|top" font="SansSerifSmall" height="16"
initial_value="false" label="Disable Physics" left_delta="120"
mouse_opaque="true" name="disable physics"
tool_tip="Set this to disable all physics in this region" width="130" />
tool_tip="Set this to disable all physics in this region" width="130">
<check_box.commit_callback
function="ObjectTools.ChangeAnything" />
</check_box>
<button bottom="-74" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Apply" label_selected="Apply" left="278"
mouse_opaque="true" name="Apply"
tool_tip="Click here to apply any changes from above." width="110" />
tool_tip="Click here to apply any changes from above." width="110">
<button.commit_callback
function="ObjectTools.ApplyChanges" />
</button>
<button bottom="-98" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Set Target" label_selected="Set Target" left="8"
mouse_opaque="true" name="Set Target"
tool_tip="Set the target avatar for object deletion." width="110" />
tool_tip="Set the target avatar for object deletion." width="110">
<button.commit_callback
function="ObjectTools.Set" />
</button>
<text bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
bottom="-88" drop_shadow_visible="true" follows="left|top"
font="SansSerifSmall" h_pad="0" halign="left" height="10" left="130"
@@ -205,35 +304,53 @@
left="8" mouse_opaque="true"
name="Delete Target&apos;s Scripted Objects On Others Land"
tool_tip="Delete all scripted objects owned by the target on land not owned by the target. (no copy) objects will be returned."
width="380" />
width="380">
<button.commit_callback
function="ObjectTools.DeletePublicOwnedBy" />
</button>
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Delete Target&apos;s Scripted Objects On *Any* Land"
label_selected="Delete Target&apos;s Scripted Objects On *Any* Land"
left="8" mouse_opaque="true"
name="Delete Target&apos;s Scripted Objects On *Any* Land"
tool_tip="Delete all scripted objects owned by the target in this region. (no copy) objects will be returned."
width="380" />
width="380">
<button.commit_callback
function="ObjectTools.DeleteAllScriptedOwnedBy" />
</button>
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Delete *ALL* Of Target&apos;s Objects"
label_selected="Delete *ALL* Of Target&apos;s Objects" left="8"
mouse_opaque="true" name="Delete *ALL* Of Target&apos;s Objects"
tool_tip="Delete all objects owned by the target in this region. (no copy) objects will be returned."
width="380" />
width="380">
<button.commit_callback
function="ObjectTools.DeleteAllOwnedBy" />
</button>
<button bottom_delta="-48" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Get Top Colliders" label_selected="Get Top Colliders"
left="8" mouse_opaque="true" name="Get Top Colliders"
tool_tip="Gets list of objects experiencing the most narrowphase callbacks."
width="110" />
width="110">
<button.commit_callback
function="ObjectTools.GetTopColliders" />
</button>
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Get Top Scripts" label_selected="Get Top Scripts"
left="8" mouse_opaque="true" name="Get Top Scripts"
tool_tip="Gets list of objects spending the most time running scripts."
width="110" />
width="110">
<button.commit_callback
function="ObjectTools.GetTopScripts" />
</button>
<button bottom_delta="-24" follows="top|right" font="SansSerifSmall" halign="center"
height="20" label="Scripts digest" label_selected="Scripts digest" left="8"
mouse_opaque="true" name="Scripts digest"
tool_tip="Gets a list of all scripts and number of occurences of each."
width="110" />
width="110" >
<button.commit_callback
function="ObjectTools.GetScriptDigest" />
</button>
</panel>
<panel border="true" bottom="-363" follows="left|top|right|bottom" height="347"
label="Request" left="1" mouse_opaque="true" name="request" width="398">
@@ -285,7 +402,10 @@
max_length="63" mouse_opaque="true" name="parameter" width="290" />
<button bottom="-116" follows="left|top" font="SansSerif" halign="center" height="20"
label="Make Request" label_selected="Make Request" left="10"
mouse_opaque="true" name="Make Request" width="100" />
mouse_opaque="true" name="Make Request" width="100">
<button.commit_callback
function="GodTools.Request" />
</button>
</panel>
</tab_container>
</floater>

View File

@@ -1,90 +1,299 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater can_close="true" can_drag_on_left="false" can_minimize="true" can_resize="true"
height="400" min_height="300" min_width="580" name="top_objects"
title="loading..." width="580">
<text bottom="-50" follows="left|top" font="SansSerif" height="20" left="10"
name="title_text" width="400">
Loading...
</text>
<scroll_list bottom_delta="-200" draw_border="true" draw_heading="true"
follows="left|top|bottom|right" height="200" left="10" multi_select="true"
name="objects_list" width="560">
<column label="Score" name="score" width="43" />
<column label="Name" name="name" dynamicwidth="true" />
<column label="Owner" name="owner" width="100" />
<column label="Location" name="location" width="100" />
<column label="Time" name="time" width="105" />
<column label="Mono Time" name="mono_time" width="50" />
<column label="URLs" name="URLs" width="50" />
</scroll_list>
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
left="10" name="id_text" width="100">
Object ID:
</text>
<line_editor bottom_delta="3" enabled="false"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="id_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Show Beacon"
name="show_beacon_btn" right="-10" width="100" />
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
left="10" name="obj_name_text" width="100">
Object Name:
</text>
<line_editor bottom_delta="3" enabled="true"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="object_name_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
name="filter_object_btn" right="-10" width="100" />
<text bottom_delta="-30" follows="left|bottom" font="SansSerifSmall" height="20"
left="10" name="owner_name_text" width="100">
Owner Name:
</text>
<line_editor bottom_delta="3" enabled="true"
follows="left|bottom|right" font="SansSerifSmall" height="20" left="80"
name="owner_name_editor" width="385" />
<button bottom_delta="0" follows="bottom|right" height="20" label="Filter"
name="filter_owner_btn" right="-10" width="100" />
<button bottom="35" follows="bottom|left" height="20" label="Return Selected" left="10"
name="return_selected_btn" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Return All" left="125"
name="return_all_btn" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Lag Warning" left="240"
name="lagwarning" width="110" />
<button bottom="35" follows="bottom|left" height="20" label="Kick" left="355"
name="kick" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Disable Selected"
left="10" name="disable_selected_btn" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Disable All" left="125"
name="disable_all_btn" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="Profile" left="240"
name="profile" width="110" />
<button bottom="10" follows="bottom|left" height="20" label="TP to" left="355"
name="tpto" width="110" />
<button bottom="35" follows="bottom|right" height="20" label="Refresh"
name="refresh_btn" right="-10" width="100" />
<string name="top_scripts_title">
Top Scripts
</string>
<string name="top_scripts_text">
[COUNT] scripts taking a total of [TIME] ms
</string>
<string name="scripts_score_label">
Time
</string>
<string name="scripts_mono_time_label">
Mono Time
<floater
can_close="true"
can_drag_on_left="false"
can_minimize="true"
can_resize="true"
height="372"
min_height="300"
min_width="572"
name="top_objects"
help_topic="top_objects"
title="Top Objects"
width="800">
<string
name="top_scripts_title">
Top Scripts
</string>
<string
name="top_scripts_text">
[COUNT] scripts taking a total of [TIME] ms
</string>
<string
name="scripts_score_label">
Time
</string>
<string
name="top_colliders_title">
Top Colliders
</string>
<string name="top_colliders_text">
Top [COUNT] objects experiencing many potential collisions
</string>
<string name="colliders_score_label">
Score
</string>
<string name="top_colliders_title">
Top Colliders
</string>
<string name="top_colliders_text">
Top [COUNT] objects experiencing many potential collisions
</string>
<string name="colliders_score_label">
Score
</string>
<string name="none_descriptor">
None found.
</string>
None found.
</string>
<text
type="string"
length="1"
follows="left|top"
height="20"
left="10"
name="title_text"
bottom="-40"
width="400">
Loading...
</text>
<scroll_list
draw_heading="true"
follows="all"
height="170"
left_delta="0"
multi_select="true"
name="objects_list"
bottom_delta="-170"
width="780">
<column
label="Score"
name="score"
width="45" />
<column
label="Name"
name="name"
width="130" />
<column
label="Owner"
name="owner"
width="100" />
<column
label="Location"
name="location"
width="120" />
<column
label="Parcel"
name="parcel"
width="120" />
<column
label="Time"
name="time"
width="130" />
<column
label="URLs"
name="URLs"
width="40" />
<column
label="Memory (KB)"
name="memory"
width="40" />
<scroll_list.commit_callback
function="TopObjects.CommitObjectsList" />
</scroll_list>
<text
type="string"
length="1"
follows="left|bottom"
height="20"
left_delta="0"
name="id_text"
bottom_delta="-30"
width="107">
Object ID:
</text>
<line_editor
enabled="false"
follows="left|bottom|right"
height="20"
left="107"
name="id_editor"
bottom_delta="3"
width="568" />
<button
follows="bottom|right"
height="20"
label="Show Beacon"
right="-10"
name="show_beacon_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.ShowBeacon" />
</button>
<text
type="string"
length="1"
follows="left|bottom"
height="20"
left="10"
bottom_delta="-30"
name="obj_name_text"
width="107">
Object name:
</text>
<line_editor
follows="left|bottom|right"
height="20"
left="107"
name="object_name_editor"
bottom_delta="3"
width="568" />
<button
follows="bottom|right"
height="20"
label="Filter"
right="-10"
name="filter_object_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.GetByObjectName" />
</button>
<text
type="string"
length="1"
follows="left|bottom"
height="20"
left="10"
bottom_delta="-30"
name="owner_name_text"
width="107">
Owner:
</text>
<line_editor
follows="left|bottom|right"
height="20"
left="107"
name="owner_name_editor"
bottom_delta="3"
width="568" />
<button
follows="bottom|right"
height="20"
label="Filter"
right="-10"
name="filter_owner_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.GetByOwnerName" />
</button>
<text
type="string"
length="1"
follows="left|bottom"
height="20"
left="10"
bottom_delta="-30"
name="parcel_name_text"
width="107">
Parcel:
</text>
<line_editor
follows="left|bottom|right"
height="20"
left="107"
name="parcel_name_editor"
bottom_delta="3"
width="568" />
<button
follows="bottom|right"
height="20"
label="Filter"
right="-10"
name="filter_parcel_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.GetByParcelName" />
</button>
<button
follows="bottom|right"
height="20"
label="Refresh"
name="refresh_btn"
right="-10"
bottom_delta="-27"
width="110">
<button.commit_callback
function="TopObjects.Refresh" />
</button>
<button
follows="bottom|left"
height="20"
label="Return Selected"
left="10"
bottom_delta="0"
name="return_selected_btn"
width="110">
<button.commit_callback
function="TopObjects.ReturnSelected" />
</button>
<button
follows="bottom|left"
height="20"
label="Return All"
left_delta="110"
name="return_all_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.ReturnAll" />
</button>
<button
follows="bottom|left"
height="20"
label="Teleport to"
left_delta="110"
name="teleport_to_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.TeleportToObject" />
</button>
<button
follows="bottom|left"
height="20"
label="Profile"
left_delta="110"
name="profile_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.Profile" />
</button>
<button
follows="bottom|left"
height="20"
label="Disable Selected"
bottom_delta="-20"
left="10"
name="disable_selected_btn"
width="110">
<button.commit_callback
function="TopObjects.DisableSelected" />
</button>
<button
follows="bottom|left"
height="20"
label="Disable All"
left_delta="110"
name="disable_all_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.DisableAll" />
</button>
<button
follows="bottom|left"
height="20"
label="Estate Kick"
left_delta="110"
name="estate_kick_btn"
bottom_delta="0"
width="110">
<button.commit_callback
function="TopObjects.Kick" />
</button>
</floater>

View File

@@ -1,40 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<floater name="top_objects" title="cargando...">
<text name="title_text">
Cargando...
</text>
<scroll_list name="objects_list">
<column label="Puntuación" name="score"/>
<column label="Nombre" name="name"/>
<column label="Propietario" name="owner"/>
<column label="Ubicación" name="location"/>
<column label="Tiempo" name="time" width="60"/>
<column label="Tiempo en Mono" name="mono_time" width="100"/>
<column label="URLs" name="URLs"/>
</scroll_list>
<text name="id_text">
ID del Objeto:
</text>
<button label="Mostrar Balizas" name="show_beacon_btn"/>
<text name="obj_name_text">
Objeto:
</text>
<button label="Filtro" name="filter_object_btn"/>
<text name="owner_name_text">
Propietario:
</text>
<button label="Filtro" name="filter_owner_btn"/>
<button label="Devolver Seleccionado" name="return_selected_btn" width="152"/>
<button label="Devolver Todo" left="165" name="return_all_btn" width="110" />
<button label="Advertencia de Lag" left="280" name="lagwarning" width="130" />
<button label="Expulsar" left="415" name="kick" width="80" />
<button label="Desactivar Seleccionado" name="disable_selected_btn" width="152" />
<button label="Desactivar Todo" left="165" name="disable_all_btn" width="110" />
<button label="Perfil" left="280" name="profile" width="130" />
<button label="TP a" left="415" name="tpto" width="80" />
<button label="Actualizar" name="refresh_btn" right="-10" width="70" />
<floater name="top_objects" title="Objetos superiores">
<string name="top_scripts_title">
Top Scripts
Scripts según su uso
</string>
<string name="top_scripts_text">
[COUNT] scripts usando un total de [TIME] ms
@@ -42,19 +9,53 @@
<string name="scripts_score_label">
Tiempo
</string>
<string name="scripts_mono_time_label">
Tiempo en Mono
</string>
<string name="top_colliders_title">
Top Colisionadores
Objetos que colisionan
</string>
<string name="top_colliders_text">
Top [COUNT] objetos con muchas potenciales colisiones
[COUNT] objetos con muchas posibles colisiones
</string>
<string name="colliders_score_label">
Puntaje
Resultado
</string>
<string name="none_descriptor">
Ninguno Encontrado.
No se ha encontrado ninguno.
</string>
<text name="title_text">
Cargando...
</text>
<scroll_list name="objects_list">
<column label="Resultado" name="score"/>
<column label="Nombre" name="name"/>
<column label="Propietario" name="owner"/>
<column label="Posición" name="location"/>
<column label="Parcela" name="parcel"/>
<column label="Tiempo" name="time"/>
<column label="URLs" name="URLs"/>
<column label="Memoria (KB)" name="memory"/>
</scroll_list>
<text name="id_text">
ID del objeto:
</text>
<button label="Mostrar baliza" name="show_beacon_btn"/>
<text name="obj_name_text">
Nombre del objeto:
</text>
<button label="Filtro" name="filter_object_btn"/>
<text name="owner_name_text">
Propietario:
</text>
<button label="Filtro" name="filter_owner_btn"/>
<text name="parcel_name_text">
Parcela:
</text>
<button label="Filtro" name="filter_parcel_btn"/>
<button label="Actualizar" name="refresh_btn"/>
<button label="Devolver lo seleccionado" name="return_selected_btn" width="190"/>
<button label="Devolver todo" left_delta="190" name="return_all_btn"/>
<button label="Teleportarse" name="teleport_to_btn"/>
<button label="Perfil" name="profile_btn"/>
<button label="Desactivar lo seleccionado" name="disable_selected_btn" width="190"/>
<button label="Desactivar todo" left_delta="190" name="disable_all_btn"/>
<button label="Expulsar del Estado" name="estate_kick_btn"/>
</floater>

View File

@@ -1,44 +1,13 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="top_objects" title="En cours de chargement">
<text name="title_text">
Chargement...
</text>
<scroll_list name="objects_list">
<column label="Score" name="score"/>
<column label="Nom" name="name"/>
<column label="Propriétaire" name="owner"/>
<column label="Lieu" name="location"/>
<column label="Heure" name="time"/>
<column label="Heure Mono" name="mono_time"/>
</scroll_list>
<text name="id_text">
ID de l'objet:
</text>
<button label="Afficher balise" name="show_beacon_btn"/>
<text name="obj_name_text">
Objet:
</text>
<button label="Filtre" name="filter_object_btn"/>
<text name="owner_name_text">
Propriétaire:
</text>
<button label="Filtre" name="filter_owner_btn"/>
<button label="Renvoyer" name="return_selected_btn"/>
<button label="Tout renvoyer" name="return_all_btn"/>
<button label="Désactiver" name="disable_selected_btn"/>
<button label="Tout désactiver" name="disable_all_btn"/>
<button label="Rafraîchir" name="refresh_btn"/>
<floater name="top_objects" title="Objets les plus consommateurs">
<string name="top_scripts_title">
Scripts principaux
Scripts les plus consommateurs
</string>
<string name="top_scripts_text">
[COUNT] scripts prenant un total de [TIME] ms
</string>
<string name="scripts_score_label">
Heure
</string>
<string name="scripts_mono_time_label">
Heure Mono
Temps
</string>
<string name="top_colliders_title">
Collisions les plus consommatrices
@@ -50,6 +19,40 @@
Score
</string>
<string name="none_descriptor">
Aucun résultat
Aucun résultat.
</string>
<text name="title_text">
Chargement...
</text>
<scroll_list name="objects_list">
<column label="Score" name="score"/>
<column label="Nom" name="name"/>
<column label="Propriétaire" name="owner"/>
<column label="Lieu" name="location"/>
<column label="Parcelle" name="parcel"/>
<column label="Temps" name="time"/>
<column label="URL" name="URLs"/>
<column label="Mémoire (Ko)" name="memory"/>
</scroll_list>
<text name="id_text">
ID de l&apos;objet :
</text>
<button label="Afficher balise" name="show_beacon_btn"/>
<text name="obj_name_text">
Nom :
</text>
<button label="Filtrer" name="filter_object_btn"/>
<text name="owner_name_text">
Propriétaire:
</text>
<button label="Filtrer" name="filter_owner_btn"/>
<text name="parcel_name_text">
Parcelle :
</text>
<button label="Filtrer" name="filter_parcel_btn"/>
<button label="Rafraîchir" name="refresh_btn"/>
<button label="Renvoyer" name="return_selected_btn"/>
<button label="Tout renvoyer" name="return_all_btn"/>
<button label="Désactiver" name="disable_selected_btn"/>
<button label="Tout désactiver" name="disable_all_btn"/>
</floater>

View File

@@ -1,36 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<floater name="top_objects" title="Carregando...">
<text name="title_text">
Carregando...
</text>
<scroll_list name="objects_list">
<column label="Placar" name="score"/>
<column label="Nome" name="name"/>
<column label="Proprietário" name="owner"/>
<column label="Local" name="location"/>
<column label="Tempo" name="time"/>
<column label="Hora Mono" name="mono_time"/>
</scroll_list>
<text name="id_text">
ID do Objeto:
</text>
<button label="Mostrar Avisos" name="show_beacon_btn"/>
<text name="obj_name_text">
Nome do Objeto:
</text>
<button label="Filtro" name="filter_object_btn"/>
<text name="owner_name_text" width="130">
Nome do Proprietário:
</text>
<line_editor font="SansSerifSmall" left="140" name="id_editor" width="280"/>
<line_editor font="SansSerifSmall" left="140" name="object_name_editor" width="280"/>
<line_editor font="SansSerifSmall" left="140" name="owner_name_editor" width="280"/>
<button label="Filtro" name="filter_owner_btn"/>
<button label="Retornar Selecionado" name="return_selected_btn" width="170"/>
<button label="Retornar Tudo" name="return_all_btn" left="190"/>
<button label="Desabilitar Selecionado" name="disable_selected_btn" width="170"/>
<button label="Desabilitar Tudo" name="disable_all_btn" left="190"/>
<button label="Atualizar" name="refresh_btn"/>
<floater name="top_objects" title="Principais objetos:">
<string name="top_scripts_title">
Principais Scripts
</string>
@@ -40,9 +9,6 @@
<string name="scripts_score_label">
Tempo
</string>
<string name="scripts_mono_time_label">
Hora Mono
</string>
<string name="top_colliders_title">
Principais Colidentes
</string>
@@ -55,4 +21,38 @@
<string name="none_descriptor">
Nenhum encontrado.
</string>
<text name="title_text">
Carregando...
</text>
<scroll_list name="objects_list">
<column label="Placar" name="score"/>
<column label="Nome" name="name"/>
<column label="Proprietário" name="owner"/>
<column label="Local" name="location"/>
<column label="Lote" name="parcel"/>
<column label="Tempo" name="time"/>
<column label="URLs" name="URLs"/>
<column label="Memória (KB)" name="memory"/>
</scroll_list>
<text name="id_text">
ID do Objeto:
</text>
<button label="Mostrar Avisos" name="show_beacon_btn"/>
<text name="obj_name_text">
Nome do objeto:
</text>
<button label="Filtro" name="filter_object_btn"/>
<text name="owner_name_text">
Proprietário:
</text>
<button label="Filtro" name="filter_owner_btn"/>
<text name="parcel_name_text">
Lote:
</text>
<button label="Filtrar" name="filter_parcel_btn"/>
<button label="Atualizar" name="refresh_btn"/>
<button label="Retornar Selecionado" name="return_selected_btn" width="190"/>
<button label="Retornar Tudo" left_delta="190" name="return_all_btn"/>
<button label="Desabilitar Selecionado" name="disable_selected_btn" width="190"/>
<button label="Desabilitar Tudo" left_delta="190" name="disable_all_btn"/>
</floater>