コード例 #1
0
void LLNavigationBar::onSearchCommit()
{
	std::string search_query = mSearchComboBox->getSimple();
	if(!search_query.empty())
	{
		LLSearchHistory::getInstance()->addEntry(search_query);
	}
	invokeSearch(search_query);	
}
コード例 #2
0
void LLNavigationBar::onRegionNameResponse(
		std::string typed_location,
		std::string region_name,
		LLVector3 local_coords,
		U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
{
	// Invalid location?
	if (!region_handle)
	{
		invokeSearch(typed_location);
		return;
	}

	// Teleport to the location.
	LLVector3d region_pos = from_region_handle(region_handle);
	LLVector3d global_pos = region_pos + (LLVector3d) local_coords;

	llinfos << "Teleporting to: " << LLSLURL::buildSLURLfromPosGlobal(region_name,	global_pos, false)  << llendl;
	gAgent.teleportViaLocation(global_pos);
}
コード例 #3
0
void LLNavigationBar::onRegionNameResponse(
		std::string typed_location,
		std::string region_name,
		LLVector3 local_coords,
		U64 region_handle, const std::string& url, const LLUUID& snapshot_id, bool teleport)
{
	// Invalid location?
	if (region_handle)
	{
		// Teleport to the location.
		LLVector3d region_pos = from_region_handle(region_handle);
		LLVector3d global_pos = region_pos + (LLVector3d) local_coords;

		llinfos << "Teleporting to: " << LLSLURL(region_name,	global_pos).getSLURLString()  << llendl;
		gAgent.teleportViaLocation(global_pos);
	}
	else if (gSavedSettings.getBOOL("SearchFromAddressBar"))
	{
		invokeSearch(typed_location);
	}
}