本文整理汇总了C++中ControlSlider::getValue方法的典型用法代码示例。如果您正苦于以下问题:C++ ControlSlider::getValue方法的具体用法?C++ ControlSlider::getValue怎么用?C++ ControlSlider::getValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ControlSlider
的用法示例。
在下文中一共展示了ControlSlider::getValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sliderAction
void SchedulerTimeScale::sliderAction(Ref* sender, Control::EventType controlEvent)
{
ControlSlider* pSliderCtl = static_cast<ControlSlider*>(sender);
float scale;
scale = pSliderCtl->getValue();
Director::getInstance()->getScheduler()->setTimeScale(scale);
}
示例2: onSampleNumChanged
void ShaderBlur::onSampleNumChanged(Ref* sender, Control::EventType)
{
ControlSlider* slider = (ControlSlider*)sender;
_blurSprite->setBlurSampleNum(slider->getValue());
}
示例3: valueChanged
void ControlSliderTest::valueChanged(Object *sender, Control::EventType controlEvent)
{
ControlSlider* pSlider = (ControlSlider*)sender;
// Change value of label.
if(pSlider->getTag() == 1)
_displayValueLabel->setString(String::createWithFormat("Upper slider value = %.02f", pSlider->getValue())->getCString());
if(pSlider->getTag() == 2)
_displayValueLabel->setString(String::createWithFormat("Lower slider value = %.02f", pSlider->getValue())->getCString());
}