当前位置: 首页>>代码示例>>C++>>正文


C++ LLFloaterSellLandUI类代码示例

本文整理汇总了C++中LLFloaterSellLandUI的典型用法代码示例。如果您正苦于以下问题:C++ LLFloaterSellLandUI类的具体用法?C++ LLFloaterSellLandUI怎么用?C++ LLFloaterSellLandUI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了LLFloaterSellLandUI类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onChangeValue

// static
void LLFloaterSellLandUI::onChangeValue(LLUICtrl *ctrl, void *userdata)
{
	LLFloaterSellLandUI *self = (LLFloaterSellLandUI *)userdata;

	std::string sell_to = self->getChild<LLUICtrl>("sell_to")->getValue().asString();

	if (sell_to == "user")
	{
		self->mChoseSellTo = true;
		self->mSellToBuyer = true;
		if (self->mAuthorizedBuyer.isNull())
		{
			self->doSelectAgent();
		}
	}
	else if (sell_to == "anyone")
	{
		self->mChoseSellTo = true;
		self->mSellToBuyer = false;
	}

	self->mParcelPrice = self->getChild<LLUICtrl>("price")->getValue();

	if ("yes" == self->getChild<LLUICtrl>("sell_objects")->getValue().asString())
	{
		self->mParcelSoldWithObjects = true;
	}
	else
	{
		self->mParcelSoldWithObjects = false;
	}

	self->refreshUI();
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:35,代码来源:llfloatersellland.cpp

示例2: sellLand

// static
void LLFloaterSellLand::sellLand(
	LLViewerRegion* region, LLParcelSelectionHandle parcel)
{
	LLFloaterSellLandUI* ui = LLFloaterSellLandUI::soleInstance(true);
	if (ui->setParcel(region, parcel))
	{
		ui->open();		/* Flawfinder: ignore */
	}
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:10,代码来源:llfloatersellland.cpp

示例3: llformat

// static
void LLFloaterSellLandUI::doSellLand(void *userdata)
{
	LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata;

	LLParcel* parcel = self->mParcelSelection->getParcel();

	// Do a confirmation
	S32 sale_price = self->childGetValue("price");
	S32 area = parcel->getArea();
	std::string authorizedBuyerName = LLTrans::getString("Anyone");
	bool sell_to_anyone = true;
	if ("user" == self->childGetValue("sell_to").asString())
	{
		authorizedBuyerName = self->childGetText("sell_to_agent");
		sell_to_anyone = false;
	}

	// must sell to someone if indicating sale to anyone
	if (!parcel->getForSale() 
		&& (sale_price == 0) 
		&& sell_to_anyone)
	{
		LLNotificationsUtil::add("SalePriceRestriction");
		return;
	}

	LLSD args;
	args["LAND_SIZE"] = llformat("%d",area);
	args["SALE_PRICE"] = llformat("%d",sale_price);
	args["NAME"] = authorizedBuyerName;

	LLNotification::Params params("ConfirmLandSaleChange");
	params.substitutions(args)
		.functor(boost::bind(&LLFloaterSellLandUI::onConfirmSale, self, _1, _2));

	if (sell_to_anyone)
	{
		params.name("ConfirmLandSaleToAnyoneChange");
	}
	
	if (parcel->getForSale())
	{
		// parcel already for sale, so ignore this question
		LLNotifications::instance().forceResponse(params, -1);
	}
	else
	{
		// ask away
		LLNotifications::instance().add(params);
	}

}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:53,代码来源:llfloatersellland.cpp

示例4:

void LLFloaterSellLandUI::SelectionObserver::changed()
{
	LLFloaterSellLandUI* ui = LLFloaterSellLandUI::soleInstance(false);
	if (ui)
	{
		if (LLViewerParcelMgr::getInstance()->selectionEmpty())
		{
			ui->close();
		}
		else {
			ui->setParcel(
				LLViewerParcelMgr::getInstance()->getSelectionRegion(),
				LLViewerParcelMgr::getInstance()->getParcelSelection());
		}
	}
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:16,代码来源:llfloatersellland.cpp

示例5: callbackAvatarPick

// static
void LLFloaterSellLandUI::callbackAvatarPick(const std::vector<std::string>& names, const std::vector<LLUUID>& ids, void* data)
{	
	LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)data;
	LLParcel* parcel = floaterp->mParcelSelection->getParcel();

	if (names.empty() || ids.empty()) return;
	
	LLUUID id = ids[0];
	parcel->setAuthorizedBuyerID(id);

	floaterp->mAuthorizedBuyer = ids[0];

	floaterp->childSetText("sell_to_agent", names[0]);

	floaterp->refreshUI();
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:17,代码来源:llfloatersellland.cpp

示例6: LLFloaterSellLandUI

// static
LLFloaterSellLandUI* LLFloaterSellLandUI::soleInstance(bool createIfNeeded)
{
	if (!sInstance  &&  createIfNeeded)
	{
		sInstance = new LLFloaterSellLandUI();

		LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_sell_land.xml");
		sInstance->center();
	}
	

	static SelectionObserver* parcelSelectionObserver = NULL;
	if (!parcelSelectionObserver)
	{
		parcelSelectionObserver = new SelectionObserver;
		LLViewerParcelMgr::getInstance()->addObserver(parcelSelectionObserver);
	}

	return sInstance;
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:21,代码来源:llfloatersellland.cpp

示例7: doCancel

// static
void LLFloaterSellLandUI::doCancel(void *userdata)
{
	LLFloaterSellLandUI* self = (LLFloaterSellLandUI*)userdata;
	self->closeFloater();
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:6,代码来源:llfloatersellland.cpp

示例8: sellLand

// static
void LLFloaterSellLand::sellLand(
	LLViewerRegion* region, LLParcelSelectionHandle parcel)
{
	LLFloaterSellLandUI* ui = LLFloaterReg::showTypedInstance<LLFloaterSellLandUI>("sell_land");
	ui->setParcel(region, parcel);
}
开发者ID:DarkSpyro003,项目名称:DarkSpyros_Viewer,代码行数:7,代码来源:llfloatersellland.cpp

示例9: doSelectAgent

// static
void LLFloaterSellLandUI::doSelectAgent(void *userdata)
{
	LLFloaterSellLandUI* floaterp = (LLFloaterSellLandUI*)userdata;
	// grandparent is a floater, in order to set up dependency
	floaterp->addDependentFloater(LLFloaterAvatarPicker::show(boost::bind(&LLFloaterSellLandUI::callbackAvatarPick, floaterp, _1, _2), FALSE, TRUE));
}
开发者ID:1234-,项目名称:SingularityViewer,代码行数:7,代码来源:llfloatersellland.cpp


注:本文中的LLFloaterSellLandUI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。