本文整理汇总了C++中LLSliderCtrl::setEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSliderCtrl::setEnabled方法的具体用法?C++ LLSliderCtrl::setEnabled怎么用?C++ LLSliderCtrl::setEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LLSliderCtrl
的用法示例。
在下文中一共展示了LLSliderCtrl::setEnabled方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: onCloudScrollYToggled
void LLFloaterEditSky::onCloudScrollYToggled(LLUICtrl* ctrl)
{
LLWLParamManager::getInstance()->mAnimator.deactivate();
LLCheckBoxCtrl* cb_ctrl = static_cast<LLCheckBoxCtrl*>(ctrl);
bool lock = cb_ctrl->get();
LLWLParamManager::getInstance()->mCurParams.setEnableCloudScrollY(!lock);
LLSliderCtrl* sldr = getChild<LLSliderCtrl>("WLCloudScrollY");
if (cb_ctrl->get())
{
sldr->setEnabled(false);
}
else
{
sldr->setEnabled(true);
}
}
示例2: LLScrollingPanel
LLScrollingPanelParamBase::LLScrollingPanelParamBase( const std::string& name,
LLViewerJointMesh* mesh, LLViewerVisualParam* param, BOOL allow_modify, LLWearable* wearable, bool bVisualHint, LLRect rect )
: LLScrollingPanel( name, rect ),
mParam(param),
mAllowModify(allow_modify),
mWearable(wearable)
{
LLUICtrlFactory::getInstance()->buildPanel(this, "panel_scrolling_param.xml");
//Set up the slider
LLSliderCtrl *slider = getChild<LLSliderCtrl>("param slider");
//Kill everything that isn't the slider...
if(!bVisualHint)
{
child_list_t to_remove;
child_list_t::const_iterator it;
for (it = getChildList()->begin(); it != getChildList()->end(); it++)
{
if ((*it) != slider && (*it)->getName() != "panel border")
{
to_remove.push_back(*it);
}
}
for (it = to_remove.begin(); it != to_remove.end(); it++)
{
removeChild(*it);
delete (*it);
}
slider->translate(0,/*PARAM_HINT_HEIGHT*/128);
reshape(getRect().getWidth(),getRect().getHeight()-128);
}
slider->setValue(weightToPercent(param->getWeight()));
slider->setLabelArg("[DESC]", param->getDisplayName());
slider->setEnabled(mAllowModify);
slider->setCommitCallback(boost::bind(&LLScrollingPanelParamBase::onSliderMoved, this, _1));
setVisible(FALSE);
setBorderVisible( FALSE );
}