本文整理汇总了C++中LLParcel::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ LLParcel::getName方法的具体用法?C++ LLParcel::getName怎么用?C++ LLParcel::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLParcel
的用法示例。
在下文中一共展示了LLParcel::getName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onClickSetLocation
void LLPanelPickEdit::onClickSetLocation()
{
// Save location for later use.
setPosGlobal(gAgent.getPositionGlobal());
std::string parcel_name, region_name;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
mParcelId = parcel->getID();
parcel_name = parcel->getName();
}
LLViewerRegion* region = gAgent.getRegion();
if(region)
{
region_name = region->getName();
}
setPickLocation(createLocationText(getLocationNotice(), parcel_name, region_name, getPosGlobal()));
mLocationChanged = true;
enableSaveButton(TRUE);
}
示例2: onClickWLStatusButton
void KCWindlightInterface::onClickWLStatusButton()
{
//clear the last notification if its still open
if (mClearWLNotification && !mClearWLNotification->isRespondedTo())
{
LLSD response = mClearWLNotification->getResponseTemplate();
response["Ignore"] = true;
mClearWLNotification->respond(response);
}
if (WLset)
{
LLParcel *parcel = NULL;
parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
//TODO: this could be better
LLSD payload;
payload["local_id"] = parcel->getLocalID();
payload["land_owner"] = getOwnerID(parcel);
LLSD args;
args["PARCEL_NAME"] = parcel->getName();
mClearWLNotification = LLNotifications::instance().add("PhoenixWLClear", args, payload, boost::bind(&KCWindlightInterface::callbackParcelWLClear, this, _1, _2));
}
}
}
示例3: initNewClassified
// Fill in some reasonable defaults for a new classified.
void LLPanelClassified::initNewClassified()
{
// TODO: Don't generate this on the client.
mClassifiedID.generate();
mCreatorID = gAgent.getID();
mPosGlobal = gAgent.getPositionGlobal();
mPaidFor = FALSE;
// Try to fill in the current parcel
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
mNameEditor->setText(parcel->getName());
//mDescEditor->setText(parcel->getDesc());
mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
//mPriceEditor->setText("0");
mCategoryCombo->setCurrentByIndex(0);
}
mUpdateBtn->setLabel(getString("publish_txt"));
// simulate clicking the "location" button
LLPanelClassified::onClickSet(this);
}
示例4: initialize
void LLFloaterAuction::initialize()
{
mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
LLParcel* parcelp = mParcelp->getParcel();
if(parcelp && region && !parcelp->getForSale())
{
mParcelHost = region->getHost();
mParcelID = parcelp->getLocalID();
childSetText("parcel_text", parcelp->getName());
childEnable("snapshot_btn");
childEnable("ok_btn");
}
else
{
mParcelHost.invalidate();
if(parcelp && parcelp->getForSale())
{
childSetText("parcel_text", getString("already for sale"));
}
else
{
childSetText("parcel_text", LLStringUtil::null);
}
mParcelID = -1;
childSetEnabled("snapshot_btn", false);
childSetEnabled("ok_btn", false);
}
mImageID.setNull();
mImage = NULL;
}
示例5: onOpen
void LLPanelPickEdit::onOpen(const LLSD& key)
{
LLUUID pick_id = key["pick_id"];
mNeedData = true;
// creating new Pick
if(pick_id.isNull())
{
mNewPick = true;
setAvatarId(gAgent.getID());
resetData();
resetControls();
setPosGlobal(gAgent.getPositionGlobal());
LLUUID parcel_id = LLUUID::null, snapshot_id = LLUUID::null;
std::string pick_name, pick_desc, region_name;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if(parcel)
{
parcel_id = parcel->getID();
pick_name = parcel->getName();
pick_desc = parcel->getDesc();
snapshot_id = parcel->getSnapshotID();
}
LLViewerRegion* region = gAgent.getRegion();
if(region)
{
region_name = region->getName();
}
setParcelID(parcel_id);
childSetValue("pick_name", pick_name.empty() ? region_name : pick_name);
childSetValue("pick_desc", pick_desc);
setSnapshotId(snapshot_id);
setPickLocation(createLocationText(getLocationNotice(), pick_name, region_name, getPosGlobal()));
enableSaveButton(true);
}
// editing existing pick
else
{
mNewPick = false;
LLPanelPickInfo::onOpen(key);
enableSaveButton(false);
}
resetDirty();
}
示例6: initialize
void LLFloaterAuction::initialize()
{
mParcelUpdateCapUrl.clear();
mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
LLParcel* parcelp = mParcelp->getParcel();
if(parcelp && region && !parcelp->getForSale())
{
mParcelHost = region->getHost();
mParcelID = parcelp->getLocalID();
mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate");
childSetText("parcel_text", parcelp->getName());
childEnable("snapshot_btn");
childEnable("reset_parcel_btn");
childEnable("start_auction_btn");
LLPanelEstateInfo* panel = LLFloaterRegionInfo::getPanelEstate();
if (panel)
{ // Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
U32 estate_id = panel->getEstateID();
childSetEnabled("sell_to_anyone_btn", (estate_id == ESTATE_TEEN || estate_id == 0));
}
else
{ // Don't have the panel up, so don't know if we're on the teen grid or not. Default to enabling it
childEnable("sell_to_anyone_btn");
}
}
else
{
mParcelHost.invalidate();
if(parcelp && parcelp->getForSale())
{
childSetText("parcel_text", getString("already for sale"));
}
else
{
childSetText("parcel_text", LLStringUtil::null);
}
mParcelID = -1;
childSetEnabled("snapshot_btn", false);
childSetEnabled("reset_parcel_btn", false);
childSetEnabled("sell_to_anyone_btn", false);
childSetEnabled("start_auction_btn", false);
}
mImageID.setNull();
mImage = NULL;
}
示例7: initialize
void LLFloaterAuction::initialize()
{
mParcelUpdateCapUrl.clear();
mParcelp = LLViewerParcelMgr::getInstance()->getParcelSelection();
LLViewerRegion* region = LLViewerParcelMgr::getInstance()->getSelectionRegion();
LLParcel* parcelp = mParcelp->getParcel();
if(parcelp && region && !parcelp->getForSale())
{
mParcelHost = region->getHost();
mParcelID = parcelp->getLocalID();
mParcelUpdateCapUrl = region->getCapability("ParcelPropertiesUpdate");
getChild<LLUICtrl>("parcel_text")->setValue(parcelp->getName());
getChildView("snapshot_btn")->setEnabled(TRUE);
getChildView("reset_parcel_btn")->setEnabled(TRUE);
getChildView("start_auction_btn")->setEnabled(TRUE);
U32 estate_id = LLEstateInfoModel::instance().getID();
// Only enable "Sell to Anyone" on Teen grid or if we don't know the ID yet
getChildView("sell_to_anyone_btn")->setEnabled(estate_id == ESTATE_TEEN || estate_id == 0);
}
else
{
mParcelHost.invalidate();
if(parcelp && parcelp->getForSale())
{
getChild<LLUICtrl>("parcel_text")->setValue(getString("already for sale"));
}
else
{
getChild<LLUICtrl>("parcel_text")->setValue(LLStringUtil::null);
}
mParcelID = -1;
getChildView("snapshot_btn")->setEnabled(false);
getChildView("reset_parcel_btn")->setEnabled(false);
getChildView("sell_to_anyone_btn")->setEnabled(false);
getChildView("start_auction_btn")->setEnabled(false);
}
mImageID.setNull();
mImage = NULL;
}
示例8: initNewPick
// Fill in some reasonable defaults for a new pick.
void LLPanelPick::initNewPick()
{
mPickID.generate();
mCreatorID = gAgent.getID();
mPosGlobal = gAgent.getPositionGlobal();
// Try to fill in the current parcel
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if (parcel)
{
mNameEditor->setText(parcel->getName());
mDescEditor->setText(parcel->getDesc());
mSnapshotCtrl->setImageAssetID(parcel->getSnapshotID());
}
// Commit to the database, since we've got "new" values.
sendPickInfoUpdate();
}
示例9: makeClassifiedName
std::string LLPanelClassifiedEdit::makeClassifiedName()
{
std::string name;
LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
if(parcel)
{
name = parcel->getName();
}
if(!name.empty())
{
return name;
}
LLViewerRegion* region = gAgent.getRegion();
if(region)
{
name = region->getName();
}
return name;
}
示例10: filterMediaUrl
void LLViewerParcelMedia::filterMediaUrl(LLParcel* parcel)
{
LLParcel *currentparcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
llinfos << "Current media: "+sCurrentMedia.getMediaURL() << llendl;
llinfos << "New media: "+parcel->getMediaURL() << llendl;
// If there is no alert active, filter the media and flag media
// queue empty.
if (LLViewerParcelMedia::sMediaFilterAlertActive == false)
{
if (parcel->getMediaURL() == sCurrentMedia.getMediaURL())
{
llinfos << "Media URL filter: no active alert, same URL as previous: " +parcel->getMediaURL() << llendl;
sCurrentMedia = *parcel;
if (parcel->getName() == currentparcel->getName())
{
// Only play if we're still there.
llinfos << "Still on same parcel, playing." << llendl;
LLViewerParcelMedia::play(parcel);
}
sMediaQueueEmpty = true;
return;
}
llinfos << "Media URL filter: no active alert, filtering new URL: "+parcel->getMediaURL() << llendl;
sMediaQueueEmpty = true;
}
// If an alert is active, place the media in the media queue if not the same as previous request
else
{
if (sMediaQueueEmpty == false)
{
if (parcel->getMediaURL() != sQueuedMedia.getMediaURL())
{
llinfos << "Media URL filter: active alert, replacing current queued media URL with: "+sQueuedMedia.getMediaURL() << llendl;
sQueuedMedia = *parcel;
sMediaQueueEmpty = false;
}
return;
}
else
{
if (parcel->getMediaURL() != sCurrentMedia.getMediaURL())
{
llinfos << "Media URL filter: active alert, nothing queued, adding new queued media URL: "+sQueuedMedia.getMediaURL() << llendl;
sQueuedMedia = *parcel;
sMediaQueueEmpty = false;
}
return;
}
}
std::string media_url = parcel->getMediaURL();
if (media_url.empty())
{
llinfos << "Media URL on parcel " << parcel->getName() << " empty, allowing." << llendl;
// Treat it as allowed; it'll get stopped elsewhere
sCurrentMedia = *parcel;
if (parcel->getName() == currentparcel->getName())
{
// We haven't moved, so let it run.
llinfos << "Still on same parcel, playing." << llendl;
LLViewerParcelMedia::play(parcel);
}
return;
}
if (media_url == sMediaLastURL)
{
llinfos << "Media URL " << media_url << " hasn't changed, not filtering." << llendl;
// Don't bother the user if all we're doing is repeating
// ourselves.
if (sMediaLastActionPlay)
{
// We played it last time...so if we're still there...
llinfos << "Played last time, approving this time." << llendl;
sCurrentMedia = *parcel;
if (parcel->getName() == currentparcel->getName())
{
// The parcel hasn't changed (we didn't
// teleport, or move), so play it again, Sam.
llinfos << "Still on same parcel, playing." << llendl;
LLViewerParcelMedia::play(parcel);
}
}
return;
}
sMediaLastURL = media_url;
std::string media_action;
std::string domain = extractDomain(media_url);
for(S32 i = 0;i<(S32)sMediaFilterList.size();i++)
{
std::string listed_domain = sMediaFilterList[i]["domain"].asString();
if (domain.length() >= listed_domain.length())
{
size_t pos = domain.rfind(listed_domain);
if ((pos != std::string::npos) &&
(pos == domain.length()-listed_domain.length()))
//.........这里部分代码省略.........
示例11: refresh
//.........这里部分代码省略.........
BOOL no_scripts = FALSE;
if((region
&& ((region->getRegionFlags() & REGION_FLAGS_SKIP_SCRIPTS)
|| (region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS)))
|| (parcel && !parcel->getAllowOtherScripts()))
{
no_scripts = TRUE;
}
mBtnScripts->setVisible( no_scripts );
if (no_scripts)
{
// No scripts
childGetRect( "scripts", buttonRect );
r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight());
mBtnScripts->setRect(r);
x += buttonRect.getWidth();
}
BOOL no_region_push = (region && region->getRestrictPushObject());
BOOL no_push = no_region_push || (parcel && parcel->getRestrictPushObject());
mBtnPush->setVisible( no_push );
if (no_push)
{
childGetRect( "restrictpush", buttonRect );
// No Push Zone
r.setOriginAndSize( x, y-GRAPHIC_FUDGE, buttonRect.getWidth(), buttonRect.getHeight());
mBtnPush->setRect(r);
x += buttonRect.getWidth();
}
BOOL canBuyLand = parcel
&& !parcel->isPublic()
&& gParcelMgr->canAgentBuyParcel(parcel, false);
mBtnBuyLand->setVisible(canBuyLand);
if (canBuyLand)
{
childGetRect( "buyland", buttonRect );
r.setOriginAndSize( x, y, buttonRect.getWidth(), buttonRect.getHeight());
mBtnBuyLand->setRect(r);
x += buttonRect.getWidth();
}
LLString location_name;
if (region)
{
const LLVector3& agent_pos_region = gAgent.getPositionAgent();
S32 pos_x = lltrunc( agent_pos_region.mV[VX] );
S32 pos_y = lltrunc( agent_pos_region.mV[VY] );
S32 pos_z = lltrunc( agent_pos_region.mV[VZ] );
// Round the numbers based on the velocity
LLVector3 agent_velocity = gAgent.getVelocity();
F32 velocity_mag_sq = agent_velocity.magVecSquared();
const F32 FLY_CUTOFF = 6.f; // meters/sec
const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF;
const F32 WALK_CUTOFF = 1.5f; // meters/sec
const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF;
if (velocity_mag_sq > FLY_CUTOFF_SQ)
{
pos_x -= pos_x % 4;
pos_y -= pos_y % 4;
}
else if (velocity_mag_sq > WALK_CUTOFF_SQ)
{
pos_x -= pos_x % 2;
pos_y -= pos_y % 2;
}
if (parcel && parcel->getName())
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s) - %s",
pos_x, pos_y, pos_z,
region->getSimAccessString(),
parcel->getName());
}
else
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s)",
pos_x, pos_y, pos_z,
region->getSimAccessString());
}
}
else
{
// no region
location_name = "(Unknown)";
}
mTextParcelName->setText(location_name);
// Adjust region name and parcel name
x += 4;
const S32 PARCEL_RIGHT = llmin(mTextTime->getRect().mLeft, mTextParcelName->getTextPixelWidth() + x + 5);
r.set(x+4, mRect.getHeight() - 2, PARCEL_RIGHT, 0);
mTextParcelName->setRect(r);
}
示例12: refreshUI
void LLFloaterSellLandUI::refreshUI()
{
LLParcel* parcelp = mParcelSelection->getParcel();
if (!parcelp) return;
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image");
snapshot->setImageAssetID(mParcelSnapshot);
getChild<LLUICtrl>("info_parcel")->setValue(parcelp->getName());
getChild<LLUICtrl>("info_size")->setTextArg("[AREA]", llformat("%d", mParcelActualArea));
std::string price_str = getChild<LLUICtrl>("price")->getValue().asString();
bool valid_price = false;
valid_price = (price_str != "") && LLTextValidate::validateNonNegativeS32(utf8str_to_wstring(price_str));
if (valid_price && mParcelActualArea > 0)
{
F32 per_meter_price = 0;
per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea);
std::string type_currency = LLGridManager::getInstance()->getCurrency();
getChild<LLUICtrl>("price_per_m")->setTextArg("[CUR]", type_currency);
getChild<LLUICtrl>("price_per_m")->setTextArg("[PER_METER]", llformat("%0.2f", per_meter_price));
getChildView("price_per_m")->setVisible(TRUE);
setBadge("step_price", BADGE_OK);
}
else
{
getChildView("price_per_m")->setVisible(FALSE);
if ("" == price_str)
{
setBadge("step_price", BADGE_NOTE);
}
else
{
setBadge("step_price", BADGE_ERROR);
}
}
if (mSellToBuyer)
{
getChild<LLUICtrl>("sell_to")->setValue("user");
getChildView("sell_to_agent")->setVisible(TRUE);
getChildView("sell_to_select_agent")->setVisible(TRUE);
}
else
{
if (mChoseSellTo)
{
getChild<LLUICtrl>("sell_to")->setValue("anyone");
}
else
{
getChild<LLUICtrl>("sell_to")->setValue("select");
}
getChildView("sell_to_agent")->setVisible(FALSE);
getChildView("sell_to_select_agent")->setVisible(FALSE);
}
// Must select Sell To: Anybody, or User (with a specified username)
std::string sell_to = getChild<LLUICtrl>("sell_to")->getValue().asString();
bool valid_sell_to = "select" != sell_to &&
("user" != sell_to || mAuthorizedBuyer.notNull());
if (!valid_sell_to)
{
setBadge("step_sell_to", BADGE_NOTE);
}
else
{
setBadge("step_sell_to", BADGE_OK);
}
bool valid_sell_objects = ("none" != getChild<LLUICtrl>("sell_objects")->getValue().asString());
if (!valid_sell_objects)
{
setBadge("step_sell_objects", BADGE_NOTE);
}
else
{
setBadge("step_sell_objects", BADGE_OK);
}
if (valid_sell_to && valid_price && valid_sell_objects)
{
getChildView("sell_btn")->setEnabled(TRUE);
}
else
{
getChildView("sell_btn")->setEnabled(FALSE);
}
}
示例13: refreshUI
void LLFloaterSellLandUI::refreshUI()
{
LLParcel* parcelp = mParcelSelection->getParcel();
if (!parcelp) return;
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image");
if (snapshot)
{
snapshot->setImageAssetID(mParcelSnapshot);
}
childSetText("info_parcel", parcelp->getName());
childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea));
childSetTextArg("price_ld", "[CURRENCY]", gHippoGridManager->getConnectedGrid()->getCurrencySymbol());
std::string price_str = childGetValue("price").asString();
bool valid_price = false;
valid_price = (price_str != "") && LLLineEditor::prevalidateNonNegativeS32(utf8str_to_wstring(price_str));
if (valid_price && mParcelActualArea > 0)
{
F32 per_meter_price = 0;
per_meter_price = F32(mParcelPrice) / F32(mParcelActualArea);
childSetTextArg("price_per_m", "[PER_METER]", llformat("%0.2f", per_meter_price));
childShow("price_per_m");
setBadge("step_price", BADGE_OK);
}
else
{
childHide("price_per_m");
if ("" == price_str)
{
setBadge("step_price", BADGE_NOTE);
}
else
{
setBadge("step_price", BADGE_ERROR);
}
}
if (mSellToBuyer)
{
childSetValue("sell_to", "user");
childShow("sell_to_agent");
childShow("sell_to_select_agent");
}
else
{
if (mChoseSellTo)
{
childSetValue("sell_to", "anyone");
}
else
{
childSetValue("sell_to", "select");
}
childHide("sell_to_agent");
childHide("sell_to_select_agent");
}
// Must select Sell To: Anybody, or User (with a specified username)
std::string sell_to = childGetValue("sell_to").asString();
bool valid_sell_to = "select" != sell_to &&
("user" != sell_to || mAuthorizedBuyer.notNull());
if (!valid_sell_to)
{
setBadge("step_sell_to", BADGE_NOTE);
}
else
{
setBadge("step_sell_to", BADGE_OK);
}
bool valid_sell_objects = ("none" != childGetValue("sell_objects").asString());
if (!valid_sell_objects)
{
setBadge("step_sell_objects", BADGE_NOTE);
}
else
{
setBadge("step_sell_objects", BADGE_OK);
}
if (valid_sell_to && valid_price && valid_sell_objects)
{
childEnable("sell_btn");
}
else
{
childDisable("sell_btn");
}
}
示例14: refresh
//.........这里部分代码省略.........
if (region)
{
const LLVector3& agent_pos_region = gAgent.getPositionAgent();
S32 pos_x = lltrunc( agent_pos_region.mV[VX] );
S32 pos_y = lltrunc( agent_pos_region.mV[VY] );
S32 pos_z = lltrunc( agent_pos_region.mV[VZ] );
// Round the numbers based on the velocity
LLVector3 agent_velocity = gAgent.getVelocity();
F32 velocity_mag_sq = agent_velocity.magVecSquared();
const F32 FLY_CUTOFF = 6.f; // meters/sec
const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF;
const F32 WALK_CUTOFF = 1.5f; // meters/sec
const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF;
if (velocity_mag_sq > FLY_CUTOFF_SQ)
{
pos_x -= pos_x % 4;
pos_y -= pos_y % 4;
}
else if (velocity_mag_sq > WALK_CUTOFF_SQ)
{
pos_x -= pos_x % 2;
pos_y -= pos_y % 2;
}
mRegionDetails.mTime = mTextTime->getText();
mRegionDetails.mBalance = mBalance;
mRegionDetails.mAccessString = region->getSimAccessString();
mRegionDetails.mPing = region->getNetDetailsForLCD();
if (parcel)
{
location_name = region->getName()
+ llformat(" %d, %d, %d (%s) - %s",
pos_x, pos_y, pos_z,
region->getSimAccessString().c_str(),
parcel->getName().c_str());
// keep these around for the LCD to use
mRegionDetails.mRegionName = region->getName();
mRegionDetails.mParcelName = parcel->getName();
mRegionDetails.mX = pos_x;
mRegionDetails.mY = pos_y;
mRegionDetails.mZ = pos_z;
mRegionDetails.mArea = parcel->getArea();
mRegionDetails.mForSale = parcel->getForSale();
mRegionDetails.mTraffic = LLViewerParcelMgr::getInstance()->getDwelling();
if (parcel->isPublic())
{
mRegionDetails.mOwner = "Public";
}
else
{
if (parcel->getIsGroupOwned())
{
if(!parcel->getGroupID().isNull())
{
gCacheName->getGroupName(parcel->getGroupID(), mRegionDetails.mOwner);
}
else
{
mRegionDetails.mOwner = "Group Owned";
}
示例15: ChatCommand
bool KCWindlightInterface::ChatCommand(std::string message, std::string from_name, LLUUID source_id, LLUUID owner_id)
{
boost::cmatch match;
const boost::regex prefix_exp("^\\)\\*\\((.*)");
if(boost::regex_match(message.c_str(), match, prefix_exp))
{
std::string data(match[1].first, match[1].second);
//TODO: expand these or good as is?
/*const boost::regex setWLpreset_exp("^setWLpreset\\|(.*)");
const boost::regex setWWpreset_exp("^setWWpreset\\|(.*)");
if(boost::regex_match(data.c_str(), match, setWLpreset_exp))
{
llinfos << "got setWLpreset : " << match[1] << llendl;
LLWLParamManager::instance()->mAnimator.mIsRunning = false;
LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;
LLWLParamManager::instance()->loadPreset(match[1]);
return true;
}
else if(boost::regex_match(data.c_str(), match, setWWpreset_exp))
{
llinfos << "got setWWpreset : " << match[1] << llendl;
LLWaterParamManager::instance()->loadPreset(match[1], true);
return true;
}
else
{*/
//TODO: add save settings for reuse instead of just clearing on parcel change
//TODO: add support for region wide settings on non-mainland
//TODO: add support for targeting specfic users
//TODO: add support for custom settings via notecards or something
//TODO: improved data processing, possibly just use LLSD as input instead
boost::smatch match2;
const boost::regex Parcel_exp("^(Parcel),WLPreset=\"([^\"\\r\\n]+)\"(,WWPreset=\"([^\"\\r\\n]+)\")?$");
//([\\w]{8}-[\\w]{4}-[\\w]{4}-[\\w]{4}-[\\w]{12})
if(boost::regex_search(data, match2, Parcel_exp))
{
if (SetDialogVisible) //TODO: handle this better
return true;
if (match2[1]=="Parcel")
{
llinfos << "Got Parcel WL : " << match[2] << llendl;
LLParcel *parcel = LLViewerParcelMgr::getInstance()->getAgentParcel();
LLSD payload;
payload["local_id"] = parcel->getLocalID();
payload["land_owner"] = parcel->getOwnerID();
payload["wlpreset"] = std::string(match2[2].first, match2[2].second);
payload["wwpreset"] = std::string(match2[3].first, match2[3].second);
LLSD args;
args["PARCEL_NAME"] = parcel->getName();
LLNotifications::instance().add("PhoenixWL", args, payload, boost::bind(&KCWindlightInterface::callbackParcelWL, this, _1, _2));
SetDialogVisible = true;
}
return true;
}
/*}*/
}
return false;
}