本文整理汇总了C++中LLCtrlListInterface::getCurrentID方法的典型用法代码示例。如果您正苦于以下问题:C++ LLCtrlListInterface::getCurrentID方法的具体用法?C++ LLCtrlListInterface::getCurrentID怎么用?C++ LLCtrlListInterface::getCurrentID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLCtrlListInterface
的用法示例。
在下文中一共展示了LLCtrlListInterface::getCurrentID方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onAvatarComboCommit
// 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: onClickInventory
// 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: onLandmarkComboCommit
// 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: onClickPlay
// 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: onCommitList
// 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: onLandmarkComboPrearrange
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: onClickEdit
// 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: onLandmarkComboPrearrange
// 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);
}
}