本文整理汇总了C++中LLMessageSystem::newMessage方法的典型用法代码示例。如果您正苦于以下问题:C++ LLMessageSystem::newMessage方法的具体用法?C++ LLMessageSystem::newMessage怎么用?C++ LLMessageSystem::newMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLMessageSystem
的用法示例。
在下文中一共展示了LLMessageSystem::newMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fetchFromServer
void LLViewerInventoryItem::fetchFromServer(void) const
{
if(!mIsComplete)
{
std::string url;
if( ALEXANDRIA_LINDEN_ID.getString() == mPermissions.getOwner().getString())
url = gAgent.getRegion()->getCapability("FetchLib");
else
url = gAgent.getRegion()->getCapability("FetchInventory");
if (!url.empty())
{
LLSD body;
body["agent_id"] = gAgent.getID();
body["items"][0]["owner_id"] = mPermissions.getOwner();
body["items"][0]["item_id"] = mUUID;
LLHTTPClient::post(url, body, new LLInventoryModel::fetchInventoryResponder(body));
}
else
{
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("FetchInventory");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("InventoryData");
msg->addUUID("OwnerID", mPermissions.getOwner());
msg->addUUID("ItemID", mUUID);
gAgent.sendReliableMessage();
}
}
else
{
// *FIX: this can be removed after a bit.
llwarns << "request to fetch complete item" << llendl;
}
}
示例2: flushMapVisibilityCachesConfirm
// static
void LLPanelGridTools::flushMapVisibilityCachesConfirm(S32 option, void* data)
{
if (option != 0) return;
LLPanelGridTools* self = (LLPanelGridTools*)data;
if (!self) return;
// HACK: Send this as an EstateOwnerRequest so it gets routed
// correctly by the spaceserver. JC
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", "refreshmapvisibility");
msg->addUUID("Invoice", LLUUID::null);
msg->nextBlock("ParamList");
msg->addString("Parameter", gAgent.getID().asString());
gAgent.sendReliableMessage();
}
示例3: postcard_upload_callback
static void postcard_upload_callback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status)
{
LLSD* postcard_data = (LLSD*)user_data;
if (result)
{
// TODO: display the error messages in UI
llwarns << "Failed to send postcard: " << LLAssetStorage::getErrorString(result) << llendl;
LLPostCard::reportPostResult(false);
}
else
{
// only create the postcard once the upload succeeds
// request the postcard
const LLSD& data = *postcard_data;
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("SendPostcard");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("AssetID", data["asset-id"].asUUID());
msg->addVector3d("PosGlobal", LLVector3d(data["pos-global"]));
msg->addString("To", data["to"]);
msg->addString("From", data["from"]);
msg->addString("Name", data["name"]);
msg->addString("Subject", data["subject"]);
msg->addString("Msg", data["msg"]);
msg->addBOOL("AllowPublish", FALSE);
msg->addBOOL("MaturePublish", FALSE);
gAgent.sendReliableMessage();
LLPostCard::reportPostResult(true);
}
delete postcard_data;
}
示例4: really_send_chat_from_viewer
//<FS:TS> FIRE-787: break up too long chat lines into multiple messages
// This function just sends the message, with no other processing. Moved out
// of send_chat_from_viewer.
void really_send_chat_from_viewer(std::string utf8_out_text, EChatType type, S32 channel)
{
LLMessageSystem* msg = gMessageSystem;
// <FS:ND> gMessageSystem can be 0, not sure how it is exactly to reproduce, maybe during viewer shutdown?
if (!msg)
{
return;
}
// </FS:ND>
if (channel >= 0)
{
msg->newMessageFast(_PREHASH_ChatFromViewer);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_ChatData);
msg->addStringFast(_PREHASH_Message, utf8_out_text);
msg->addU8Fast(_PREHASH_Type, type);
msg->addS32("Channel", channel);
}
else
{
msg->newMessage("ScriptDialogReply");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("ObjectID", gAgent.getID());
msg->addS32("ChatChannel", channel);
msg->addS32("ButtonIndex", 0);
msg->addString("ButtonLabel", utf8_out_text);
}
gAgent.sendReliableMessage();
}
示例5: uploadCallback
// static
void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
LLUploadDialog::modalUploadFinished();
if (result)
{
LLSD args;
args["REASON"] = std::string(LLAssetStorage::getErrorString(result));
LLNotificationsUtil::add("ErrorUploadingPostcard", args);
}
else
{
// only create the postcard once the upload succeeds
// request the postcard
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("SendPostcard");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("AssetID", self->mAssetID);
msg->addVector3d("PosGlobal", self->mPosTakenGlobal);
msg->addString("To", self->getChild<LLUICtrl>("to_form")->getValue().asString());
msg->addString("From", self->getChild<LLUICtrl>("from_form")->getValue().asString());
msg->addString("Name", self->getChild<LLUICtrl>("name_form")->getValue().asString());
msg->addString("Subject", self->getChild<LLUICtrl>("subject_form")->getValue().asString());
msg->addString("Msg", self->getChild<LLUICtrl>("msg_form")->getValue().asString());
msg->addBOOL("AllowPublish", FALSE);
msg->addBOOL("MaturePublish", FALSE);
gAgent.sendReliableMessage();
}
self->closeFloater();
}
示例6: uploadCallback
// static
void LLFloaterPostcard::uploadCallback(const LLUUID& asset_id, void *user_data, S32 result, LLExtStat ext_status) // StoreAssetData callback (fixed)
{
LLFloaterPostcard *self = (LLFloaterPostcard *)user_data;
LLUploadDialog::modalUploadFinished();
if (result)
{
LLStringBase<char>::format_map_t args;
args["[REASON]"] = std::string(LLAssetStorage::getErrorString(result));
gViewerWindow->alertXml("ErrorUploadingPostcard", args);
}
else
{
// only create the postcard once the upload succeeds
// request the postcard
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("SendPostcard");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("AssetID", self->mAssetID);
msg->addVector3d("PosGlobal", self->mPosTakenGlobal);
msg->addString("To", self->childGetValue("to_form").asString());
msg->addString("From", self->childGetValue("from_form").asString());
msg->addString("Name", self->childGetValue("name_form").asString());
msg->addString("Subject", self->childGetValue("subject_form").asString());
msg->addString("Msg", self->childGetValue("msg_form").asString());
msg->addBOOL("AllowPublish", self->childGetValue("allow_publish_check").asBoolean());
msg->addBOOL("MaturePublish", self->childGetValue("mature_check").asBoolean());
gAgent.sendReliableMessage();
}
self->close();
}
示例7: send_freeze
static void send_freeze(const LLUUID& avatar_id, bool freeze)
{
U32 flags = 0x0;
if (!freeze)
{
// unfreeze
flags |= 0x1;
}
LLMessageSystem* msg = gMessageSystem;
LLVOAvatar* avatarp = gObjectList.findAvatar(avatar_id);
if (avatarp && avatarp->getRegion())
{
msg->newMessage("FreezeUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id);
msg->addU32("Flags", flags);
msg->sendReliable( avatarp->getRegion()->getHost());
}
}
示例8: find
void LLFloaterAvatarPicker::find()
{
const std::string& text = childGetValue("Edit").asString();
mQueryID.generate();
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("AvatarPickerRequest");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addUUID("QueryID", mQueryID); // not used right now
msg->nextBlock("Data");
msg->addString("Name", text);
gAgent.sendReliableMessage();
getChild<LLScrollListCtrl>("SearchResults")->deleteAllItems();
getChild<LLScrollListCtrl>("SearchResults")->addCommentText(getString("searching"));
childSetEnabled("Select", FALSE);
mResultsReturned = FALSE;
}
示例9: send_eject
static void send_eject(const LLUUID& avatar_id, bool ban)
{
LLMessageSystem* msg = gMessageSystem;
LLVOAvatar* avatarp = gObjectList.findAvatar(avatar_id);
if (avatarp && avatarp->getRegion())
{
U32 flags = 0x0;
if (ban)
{
// eject and add to ban list
flags |= 0x1;
}
msg->newMessage("EjectUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id);
msg->addU32("Flags", flags);
msg->sendReliable( avatarp->getRegion()->getHost());
}
}
示例10: sendFreeze
// static
void PanelRadar::sendFreeze(const LLUUID& avatar_id, bool freeze)
{
U32 flags = 0x0;
if (!freeze)
{
// unfreeze
flags |= 0x1;
}
LLMessageSystem* msg = gMessageSystem;
LLViewerObject* avatar = gObjectList.findObject(avatar_id);
if (avatar)
{
msg->newMessage("FreezeUser");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->nextBlock("Data");
msg->addUUID("TargetID", avatar_id );
msg->addU32("Flags", flags );
msg->sendReliable( avatar->getRegion()->getHost() );
}
}
示例11: onLoadComplete
// static
void LLGestureMgr::onLoadComplete(LLVFS *vfs,
const LLUUID& asset_uuid,
LLAssetType::EType type,
void* user_data, S32 status, LLExtStat ext_status)
{
LLLoadInfo* info = (LLLoadInfo*)user_data;
LLUUID item_id = info->mItemID;
BOOL inform_server = info->mInformServer;
BOOL deactivate_similar = info->mDeactivateSimilar;
delete info;
info = NULL;
LLGestureMgr& self = LLGestureMgr::instance();
self.mLoadingCount--;
if (0 == status)
{
LLVFile file(vfs, asset_uuid, type, LLVFile::READ);
S32 size = file.getSize();
char* buffer = new char[size+1];
if (buffer == NULL)
{
LL_ERRS() << "Memory Allocation Failed" << LL_ENDL;
return;
}
file.read((U8*)buffer, size); /* Flawfinder: ignore */
// ensure there's a trailing NULL so strlen will work.
buffer[size] = '\0';
LLMultiGesture* gesture = new LLMultiGesture();
LLDataPackerAsciiBuffer dp(buffer, size+1);
BOOL ok = gesture->deserialize(dp);
if (ok)
{
if (deactivate_similar)
{
self.deactivateSimilarGestures(gesture, item_id);
// Display deactivation message if this was the last of the bunch.
if (self.mLoadingCount == 0
&& self.mDeactivateSimilarNames.length() > 0)
{
// we're done with this set of deactivations
LLSD args;
args["NAMES"] = self.mDeactivateSimilarNames;
LLNotificationsUtil::add("DeactivatedGesturesTrigger", args);
}
}
LLViewerInventoryItem* item = gInventory.getItem(item_id);
if(item)
{
gesture->mName = item->getName();
}
else
{
// Watch this item and set gesture name when item exists in inventory
self.setFetchID(item_id);
self.startFetch();
}
self.mActive[item_id] = gesture;
// Everything has been successful. Add to the active list.
gInventory.addChangedMask(LLInventoryObserver::LABEL, item_id);
if (inform_server)
{
// Inform the database of this change
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("ActivateGestures");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
msg->addU32("Flags", 0x0);
msg->nextBlock("Data");
msg->addUUID("ItemID", item_id);
msg->addUUID("AssetID", asset_uuid);
msg->addU32("GestureFlags", 0x0);
gAgent.sendReliableMessage();
}
callback_map_t::iterator i_cb = self.mCallbackMap.find(item_id);
if(i_cb != self.mCallbackMap.end())
{
i_cb->second(gesture);
self.mCallbackMap.erase(i_cb);
}
self.notifyObservers();
}
else
{
//.........这里部分代码省略.........
示例12: postBuild
// virtual
BOOL LLFloaterReporter::postBuild()
{
LLSLURL slurl;
LLAgentUI::buildSLURL(slurl);
getChild<LLUICtrl>("abuse_location_edit")->setValue(slurl.getSLURLString());
enableControls(TRUE);
// convert the position to a string
LLVector3d pos = gAgent.getPositionGlobal();
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
getChild<LLUICtrl>("sim_field")->setValue(regionp->getName());
pos -= regionp->getOriginGlobal();
}
setPosBox(pos);
// Take a screenshot, but don't draw this floater.
setVisible(FALSE);
takeScreenshot();
setVisible(TRUE);
// Default text to be blank
getChild<LLUICtrl>("object_name")->setValue(LLStringUtil::null);
getChild<LLUICtrl>("owner_name")->setValue(LLStringUtil::null);
mOwnerName = LLStringUtil::null;
getChild<LLUICtrl>("summary_edit")->setFocus(TRUE);
mDefaultSummary = getChild<LLUICtrl>("details_edit")->getValue().asString();
// send a message and ask for information about this region -
// result comes back in processRegionInfo(..)
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("RequestRegionInfo");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
gAgent.sendReliableMessage();
// abuser name is selected from a list
LLUICtrl* le = getChild<LLUICtrl>("abuser_name_edit");
le->setEnabled( false );
LLButton* pick_btn = getChild<LLButton>("pick_btn");
// XUI: Why aren't these in viewerart.ini?
pick_btn->setImages(std::string("UIImgFaceUUID"),
std::string("UIImgFaceSelectedUUID") );
childSetAction("pick_btn", onClickObjPicker, this);
childSetAction("select_abuser", boost::bind(&LLFloaterReporter::onClickSelectAbuser, this));
childSetAction("send_btn", onClickSend, this);
childSetAction("cancel_btn", onClickCancel, this);
// grab the user's name
std::string reporter;
gAgent.buildFullname(reporter);
getChild<LLUICtrl>("reporter_field")->setValue(reporter);
center();
return TRUE;
}
示例13: updateRadarList
//.........这里部分代码省略.........
{
make_ui_sound("UISndRadarDrawLeave"); // <FS:PP> FIRE-6069: Radar alerts sounds
LLAvatarNameCache::get(prevId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, str_draw_distance_leaving));
}
if (RadarReportSimRangeLeave && (rf.lastRegion == regionSelf || rf.lastRegion.isNull()))
{
make_ui_sound("UISndRadarSimLeave"); // <FS:PP> FIRE-6069: Radar alerts sounds
LLAvatarNameCache::get(prevId, boost::bind(&FSRadar::radarAlertMsg, this, _1, _2, str_region_leaving));
}
if (RadarLeaveChannelAlert)
{
mRadarLeaveAlerts.push_back(prevId);
}
}
}
static LLCachedControl<S32> RadarAlertChannel(gSavedSettings, "RadarAlertChannel");
U32 num_entering = mRadarEnterAlerts.size();
if (num_entering > 0)
{
mRadarFrameCount++;
S32 chan(RadarAlertChannel);
U32 num_this_pass = llmin(FSRADAR_MAX_AVATARS_PER_ALERT, num_entering);
std::string msg = llformat("%d,%d", mRadarFrameCount, num_this_pass);
U32 loop = 0;
while (loop < num_entering)
{
for (S32 i = 0; i < num_this_pass; i++)
{
msg = llformat("%s,%s", msg.c_str(), mRadarEnterAlerts[loop + i].asString().c_str());
}
LLMessageSystem* msgs = gMessageSystem;
msgs->newMessage("ScriptDialogReply");
msgs->nextBlock("AgentData");
msgs->addUUID("AgentID", gAgent.getID());
msgs->addUUID("SessionID", gAgent.getSessionID());
msgs->nextBlock("Data");
msgs->addUUID("ObjectID", gAgent.getID());
msgs->addS32("ChatChannel", chan);
msgs->addS32("ButtonIndex", 1);
msgs->addString("ButtonLabel", msg.c_str());
gAgent.sendReliableMessage();
loop += num_this_pass;
num_this_pass = llmin(FSRADAR_MAX_AVATARS_PER_ALERT, num_entering - loop);
msg = llformat("%d,%d", mRadarFrameCount, num_this_pass);
}
}
U32 num_leaving = mRadarLeaveAlerts.size();
if (num_leaving > 0)
{
mRadarFrameCount++;
S32 chan(RadarAlertChannel);
U32 num_this_pass = llmin(FSRADAR_MAX_AVATARS_PER_ALERT, num_leaving);
std::string msg = llformat("%d,-%d", mRadarFrameCount, llmin(FSRADAR_MAX_AVATARS_PER_ALERT, num_leaving));
U32 loop = 0;
while (loop < num_leaving)
{
for (S32 i = 0; i < num_this_pass; i++)
{
msg = llformat("%s,%s", msg.c_str(), mRadarLeaveAlerts[loop + i].asString().c_str());
}
LLMessageSystem* msgs = gMessageSystem;
msgs->newMessage("ScriptDialogReply");
msgs->nextBlock("AgentData");
msgs->addUUID("AgentID", gAgent.getID());
示例14: performQuery
void LLPanelDirLand::performQuery()
{
BOOL inc_pg = childGetValue("incpg").asBoolean();
BOOL inc_mature = childGetValue("incmature").asBoolean();
BOOL inc_adult = childGetValue("incadult").asBoolean();
if (!(inc_pg || inc_mature || inc_adult))
{
LLNotifyBox::showXml("NoContentToSearch");
return;
}
LLMessageSystem* msg = gMessageSystem;
setupNewSearch();
// We could change the UI to allow arbitrary combinations of these options
U32 search_type = ST_ALL;
const std::string& type = childGetValue("type").asString();
if(!type.empty())
{
if (FIND_AUCTION == type) search_type = ST_AUCTION;
else if(FIND_MAINLANDSALES == type) search_type = ST_MAINLAND;
else if(FIND_ESTATESALES == type) search_type = ST_ESTATE;
}
U32 query_flags = 0x0;
if (gAgent.wantsPGOnly()) query_flags |= DFQ_PG_SIMS_ONLY;
bool adult_enabled = gAgent.canAccessAdult();
bool mature_enabled = gAgent.canAccessMature();
if (inc_pg)
{
query_flags |= DFQ_INC_PG;
}
if (inc_mature && mature_enabled)
{
query_flags |= DFQ_INC_MATURE;
}
if (inc_adult && adult_enabled)
{
query_flags |= DFQ_INC_ADULT;
}
// Add old flags in case we are talking to an old dataserver
if (inc_pg && !inc_mature)
{
query_flags |= DFQ_PG_SIMS_ONLY;
}
if (!inc_pg && inc_mature)
{
query_flags |= DFQ_MATURE_SIMS_ONLY;
}
LLScrollListCtrl* list = getChild<LLScrollListCtrl>("results");
if (list)
{
std::string sort_name = list->getSortColumnName();
BOOL sort_asc = list->getSortAscending();
if (sort_name == "name")
{
query_flags |= DFQ_NAME_SORT;
}
else if (sort_name == "price")
{
query_flags |= DFQ_PRICE_SORT;
}
else if (sort_name == "per_meter")
{
query_flags |= DFQ_PER_METER_SORT;
}
else if (sort_name == "area")
{
query_flags |= DFQ_AREA_SORT;
}
if (sort_asc)
{
query_flags |= DFQ_SORT_ASC;
}
}
if (childGetValue("pricecheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_PRICE;
}
if (childGetValue("areacheck").asBoolean())
{
query_flags |= DFQ_LIMIT_BY_AREA;
}
msg->newMessage("DirLandQuery");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
//.........这里部分代码省略.........
示例15: LLResourceData
//.........这里部分代码省略.........
mReportType(report_type),
mObjectID(),
mScreenID(),
mAbuserID(),
mDeselectOnClose( FALSE ),
mPicking( FALSE),
mPosition(),
mCopyrightWarningSeen( FALSE ),
mResourceDatap(new LLResourceData())
{
if (report_type == BUG_REPORT)
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_bug.xml");
}
else
{
LLUICtrlFactory::getInstance()->buildFloater(this, "floater_report_abuse.xml");
}
childSetText("abuse_location_edit", gAgent.getSLURL() );
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0a
if (rlv_handler_t::isEnabled())
{
// Can't filter these since they get sent as part of the report so just hide them instead
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
{
childSetVisible("abuse_location_edit", false);
childSetVisible("pos_field", false);
}
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
childSetVisible("owner_name", false);
childSetVisible("abuser_name_edit", false);
}
}
// [/RLVa:KB]
LLButton* pick_btn = getChild<LLButton>("pick_btn");
if (pick_btn)
{
// XUI: Why aren't these in viewerart.ini?
pick_btn->setImages( std::string("UIImgFaceUUID"),
std::string("UIImgFaceSelectedUUID") );
childSetAction("pick_btn", onClickObjPicker, this);
}
if (report_type != BUG_REPORT)
{
// abuser name is selected from a list
LLLineEditor* le = getChild<LLLineEditor>("abuser_name_edit");
le->setEnabled( FALSE );
}
childSetAction("select_abuser", onClickSelectAbuser, this);
childSetAction("send_btn", onClickSend, this);
childSetAction("cancel_btn", onClickCancel, this);
enableControls(TRUE);
// convert the position to a string
LLVector3d pos = gAgent.getPositionGlobal();
LLViewerRegion *regionp = gAgent.getRegion();
if (regionp)
{
pos -= regionp->getOriginGlobal();
}
setPosBox(pos);
gReporterInstances.addData(report_type, this);
// Take a screenshot, but don't draw this floater.
setVisible(FALSE);
takeScreenshot();
setVisible(TRUE);
// Default text to be blank
childSetText("object_name", LLStringUtil::null);
childSetText("owner_name", LLStringUtil::null);
childSetFocus("summary_edit");
mDefaultSummary = childGetText("details_edit");
gDialogVisible = TRUE;
// only request details for abuse reports (not BUG reports)
if (report_type != BUG_REPORT)
{
// send a message and ask for information about this region -
// result comes back in processRegionInfo(..)
LLMessageSystem* msg = gMessageSystem;
msg->newMessage("RequestRegionInfo");
msg->nextBlock("AgentData");
msg->addUUID("AgentID", gAgent.getID());
msg->addUUID("SessionID", gAgent.getSessionID());
gAgent.sendReliableMessage();
};
}