Ejemplo n.º 1
0
//-----------------------------------------------------------------------------
// setAnimCallbacks()
//-----------------------------------------------------------------------------
void LLFloaterAnimPreview::setAnimCallbacks()
{
	childSetCommitCallback("playback_slider", onSliderMove, this);
	
	childSetCommitCallback("preview_base_anim", onCommitBaseAnim, this);
	childSetValue("preview_base_anim", "Standing");

	childSetCommitCallback("priority", onCommitPriority, this);
	childSetCommitCallback("loop_check", onCommitLoop, this);
	childSetCommitCallback("loop_in_point", onCommitLoopIn, this);
	childSetValidate("loop_in_point", validateLoopIn);
	childSetCommitCallback("loop_out_point", onCommitLoopOut, this);
	childSetValidate("loop_out_point", validateLoopOut);

	childSetCommitCallback("hand_pose_combo", onCommitHandPose, this);
	
	childSetCommitCallback("emote_combo", onCommitEmote, this);
	childSetValue("emote_combo", "[None]");

	childSetCommitCallback("ease_in_time", onCommitEaseIn, this);
	childSetValidate("ease_in_time", validateEaseIn);
	childSetCommitCallback("ease_out_time", onCommitEaseOut, this);
	childSetValidate("ease_out_time", validateEaseOut);
}
Ejemplo n.º 2
0
BOOL	LLPanelVolume::postBuild()
{
	// Flexible Objects Parameters
	{
		childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this);
		childSetCommitCallback("FlexNumSections",onCommitFlexible,this);
		childSetValidate("FlexNumSections",precommitValidate);
		childSetCommitCallback("FlexGravity",onCommitFlexible,this);
		childSetValidate("FlexGravity",precommitValidate);
		childSetCommitCallback("FlexFriction",onCommitFlexible,this);
		childSetValidate("FlexFriction",precommitValidate);
		childSetCommitCallback("FlexWind",onCommitFlexible,this);
		childSetValidate("FlexWind",precommitValidate);
		childSetCommitCallback("FlexTension",onCommitFlexible,this);
		childSetValidate("FlexTension",precommitValidate);
		childSetCommitCallback("FlexForceX",onCommitFlexible,this);
		childSetValidate("FlexForceX",precommitValidate);
		childSetCommitCallback("FlexForceY",onCommitFlexible,this);
		childSetValidate("FlexForceY",precommitValidate);
		childSetCommitCallback("FlexForceZ",onCommitFlexible,this);
		childSetValidate("FlexForceZ",precommitValidate);
	}

	// LIGHT Parameters
	{
		childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this);
		LLColorSwatchCtrl*	LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
		if(LightColorSwatch){
			LightColorSwatch->setOnCancelCallback(onLightCancelColor);
			LightColorSwatch->setOnSelectCallback(onLightSelectColor);
			childSetCommitCallback("colorswatch",onCommitLight,this);
		}

		LLTextureCtrl* LightTexPicker = getChild<LLTextureCtrl>("light texture control");
		if (LightTexPicker)
		{
			LightTexPicker->setOnCancelCallback(onLightCancelTexture);
			LightTexPicker->setOnSelectCallback(onLightSelectTexture);
			childSetCommitCallback("light texture control", onCommitLight, this);
		}

		childSetCommitCallback("Light Intensity",onCommitLight,this);
		childSetValidate("Light Intensity",precommitValidate);
		childSetCommitCallback("Light Radius",onCommitLight,this);
		childSetValidate("Light Radius",precommitValidate);
		childSetCommitCallback("Light Falloff",onCommitLight,this);
		childSetValidate("Light Falloff",precommitValidate);
		
		childSetCommitCallback("Light FOV", onCommitLight, this);
		childSetValidate("Light FOV", precommitValidate);
		childSetCommitCallback("Light Focus", onCommitLight, this);
		childSetValidate("Light Focus", precommitValidate);
		childSetCommitCallback("Light Ambiance", onCommitLight, this);
		childSetValidate("Light Ambiance", precommitValidate);
	}

	// PHYSICS Parameters
    {
        // PhysicsShapeType combobox
        childSetCommitCallback("Physics Shape Type Combo Ctrl", onCommitPhysicsShapeType, this);
        getChild<LLUICtrl>("Physics Shape Type Combo Ctrl")->setValidateBeforeCommit( precommitValidate);
        
        // PhysicsGravity
        childSetCommitCallback("Physics Gravity", onCommitPhysicsGravity, this);
        getChild<LLUICtrl>("Physics Gravity")->setValidateBeforeCommit( precommitValidate);
        
        // PhysicsFriction
        childSetCommitCallback("Physics Friction", onCommitPhysicsFriction, this);
        getChild<LLUICtrl>("Physics Friction")->setValidateBeforeCommit( precommitValidate);
        
        // PhysicsDensity
        childSetCommitCallback("Physics Density", onCommitPhysicsDensity, this);
        getChild<LLUICtrl>("Physics Density")->setValidateBeforeCommit( precommitValidate);
        
        // PhysicsRestitution
        childSetCommitCallback("Physics Restitution", onCommitPhysicsRestitution, this);
        getChild<LLUICtrl>("Physics Restitution")->setValidateBeforeCommit( precommitValidate);
    }

	//--------------------------------------------------------
		
	// material type popup
	mLabelMaterial = getChild<LLTextBox>("label material");
	mComboMaterial = getChild<LLComboBox>("material");
	childSetCommitCallback("material",onCommitMaterial,this);
	mComboMaterial->removeall();
	// <edit>
	/*
	// *TODO:translate
	for (LLMaterialTable::info_list_t::iterator iter = LLMaterialTable::basic.mMaterialInfoList.begin();
		 iter != LLMaterialTable::basic.mMaterialInfoList.end(); ++iter)
	{
		LLMaterialInfo* minfop = *iter;
		if (minfop->mMCode != LL_MCODE_LIGHT)
		{
			mComboMaterial->add(minfop->mName);
		}
	}
	*/
	for(U8 mcode = 0; mcode < 0x10; mcode++)
	{
		mComboMaterial->add(LLMaterialTable::basic.getName(mcode));
	}
	// </edit>
	mComboMaterialItemCount = mComboMaterial->getItemCount();
	
	// Start with everyone disabled
	clearCtrls();

	return TRUE;
}
BOOL	LLPanelVolume::postBuild()
{
	// Flexible Objects Parameters
	{
		childSetCommitCallback("Flexible1D Checkbox Ctrl",onCommitIsFlexible,this);
		childSetCommitCallback("FlexNumSections",onCommitFlexible,this);
		childSetValidate("FlexNumSections",precommitValidate);
		childSetCommitCallback("FlexGravity",onCommitFlexible,this);
		childSetValidate("FlexGravity",precommitValidate);
		childSetCommitCallback("FlexFriction",onCommitFlexible,this);
		childSetValidate("FlexFriction",precommitValidate);
		childSetCommitCallback("FlexWind",onCommitFlexible,this);
		childSetValidate("FlexWind",precommitValidate);
		childSetCommitCallback("FlexTension",onCommitFlexible,this);
		childSetValidate("FlexTension",precommitValidate);
		childSetCommitCallback("FlexForceX",onCommitFlexible,this);
		childSetValidate("FlexForceX",precommitValidate);
		childSetCommitCallback("FlexForceY",onCommitFlexible,this);
		childSetValidate("FlexForceY",precommitValidate);
		childSetCommitCallback("FlexForceZ",onCommitFlexible,this);
		childSetValidate("FlexForceZ",precommitValidate);
	}

	// LIGHT Parameters
	{
		childSetCommitCallback("Light Checkbox Ctrl",onCommitIsLight,this);
		LLColorSwatchCtrl*	LightColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
		if(LightColorSwatch){
			LightColorSwatch->setOnCancelCallback(onLightCancelColor);
			LightColorSwatch->setOnSelectCallback(onLightSelectColor);
			childSetCommitCallback("colorswatch",onCommitLight,this);
		}
		childSetCommitCallback("Light Intensity",onCommitLight,this);
		childSetValidate("Light Intensity",precommitValidate);
		childSetCommitCallback("Light Radius",onCommitLight,this);
		childSetValidate("Light Radius",precommitValidate);
		childSetCommitCallback("Light Falloff",onCommitLight,this);
		childSetValidate("Light Falloff",precommitValidate);
	}
	
	// Start with everyone disabled
	clearCtrls();

	return TRUE;
}