本文整理汇总了C++中LLView::findChildView方法的典型用法代码示例。如果您正苦于以下问题:C++ LLView::findChildView方法的具体用法?C++ LLView::findChildView怎么用?C++ LLView::findChildView使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLView
的用法示例。
在下文中一共展示了LLView::findChildView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void UtilityBar::init()
{
LLView* rootView = LLUI::getRootView();
// Skip all this if we don't have a skin that needs it
if (!rootView->findChildView("chat_bar_utility_bar_stack"))
{
mEventTimer.stop();
return;
}
mParcelStreamPlayButton = rootView->findChild<LLButton>("utility_parcel_audio_stream_button");
mParcelMediaPlayButton = rootView->findChild<LLButton>("utility_parcel_media_button");
mTalkButton = rootView->findChild<LLButton>("utility_talk_button");
mAOInterfaceButton = rootView->findChild<LLButton>("show_ao_interface_button");
mVolumeControlsInterfaceButton = rootView->findChild<LLButton>("show_volume_controls_button");
mPTTButton = rootView->findChild<LLButton>("utility_push_to_talk_lock_button");
if (mParcelStreamPlayButton)
{
mParcelStreamPlayButton->setCommitCallback(boost::bind(&UtilityBar::onParcelStreamClicked, this));
}
if (mParcelMediaPlayButton)
{
mParcelMediaPlayButton->setCommitCallback(boost::bind(&UtilityBar::onParcelMediaClicked, this));
}
if (mTalkButton)
{
mTalkButton->setMouseDownCallback(boost::bind(&LLAgent::pressMicrophone, _2));
mTalkButton->setMouseUpCallback(boost::bind(&LLAgent::releaseMicrophone, _2));
}
mEventTimer.start();
}