当前位置: 首页>>代码示例>>C++>>正文


C++ LLSliderCtrl::getValueF32方法代码示例

本文整理汇总了C++中LLSliderCtrl::getValueF32方法的典型用法代码示例。如果您正苦于以下问题:C++ LLSliderCtrl::getValueF32方法的具体用法?C++ LLSliderCtrl::getValueF32怎么用?C++ LLSliderCtrl::getValueF32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LLSliderCtrl的用法示例。


在下文中一共展示了LLSliderCtrl::getValueF32方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onFloatControlMoved

void LLFloaterWater::onFloatControlMoved(LLUICtrl* ctrl, WaterFloatControl* floatControl)
{
	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	floatControl->mX = sldrCtrl->getValueF32() / floatControl->mMult;

	floatControl->update(LLWaterParamManager::instance()->mCurParams);
	LLWaterParamManager::instance()->propagateParameters();
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:9,代码来源:llfloaterwater.cpp

示例2: onCloudScrollYMoved

void LLFloaterWindLight::onCloudScrollYMoved(LLUICtrl* ctrl, void* userData)
{
	deactivateAnimator();

	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	// *HACK  all cloud scrolling is off by an additive of 10. 
	LLWLParamManager::instance()->mCurParams.setCloudScrollY(sldrCtrl->getValueF32() + 10.0f);
}
开发者ID:Barosonix,项目名称:AstraViewer,代码行数:9,代码来源:llfloaterwindlight.cpp

示例3: onChangeQuality

void wlfPanel_AdvSettings::onChangeQuality(LLUICtrl *ctrl, void *data)
{
	LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);

	if(sldr == NULL)
		return;

	U32 set = (U32)sldr->getValueF32();
	LLFeatureManager::getInstance()->setGraphicsLevel(set, true);
}
开发者ID:MattoDestiny,项目名称:Zero-One,代码行数:10,代码来源:wlfPanel_AdvSettings.cpp

示例4: onColorControlAMoved

