コード例 #1
0
// static 
void LLFloaterWorldMap::onAvatarComboCommit( LLUICtrl* ctrl, void* userdata )
{
	LLFloaterWorldMap* self = gFloaterWorldMap;
	if( !self || self->mIsClosing )
	{
		return;
	}

	LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("friend combo");
	if (!list) return;

	const LLUUID& new_avatar_id = list->getCurrentID();
	if (new_avatar_id.notNull())
	{
		std::string name;
		LLComboBox* combo = gFloaterWorldMap->getChild<LLComboBox>("friend combo");
		if (combo) name = combo->getSimple();
		self->trackAvatar(new_avatar_id, name);
		onShowTargetBtn(self);
	}
	else
	{	// Reset to user postion if nothing is tracked
		self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
	}
}
コード例 #2
0
// static
void LLFloaterGesture::onClickInventory(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	LLInventoryView* inv = LLInventoryView::showAgentInventory();
	if (!inv) return;
	inv->getPanel()->setSelection(item_id, TRUE);
}
コード例 #3
0
// static 
void LLFloaterWorldMap::onLandmarkComboCommit( LLUICtrl* ctrl, void* userdata )
{
	LLFloaterWorldMap* self = gFloaterWorldMap;

	if( !self || self->mIsClosing )
	{
		return;
	}

	LLCtrlListInterface *list = gFloaterWorldMap->childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID asset_id;
	LLUUID item_id = list->getCurrentID();

	LLTracker::stopTracking(NULL);

	//RN: stopTracking() clears current combobox selection, need to reassert it here
	list->setCurrentByID(item_id);

	if( item_id.isNull() )
	{
	}
	else if( item_id == sHomeID )
	{
		asset_id = sHomeID;
	}
	else
	{
		LLInventoryItem* item = gInventory.getItem( item_id );
		if( item )
		{
			asset_id = item->getAssetUUID();
		}
		else
		{
			// Something went wrong, so revert to a safe value.
			item_id.setNull();
		}
	}
	
	self->trackLandmark( item_id);
	onShowTargetBtn(self);

	// Reset to user postion if nothing is tracked
	self->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
}
コード例 #4
0
// static
void LLFloaterGesture::onClickPlay(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	if (gGestureManager.isGesturePlaying(item_id))
	{
		gGestureManager.stopGesture(item_id);
	}
	else
	{
		gGestureManager.playGesture(item_id);
	}
}
コード例 #5
0
// static
void LLPanelDirBrowser::onCommitList(LLUICtrl* ctrl, void* data)
{
	LLPanelDirBrowser* self = (LLPanelDirBrowser*)data;
	LLCtrlListInterface *list = self->childGetListInterface("results");
	if (!list) return;

	// Start with everyone invisible
	if (self->mFloaterDirectory)
	{
		self->mFloaterDirectory->hideAllDetailPanels();
	}
	
	if (FALSE == list->getCanSelect())
	{
		return;
	}

	std::string id_str = self->childGetValue("results").asString();
	if (id_str.empty())
	{
		return;
	}

	LLSD item_id = list->getCurrentID();
	S32 type = self->mResultsContents[id_str]["type"];
	if (type == EVENT_CODE)
	{
		// all but events use the UUID above
		item_id = self->mResultsContents[id_str]["event_id"];
	}
	//std::string name = self->mResultsContents[id_str]["name"].asString();
	self->showDetailPanel(type, item_id);

	if (type == FOR_SALE_CODE)
	{
		std::string land_type = self->mResultsContents[id_str]["landtype"].asString();
		if (self->mFloaterDirectory && self->mFloaterDirectory->mPanelPlaceSmallp)
		{
			self->mFloaterDirectory->mPanelPlaceSmallp->setLandTypeString(land_type);
		}	
	}
}
コード例 #6
0
void LLFloaterWorldMap::onLandmarkComboPrearrange( )
{
	if( mIsClosing )
	{
		return;
	}

	LLCtrlListInterface *list = childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID current_choice = list->getCurrentID();

	buildLandmarkIDLists();

	if( current_choice.isNull() || !list->setCurrentByID( current_choice ) )
	{
		LLTracker::stopTracking(NULL);
	}

}
コード例 #7
0
// static
void LLFloaterGesture::onClickEdit(void* data)
{
	LLFloaterGesture* self = (LLFloaterGesture*)data;

	LLCtrlListInterface *list = self->childGetListInterface("gesture_list");
	if (!list) return;
	const LLUUID& item_id = list->getCurrentID();

	LLInventoryItem* item = gInventory.getItem(item_id);
	if (!item) return;

	std::string title("Gesture: ");
	title.append(item->getName());

	LLPreviewGesture* previewp = LLPreviewGesture::show(title, item_id, LLUUID::null);
	if (!previewp->getHost())
	{
		previewp->setRect(gFloaterView->findNeighboringPosition(self, previewp));
	}
}
コード例 #8
0
// static 
void LLFloaterWorldMap::onLandmarkComboPrearrange(LLUICtrl* ctrl, void* userdata)
{
	LLFloaterWorldMap* self = gFloaterWorldMap;
	if (!self || self->mIsClosing)
	{
		return;
	}

	LLCtrlListInterface *list = self->childGetListInterface("landmark combo");
	if (!list) return;

	LLUUID current_choice = list->getCurrentID();

	gFloaterWorldMap->buildLandmarkIDLists();

	if (current_choice.isNull() || !list->setCurrentByID(current_choice))
	{
		LLTracker::stopTracking(NULL);
	}
}
コード例 #9
0
void LLFloaterWorldMap::onAvatarComboCommit()
{
	if( mIsClosing )
	{
		return;
	}
	
	LLCtrlListInterface *list = mListFriendCombo;
	if (!list) return;
	
	const LLUUID& new_avatar_id = list->getCurrentID();
	if (new_avatar_id.notNull())
	{
		std::string name;
		LLComboBox* combo = getChild<LLComboBox>("friend combo");
		if (combo) name = combo->getSimple();
		trackAvatar(new_avatar_id, name);
		onShowTargetBtn();
	}
	else
	{	// Reset to user postion if nothing is tracked
		mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
	}
}