Exemplo n.º 1
0
void LLFloaterLandHoldings::buttonCore(S32 which)
{
	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("parcel list");
	if (!list) return;

	S32 index = list->getFirstSelectedIndex();
	if (index < 0) return;

	// hidden is always last column
	std::string location = list->getSelectedItemLabel(list->getNumColumns()-1);

	F32 global_x = 0.f;
	F32 global_y = 0.f;
	sscanf(location.c_str(), "%f %f", &global_x, &global_y);

	// Hack: Use the agent's z-height
	F64 global_z = gAgent.getPositionGlobal().mdV[VZ];

	LLVector3d pos_global(global_x, global_y, global_z);

	switch(which)
	{
	case 0:
		gAgent.teleportViaLocation(pos_global);
		gFloaterWorldMap->trackLocation(pos_global);
		break;
	case 1:
		gFloaterWorldMap->trackLocation(pos_global);
		LLFloaterWorldMap::show(NULL, TRUE);
		break;
	default:
		break;
	}
}
Exemplo n.º 2
0
// reacts to user clicking a valid field in the local scroll list.
void LLFloaterTexturePicker::onLocalScrollCommit()
{
	LLUUID id(mLocalScrollCtrl->getSelectedItemLabel(LOCALLIST_COL_ID));

	mOwner->setImageAssetID(id);
	if (childGetValue("apply_immediate_check").asBoolean())
		mOwner->onFloaterCommit(LLTextureCtrl::TEXTURE_CHANGE, id); // calls an overridden function.
}