void LLFloaterWater::onColorControlAMoved(LLUICtrl* ctrl, WaterColorControl* colorControl)
{
	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	colorControl->mA = sldrCtrl->getValueF32();

	colorControl->update(LLWaterParamManager::instance()->mCurParams);

	LLWaterParamManager::instance()->propagateParameters();
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:10,代码来源:llfloaterwater.cpp

示例5: onFloatControlMoved

void LLFloaterWindLight::onFloatControlMoved(LLUICtrl* ctrl, WLFloatControl* floatControl)
{
	deactivateAnimator();

	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	floatControl->x = sldrCtrl->getValueF32() / floatControl->mult;

	floatControl->update(LLWLParamManager::instance()->mCurParams);
	LLWLParamManager::instance()->propagateParameters();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:11,代码来源:llfloaterwindlight.cpp

示例6:

// vector control callbacks
void LLFloaterWater::onVector2ControlYMoved(LLUICtrl* ctrl, void* userData)
{
	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);
	WaterVector2Control * vectorControl = static_cast<WaterVector2Control *>(userData);

	vectorControl->mY = sldrCtrl->getValueF32();

	vectorControl->update(LLWaterParamManager::instance()->mCurParams);

	LLWaterParamManager::instance()->propagateParameters();
}
开发者ID:N3X15,项目名称:Luna-Viewer,代码行数:12,代码来源:llfloaterwater.cpp

示例7: onExpFloatControlMoved

void LLFloaterWater::onExpFloatControlMoved(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl)
{
	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	F32 val = sldrCtrl->getValueF32();
	expFloatControl->mExp = val;
	LLWaterParamManager::instance()->setDensitySliderValue(val);

	expFloatControl->update(LLWaterParamManager::instance()->mCurParams);
	LLWaterParamManager::instance()->propagateParameters();
}
开发者ID:Xara,项目名称:Opensource-V2-SL-Viewer,代码行数:11,代码来源:llfloaterwater.cpp

示例8: onChangeCloudCoverage

void LLFloaterEnvSettings::onChangeCloudCoverage(LLUICtrl* ctrl)
{
	LLSliderCtrl* sldr = static_cast<LLSliderCtrl*>(ctrl);
	
	// deactivate animator
	//LLWLParamManager::instance()->mAnimator.mIsRunning = false;
	//LLWLParamManager::instance()->mAnimator.mUseLindenTime = false;

	F32 val = sldr->getValueF32();
	LLWLParamManager::instance()->mCurParams.set("cloud_shadow", val);
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:11,代码来源:llfloaterenvsettings.cpp

示例9: updateSliderText

void LLPanelDisplay::updateSliderText(LLUICtrl* ctrl, void* user_data)
{
	// get our UI widgets
	LLTextBox* text_box = (LLTextBox*)user_data;
	LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;
	if(text_box == NULL || slider == NULL)
	{
		return;
	}

	//Hack to display 'Off' for avatar physics slider.
	if(slider->getName() == "AvatarPhysicsDetail" && !slider->getValueF32())
	{
		text_box->setText(std::string("Off"));
		return;
	}

	// get range and points when text should change
	F32 range = slider->getMaxValue() - slider->getMinValue();
	llassert(range > 0);
	F32 midPoint = slider->getMinValue() + range / 3.0f;
	F32 highPoint = slider->getMinValue() + (2.0f * range / 3.0f);

	// choose the right text
	if(slider->getValueF32() < midPoint)
	{
		text_box->setText(std::string("Low"));
	} 
	else if (slider->getValueF32() < highPoint)
	{
		text_box->setText(std::string("Mid"));
	}
	else if(slider->getValueF32() < slider->getMaxValue())
	{
		text_box->setText(std::string("High"));
	}
	else
	{
		text_box->setText(std::string("Max"));
	}
}
开发者ID:samiam123,项目名称:VoodooNxg,代码行数:41,代码来源:llpaneldisplay.cpp

示例10: onGlowBMoved

/// \NOTE that we want NEGATIVE (-) B
void LLFloaterWindLight::onGlowBMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
{
	deactivateAnimator();

	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	/// \NOTE that we want NEGATIVE (-) B and NOT by 20 as 20 is too big
	colorControl->b = -sldrCtrl->getValueF32() * 5;

	colorControl->update(LLWLParamManager::instance()->mCurParams);
	LLWLParamManager::instance()->propagateParameters();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:13,代码来源:llfloaterwindlight.cpp

示例11: onGlowRMoved

/// GLOW SPECIFIC CODE
void LLFloaterWindLight::onGlowRMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
{
	deactivateAnimator();

	LLSliderCtrl* sldrCtrl = static_cast<LLSliderCtrl*>(ctrl);

	// scaled by 20
	colorControl->r = (2 - sldrCtrl->getValueF32()) * 20;

	colorControl->update(LLWLParamManager::instance()->mCurParams);
	LLWLParamManager::instance()->propagateParameters();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:13,代码来源:llfloaterwindlight.cpp

示例12: fixOrder

void lggBeamColorMapFloater::fixOrder()
{
	myData.rotateSpeed = mColorSlider->getValueF32();
	myData.rotateSpeed /= 100.0f;
	
	if(myData.endHue < myData.startHue)
	{
		F32 temp = myData.startHue;
		myData.startHue = myData.endHue;
		myData.endHue = temp;
	}
}
开发者ID:VirtualReality,项目名称:Viewer,代码行数:12,代码来源:lggbeamcolormapfloater.cpp

示例13: onChangeWaterFogDensity

void LLFloaterEnvSettings::onChangeWaterFogDensity(LLUICtrl* ctrl, WaterExpFloatControl* expFloatControl)
{
	LLSliderCtrl* sldr;
	sldr = getChild<LLSliderCtrl>("EnvWaterFogSlider");
	
	F32 val = sldr->getValueF32();
	expFloatControl->mExp = val;
	LLWaterParamManager::instance()->setDensitySliderValue(val);

	expFloatControl->update(LLWaterParamManager::instance()->mCurParams);
	LLWaterParamManager::instance()->propagateParameters();
}
开发者ID:HyangZhao,项目名称:NaCl-main,代码行数:12,代码来源:llfloaterenvsettings.cpp

示例14: onSunMoved

// time of day
void LLFloaterWindLight::onSunMoved(LLUICtrl* ctrl, WLColorControl* colorControl)
{
	deactivateAnimator();

	LLSliderCtrl* sunSldr = getChild<LLSliderCtrl>("WLSunAngle");
	LLSliderCtrl* eastSldr = getChild<LLSliderCtrl>("WLEastAngle");

	// get the two angles
	LLWLParamManager * param_mgr = LLWLParamManager::instance();

	param_mgr->mCurParams.setSunAngle(F_TWO_PI * sunSldr->getValueF32());
	param_mgr->mCurParams.setEastAngle(F_TWO_PI * eastSldr->getValueF32());

	// set the sun vector
	colorControl->r = -sin(param_mgr->mCurParams.getEastAngle()) * 
		cos(param_mgr->mCurParams.getSunAngle());
	colorControl->g = sin(param_mgr->mCurParams.getSunAngle());
	colorControl->b = cos(param_mgr->mCurParams.getEastAngle()) * 
		cos(param_mgr->mCurParams.getSunAngle());
	colorControl->i = 1.f;

	colorControl->update(param_mgr->mCurParams);
	param_mgr->propagateParameters();
}
开发者ID:AlexRa,项目名称:Kirstens-clone,代码行数:25,代码来源:llfloaterwindlight.cpp

示例15: updateMeterText

void LLPanelDisplay::updateMeterText(LLUICtrl* ctrl, void* user_data)
{
	// get our UI widgets
	LLPanelDisplay* panel = (LLPanelDisplay*)user_data;
	LLSliderCtrl* slider = (LLSliderCtrl*) ctrl;

	LLTextBox* m1 = panel->getChild<LLTextBox>("DrawDistanceMeterText1");
	LLTextBox* m2 = panel->getChild<LLTextBox>("DrawDistanceMeterText2");

	// toggle the two text boxes based on whether we have 1 or two digits
	F32 val = slider->getValueF32();
	bool two_digits = val < 100;
	m1->setVisible(two_digits);
	m2->setVisible(!two_digits);
}
开发者ID:meta7,项目名称:Meta7-Viewer,代码行数:15,代码来源:llpaneldisplay.cpp


注:本文中的LLSliderCtrl::getValueF32方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。