Beispiel #1
0
void SGameMtlPair::FillProp(PropItemVec& items)
{
	PropValue::TOnChange OnChange	= 0;
    u32 show_CB			= 0;
    SGameMtlPair* P		= 0;
    if (ID_parent!=GAMEMTL_NONE_ID){ 
       	OnChange.bind	(this,&SGameMtlPair::OnFlagChange);
        show_CB		    = PropItem::flShowCB;
	    P				= m_Owner->GetMaterialPair(ID_parent);
    }
    ButtonValue* B;
    B					= PHelper().CreateButton(items,		"Command",			"Set As Parent To...",0);
    B->OnBtnClickEvent.bind(this,&SGameMtlPair::OnCommandClick);
    B					= PHelper().CreateButton(items,		"Parent", 			P?m_Owner->MtlPairToName(P->GetMtl0(),P->GetMtl1()):NONE_CAPTION,0);
    B->OnBtnClickEvent.bind(this,&SGameMtlPair::OnParentClick);
    
    propBreakingSounds	= PHelper().CreateChoose	(items,	"Breaking Sounds",	&BreakingSounds, 	smSoundSource, 0,0, GAMEMTL_SUBITEM_COUNT);
    propStepSounds		= PHelper().CreateChoose	(items,	"Step Sounds",		&StepSounds, 		smSoundSource, 0,0, GAMEMTL_SUBITEM_COUNT+2);
    propCollideSounds	= PHelper().CreateChoose	(items,	"Collide Sounds",	&CollideSounds, 	smSoundSource, 0,0, GAMEMTL_SUBITEM_COUNT);
    propCollideParticles= PHelper().CreateChoose	(items,	"Collide Particles",&CollideParticles, 	smParticles, 0,0, GAMEMTL_SUBITEM_COUNT);
    propCollideMarks	= PHelper().CreateChoose	(items,	"Collide Marks",	&CollideMarks,		smTexture, 0,0, GAMEMTL_SUBITEM_COUNT);

    propBreakingSounds->Owner()->m_Flags.assign	(SetMask(show_CB,OwnProps,flBreakingSounds));
    propStepSounds->Owner()->m_Flags.assign		(SetMask(show_CB,OwnProps,flStepSounds));
    propCollideSounds->Owner()->m_Flags.assign	(SetMask(show_CB,OwnProps,flCollideSounds));
    propCollideParticles->Owner()->m_Flags.assign(SetMask(show_CB,OwnProps,flCollideParticles));
    propCollideMarks->Owner()->m_Flags.assign	(SetMask(show_CB,OwnProps,flCollideMarks));

    propBreakingSounds->OnChangeEvent			= OnChange;
    propStepSounds->OnChangeEvent				= OnChange;
    propCollideSounds->OnChangeEvent			= OnChange;
    propCollideParticles->OnChangeEvent			= OnChange;
    propCollideMarks->OnChangeEvent				= OnChange;

    if (show_CB)
    {
		SGameMtlPair* O; 
    	if (0!=(O=GetLastParentValue(this,flBreakingSounds)))	BreakingSounds	= O->BreakingSounds;
    	if (0!=(O=GetLastParentValue(this,flStepSounds))) 		StepSounds		= O->StepSounds;
    	if (0!=(O=GetLastParentValue(this,flCollideSounds))) 	CollideSounds	= O->CollideSounds;
    	if (0!=(O=GetLastParentValue(this,flCollideParticles))) CollideParticles= O->CollideParticles;
    	if (0!=(O=GetLastParentValue(this,flCollideMarks))) 	CollideMarks	= O->CollideMarks;
    }
}
void CSE_SmartCover::FillProps	(LPCSTR pref, PropItemVec& items)
{
#	ifdef XRSE_FACTORY_EXPORTS
	PHelper().CreateFloat		(items, PrepareKey(pref,*s_name,"hold position time"), 	&m_hold_position_time,	0.f, 60.f);
	RListValue *value			= PHelper().CreateRList	 	(items,	PrepareKey(pref,*s_name,"description"),			&m_description,			&*fp_data.smart_covers.begin(),	fp_data.smart_covers.size());
	value->OnChangeEvent.bind	(this,&CSE_SmartCover::OnChangeDescription);

	PHelper().CreateFloat		(items, PrepareKey(pref,*s_name,"enter min enemy distance"),&m_enter_min_enemy_distance,	0.f, 100.f);
	PHelper().CreateFloat		(items, PrepareKey(pref,*s_name,"exit min enemy distance"),	&m_exit_min_enemy_distance,		0.f, 100.f);

	if (is_combat_cover(m_description)) {
		PHelper().CreateBOOL	(items, PrepareKey(pref, *s_name, "is combat cover"), &m_is_combat_cover);
		PHelper().CreateBOOL	(items, PrepareKey(pref, *s_name, "can fire"), &m_can_fire);
	}
#	endif // #ifdef XRSE_FACTORY_EXPORTS
}
Beispiel #3
0
void TfrmEditLightAnim::UpdateProperties()
{
    // fill data
    PropItemVec items;
	if (m_CurrentItem){
        PHelper().CreateName	(items, "Name",			&m_CurrentItem->cName,		m_CurrentOwner);
        PHelper().CreateFloat	(items,	"FPS",			&m_CurrentItem->fFPS,		0.1f,1000,1.f,1);
        S32Value* V;
        V=PHelper().CreateS32	(items,	"Frame Count",	&m_CurrentItem->iFrameCount,1,100000,1);
        V->OnAfterEditEvent.bind(this,&TfrmEditLightAnim::OnFrameCountAfterEdit);

        u32 frame 				= sePointer->Value;
        PHelper().CreateCaption	(items,	"Current\\Frame",	shared_str().sprintf("%d",frame));
        u32* val				= m_CurrentItem->GetKey(sePointer->Value);
        if (val){
            PHelper().CreateColor(items,"Current\\Color",	val);
            PHelper().CreateU8	(items,	"Current\\Alpha",	((u8*)val)+3, 0x00, 0xFF);
        }
    }
    m_Props->AssignItems		(items);
    UpdateView					();
}
Beispiel #4
0
void ESoundSource::FillProp(LPCSTR pref, PropItemVec& values)
{
	inherited::FillProp			(pref,values);
	ButtonValue* B;
    B=PHelper().CreateButton	(values, PrepareKey(pref,"Custom\\Controls"), 	"Play,Stop,Simulate",0);
    B->OnBtnClickEvent.bind		(this,&ESoundSource::OnControlClick);
    PropValue* V;
    V=PHelper().CreateChoose	(values,PrepareKey(pref,"Source\\WAVE name"),	&m_WAVName,					smSoundSource);
    V->OnChangeEvent.bind		(this,&ESoundSource::OnChangeWAV);
	V=PHelper().CreateFloat		(values,PrepareKey(pref,"Source\\Frequency"),	&m_Params.freq,				0.0f,2.f);
    V->OnChangeEvent.bind		(this,&ESoundSource::OnChangeSource);
	V=PHelper().CreateFloat		(values,PrepareKey(pref,"Source\\Volume"),		&m_Params.volume,			0.0f,1.f);
    V->OnChangeEvent.bind		(this,&ESoundSource::OnChangeSource);
	V=PHelper().CreateFloat		(values,PrepareKey(pref,"Source\\Min dist"),	&m_Params.min_distance,		0.1f,1000.f,0.1f,1);
    V->Owner()->Enable			(FALSE);
	V=PHelper().CreateFloat		(values,PrepareKey(pref,"Source\\Max dist"),	&m_Params.max_distance,		0.1f,1000.f,0.1f,1);
    V->Owner()->Enable			(FALSE);
	V=PHelper().CreateFloat		(values,PrepareKey(pref,"Source\\Max ai dist"),	&m_Params.max_ai_distance,	0.1f,1000.f,0.1f,1);
    V->Owner()->Enable			(FALSE);
	PHelper().CreateCaption		(values,PrepareKey(pref,"Game\\Active time\\Hint"),	"Zero - play sound looped round the clock.");
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Active time\\From"),	&m_ActiveTime.x);
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Active time\\To"),	&m_ActiveTime.y);
	PHelper().CreateCaption		(values,PrepareKey(pref,"Game\\Play time\\Hint"),	"Zero - play sound once.");
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Play time\\From"),	&m_PlayTime.x);
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Play time\\To"),		&m_PlayTime.y);
	PHelper().CreateCaption		(values,PrepareKey(pref,"Game\\Pause delta\\Hint"),	"Zero - play sound looped.");
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Pause delta\\From"),	&m_RandomPause.x);
	PHelper().CreateTime		(values,PrepareKey(pref,"Game\\Pause delta\\To"),	&m_RandomPause.y);
//	V=PHelper().CreateFlag32		(values,PHelper().PrepareKey(pref,"Looped"),	&m_Flags,				flLooped);
//    V->OnChangeEvent			= OnChangeSource;
}
Beispiel #5
0
void CCustomObject::AnimationFillProp(LPCSTR pref, PropItemVec& items)
{
    PropValue* V		= PHelper().CreateFlag32(items,PrepareKey(pref,"Flags\\Motionable"),&m_CO_Flags, flMotion);
    V->OnChangeEvent.bind(this,&CCustomObject::OnMotionableChange);
	if (Motionable()){
       				      PHelper().CreateCaption		(items,PrepareKey(pref,"Motion\\Hint"),		"Make KEY only on Parent CS");
	    ButtonValue* B	= PHelper().CreateButton		(items,PrepareKey(pref,"Motion\\Files"),	"Import,Export", 0);
        B->OnBtnClickEvent.bind(this,&CCustomObject::OnMotionFilesClick);
	    B				= PHelper().CreateButton		(items,PrepareKey(pref,"Motion\\Commands"),	"+ K,- K,Scale,Norm,Clamp", 0);
        B->OnBtnClickEvent.bind(this,&CCustomObject::OnMotionCommandsClick);
	    B				= PHelper().CreateButton		(items,PrepareKey(pref,"Motion\\Controls"),	" |<<, +<<, <<, >, ||, >>, >>+, >>|", 0); 
        B->OnBtnClickEvent.bind(this,&CCustomObject::OnMotionControlClick);
        				  PHelper().CreateFlag32		(items,PrepareKey(pref,"Motion\\Flags\\Auto Key"), 		&m_CO_Flags, flAutoKey);
        V				= PHelper().CreateFlag32		(items,PrepareKey(pref,"Motion\\Flags\\Camera View"), 	&m_CO_Flags, flCameraView);
        V->OnChangeEvent.bind(this,&CCustomObject::OnMotionCameraViewChange);
	    V				= PHelper().CreateFloat		(items,PrepareKey(pref,"Motion\\Start Frame (sec)"),		&m_MotionParams->min_t, -10000.f, m_MotionParams->max_t, 	1.f/30.f, 3);
    	V->OnChangeEvent.bind(this,&CCustomObject::OnMotionFrameChange);
		V				= PHelper().CreateFloat		(items,PrepareKey(pref,"Motion\\End Frame (sec)"),		&m_MotionParams->max_t, m_MotionParams->min_t, 10000.f, 	1.f/30.f, 3);
    	V->OnChangeEvent.bind(this,&CCustomObject::OnMotionFrameChange);
		V				= PHelper().CreateFloat		(items,PrepareKey(pref,"Motion\\Current Frame (sec)"),	&m_MotionParams->t_current, -10000.f, 10000.f,	1.f/30.f, 3);
    	V->OnChangeEvent.bind(this,&CCustomObject::OnMotionCurrentFrameChange);

		V				= PHelper().CreateFloat		(items,PrepareKey(pref,"Motion\\ChangeKeyTime(sec)"),	&m_MotionParams->tmp, -10000.f, 10000.f,	1.f/30.f, 3);
    	V->OnChangeEvent.bind(this,&CCustomObject::OnMotionKeyTimeChange);

        				  PHelper().CreateCaption		(items,PrepareKey(pref,"Motion\\Key Count"),			shared_str().sprintf("%d",m_Motion->KeyCount()));
        				  PHelper().CreateCaption		(items,PrepareKey(pref,"Motion\\Length (sec)"),		shared_str().sprintf("%3.2f",m_Motion->GetLength()));
	}
}
void CSE_ALifeItemDocument::FillProps		(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProps			(pref,items);
//	PHelper().CreateU16			(items, PrepareKey(pref, *s_name, "Document index :"), &m_wDocIndex, 0, 65535);
	PHelper().CreateRText		(items, PrepareKey(pref, *s_name, "Info portion :"), &m_wDoc);
}
void CSE_ALifeItemArtefact::FillProps		(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProps			(pref,items);
	PHelper().CreateFloat			(items, PrepareKey(pref, *s_name, "Anomaly value:"), &m_fAnomalyValue, 0.f, 200.f);
}
void CSE_ALifeItemAmmo::FillProps			(LPCSTR pref, PropItemVec& values) {
  	inherited::FillProps			(pref,values);
	PHelper().CreateU16			(values, PrepareKey(pref, *s_name, "Ammo: left"), &a_elapsed, 0, m_boxSize, m_boxSize);
}
Beispiel #9
0
void PS::CPEDef::FillProp(LPCSTR pref, ::PropItemVec& items, ::ListItem* owner)
{
	ButtonValue* B;
    PropValue* P = 0;

	B=PHelper().CreateButton				(items,PrepareKey(pref,"Control"),"Play(F5),Stop(F6),Stop...(F7)",ButtonValue::flFirstOnly);
    B->OnBtnClickEvent.bind					(this,&PS::CPEDef::OnControlClick);
	RTextValue* R = PHelper().CreateRText	(items,PrepareKey(pref,"Name"),&m_Name);
    R->OnAfterEditEvent.bind				(this,&PS::CPEDef::NameOnAfterEdit);


    // max particles
    PHelper().CreateS32		(items,PrepareKey				(pref,"Max Particles"),					&m_MaxParticles,  0, 100000);
//    P->OnChangeEvent		= OnFlagChange;
	// time limit
    P=PHelper().CreateFlag32(items,PrepareKey				(pref,"Time Limit"),		  			&m_Flags, dfTimeLimit);
    P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
    if (m_Flags.is(dfTimeLimit))
	    PHelper().CreateFloat	(items,PrepareKey			(pref,"Time Limit\\Value (sec)"),		&m_fTimeLimit,  0, 10000.f);
	// sprite
    P=PHelper().CreateFlag32(items,PrepareKey				(pref,"Sprite"),		 	   			&m_Flags, dfSprite);
    P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
    if (m_Flags.is(dfSprite)){
	    P=PHelper().CreateChoose(items,PrepareKey			(pref,"Sprite\\Texture"), 	   			&m_TextureName, smTexture, 0,0, 2);
        P->OnChangeEvent.bind	(this,&PS::CPEDef::OnShaderChange);
	    P=PHelper().CreateChoose(items,PrepareKey			(pref,"Sprite\\Shader"), 	   			&m_ShaderName,	smEShader);
        P->OnChangeEvent.bind	(this,&PS::CPEDef::OnShaderChange);
    	// frame
        P=PHelper().CreateFlag32(items,PrepareKey			(pref,"Sprite\\Culling"),			 	&m_Flags, dfCulling);
        P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
        if (m_Flags.is(CPEDef::dfCulling))
        	PHelper().CreateFlag32(items,PrepareKey			(pref,"Sprite\\Culling\\CCW"),			&m_Flags, dfCullCCW);
        P=PHelper().CreateFlag32(items,PrepareKey			(pref,"Sprite\\Frame"),		 		 	&m_Flags, dfFramed);
        P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
        if (m_Flags.is(dfFramed)){
            PHelper().CreateFlag32(items,PrepareKey		(pref,"Sprite\\Frame\\Random Init"), 	&m_Flags, dfRandomFrame);
            PHelper().CreateS32	(items,PrepareKey			(pref,"Sprite\\Frame\\Count"),			&m_Frame.m_iFrameCount, 1,256);
            P=PHelper().CreateFloat(items,PrepareKey		(pref,"Sprite\\Frame\\Size U (0..1)"),	&m_Frame.m_fTexSize.x, EPS_S,1.f,0.001f,8);
            P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFrameResize);
            PHelper().CreateFloat	(items,PrepareKey	   	(pref,"Sprite\\Frame\\Size V (0..1)"),	&m_Frame.m_fTexSize.y, EPS_S,1.f,0.001f,8);
	        // animate
            P=PHelper().CreateFlag32(items,PrepareKey		(pref,"Sprite\\Animated"),				&m_Flags, dfAnimated);
            P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
            if (m_Flags.is(dfAnimated)){
                PHelper().CreateFlag32(items,PrepareKey	(pref,"Sprite\\Animated\\Random Playback"),	&m_Flags, dfRandomPlayback);
		    	PHelper().CreateFloat(items,PrepareKey		(pref,"Sprite\\Animated\\Speed"),		&m_Frame.m_fSpeed, 0.f,1000.f);
            }
        }
    }
	// align to path
    P=PHelper().CreateFlag32(items,PrepareKey	(pref,"Movement\\Align To Path"), 					&m_Flags, dfAlignToPath);
    P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
    if (m_Flags.is(dfAlignToPath)){
	    PHelper().CreateFlag32(items,PrepareKey	(pref,"Movement\\Align To Path\\Face Align"), 		&m_Flags, dfFaceAlign);
	    PHelper().CreateFlag32(items,PrepareKey	(pref,"Movement\\Align To Path\\Default World Align"), &m_Flags, dfWorldAlign);
    	PHelper().CreateAngle3(items,PrepareKey	(pref,"Movement\\Align To Path\\Default Rotate"),	&m_APDefaultRotation);
    }
	// velocity scale                                                           
    P=PHelper().CreateFlag32(items,PrepareKey	(pref,"Movement\\Velocity Scale"),					&m_Flags, dfVelocityScale);
    P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
    if (m_Flags.is(dfVelocityScale))
    	PHelper().CreateVector(items,PrepareKey	(pref,"Movement\\Velocity Scale\\Value"),			&m_VelocityScale, -1000.f, 1000.f);
	// collision
    P=PHelper().CreateFlag32(items,PrepareKey	(pref,"Movement\\Collision"),						&m_Flags, dfCollision);
    P->OnChangeEvent.bind	(this,&PS::CPEDef::OnFlagChange);
    FloatValue*	V 			= 0;
    if (m_Flags.is(dfCollision)){
    	PHelper().CreateFlag32(items,PrepareKey(pref,"Movement\\Collision\\Collide With Dynamic"),	&m_Flags, dfCollisionDyn);
    	PHelper().CreateFlag32(items,PrepareKey(pref,"Movement\\Collision\\Destroy On Contact"),	&m_Flags, dfCollisionDel);
	    V=PHelper().CreateFloat	(items,PrepareKey	(pref,"Movement\\Collision\\Friction"),			&m_fCollideOneMinusFriction,0.f, 1.f);
        V->OnBeforeEditEvent.bind	(this,&PS::CPEDef::CollisionFrictionOnBeforeEdit);
        V->OnAfterEditEvent.bind	(this,&PS::CPEDef::CollisionFrictionOnAfterEdit);
        V->Owner()->OnDrawTextEvent.bind(this,&PS::CPEDef::CollisionFrictionOnDraw);
	    PHelper().CreateFloat		(items,PrepareKey	(pref,"Movement\\Collision\\Resilence"), 	&m_fCollideResilience, 		0.f, 1.f);
	    V=PHelper().CreateFloat		(items,PrepareKey	(pref,"Movement\\Collision\\Cutoff"),	 	&m_fCollideSqrCutoff, 		0.f, P_MAXFLOAT);
        V->OnBeforeEditEvent.bind	(this,&PS::CPEDef::CollisionCutoffOnBeforeEdit);
        V->OnAfterEditEvent.bind	(this,&PS::CPEDef::CollisionCutoffOnAfterEdit);
        V->Owner()->OnDrawTextEvent.bind(this,&PS::CPEDef::CollisionCutoffOnDraw);
    }
    // actions
	B=::PHelper().CreateButton(items,PrepareKey(pref,"Actions\\Edit"),"Append",ButtonValue::flFirstOnly);
    B->OnBtnClickEvent.bind	(this,&PS::CPEDef::OnActionsClick);
	for (EPAVecIt s_it=m_EActionList.begin(); s_it!=m_EActionList.end(); s_it++)
    {
    	u32 clr				= (*s_it)->flags.is(EParticleAction::flEnabled)?clBlack:clSilver;
    	shared_str a_pref		= PrepareKey(pref,"Actions",AnsiString().sprintf("%s (%s)",*(*s_it)->actionType,*(*s_it)->actionName).c_str());

        ButtonValue* B			= PHelper().CreateButton(items,a_pref,"Up,Down,Remove",ButtonValue::flFirstOnly); B->tag = (s_it-m_EActionList.begin());
        B->Owner()->prop_color	= clr;
        B->OnBtnClickEvent.bind	(this,&PS::CPEDef::OnActionEditClick);

        RTextValue* R;
		R=PHelper().CreateRText	(items,PrepareKey(a_pref.c_str(),"Name"),&(*s_it)->actionName);
        R->OnAfterEditEvent.bind(this,&PS::CPEDef::OnAfterActionNameEdit);
        R->Owner()->prop_color	= clr;
    	(*s_it)->FillProp	(items,a_pref.c_str(),clr);
    }
}
Beispiel #10
0
//------------------------------------------------------------------------------
// material routines
//------------------------------------------------------------------------------
void SGameMtl::FillProp		(PropItemVec& items, ListItem* owner)
{
	PropValue* V=0;
    PHelper().CreateName			(items,	"Name",						        &m_Name, owner);
    PHelper().CreateRText			(items,	"Desc",						        &m_Desc);
	// flags                                                      	
	V=PHelper().CreateFlag32		(items,	"Flags\\Dynamic",			        &Flags,	flDynamic);	V->Owner()->Enable(FALSE);
	PHelper().CreateFlag32			(items,	"Flags\\Passable",			        &Flags,	flPassable);
    if (Flags.is(flDynamic))
	    PHelper().CreateFlag32		(items,	"Flags\\Breakable",			        &Flags,	flBreakable);
    PHelper().CreateFlag32			(items,	"Flags\\Bounceable",		        &Flags,	flBounceable);
    PHelper().CreateFlag32			(items,	"Flags\\Skidmark",			        &Flags,	flSkidmark);
    PHelper().CreateFlag32			(items,	"Flags\\Bloodmark",			        &Flags,	flBloodmark);
    PHelper().CreateFlag32			(items,	"Flags\\Climable",			        &Flags,	flClimable);
    PHelper().CreateFlag32			(items,	"Flags\\Liquid",			        &Flags,	flLiquid);
    PHelper().CreateFlag32			(items,	"Flags\\Suppress Shadows",	        &Flags,	flSuppressShadows);
    PHelper().CreateFlag32			(items,	"Flags\\Suppress Wallmarks",        &Flags,	flSuppressWallmarks);
    PHelper().CreateFlag32			(items,	"Flags\\Actor Obstacle",        	&Flags,	flActorObstacle);
    PHelper().CreateFlag32			(items,	"Flags\\Bullet No Ricoshet",        &Flags,	flNoRicoshet);
    // physics part
    PHelper().CreateFloat			(items,	"Physics\\Friction",		        &fPHFriction,			0.f, 	100.f, 	0.001f, 3); 
    PHelper().CreateFloat			(items,	"Physics\\Damping",			        &fPHDamping,			0.001f,	100.f, 	0.001f, 3); 
    PHelper().CreateFloat			(items,	"Physics\\Spring",			        &fPHSpring,				0.001f,	100.f, 	0.001f, 3); 
    PHelper().CreateFloat			(items,	"Physics\\Bounce start vel",        &fPHBounceStartVelocity,0.f,	100.f, 	0.01f, 	2); 
    PHelper().CreateFloat			(items,	"Physics\\Bouncing",		        &fPHBouncing,			0.f,	1.f, 	0.001f, 3); 
    // factors
    PHelper().CreateFloat			(items,	"Factors\\Bounce Damage",			   		&fBounceDamageFactor,   0.f,100.f,0.1f,1);
    PHelper().CreateFloat			(items,	"Factors\\Injurious",		   				&fInjuriousSpeed,   	0.f,10000.f);
    PHelper().CreateFloat			(items,	"Factors\\Shooting (1-went through)",	    &fShootFactor);
    PHelper().CreateFloat			(items,	"Factors\\Transparency (1-full transp)",	&fVisTransparencyFactor);
    PHelper().CreateFloat			(items,	"Factors\\Sound occlusion (1-full hear)",	&fSndOcclusionFactor);
    PHelper().CreateFloat			(items,	"Factors\\Flotation (1-full passable)",		&fFlotationFactor);

    PHelper().CreateFloat			(items,	"Factors\\Density Factor",					&fDensityFactor, 0.0f, 1000.0f, 1.0f, 1);
}
Beispiel #11
0
void CCustomPreferences::FillProp(PropItemVec& props)
{
    PHelper().CreateFlag32	(props,"Objects\\Library\\Discard Instance",	&object_flags, 	epoDiscardInstance);
    PHelper().CreateFlag32	(props,"Objects\\Skeleton\\Draw Joints",		&object_flags, 	epoDrawJoints);
    PHelper().CreateFlag32	(props,"Objects\\Skeleton\\Draw Bone Axis",		&object_flags, 	epoDrawBoneAxis);
    PHelper().CreateFlag32	(props,"Objects\\Skeleton\\Draw Bone Names",	&object_flags, 	epoDrawBoneNames);
    PHelper().CreateFlag32	(props,"Objects\\Skeleton\\Draw Bone Shapes",	&object_flags, 	epoDrawBoneShapes);
    PHelper().CreateFlag32	(props,"Objects\\Show\\Hint",					&object_flags, 	epoShowHint);
    PHelper().CreateFlag32	(props,"Objects\\Show\\Pivot",					&object_flags, 	epoDrawPivot);
    PHelper().CreateFlag32	(props,"Objects\\Show\\Animation Path",			&object_flags, 	epoDrawAnimPath);
    PHelper().CreateFlag32	(props,"Objects\\Show\\LOD",					&object_flags, 	epoDrawLOD);
    PHelper().CreateFlag32	(props,"Objects\\Loading\\Deffered Loading RB",	&object_flags, 	epoDeffLoadRB);
    PHelper().CreateFlag32	(props,"Objects\\Loading\\Deffered Loading CF",	&object_flags, 	epoDeffLoadCF);

    PHelper().CreateU32		(props,"Scene\\Common\\Recent Count", 		    &scene_recent_count,0, 		25);
    PHelper().CreateU32		(props,"Scene\\Common\\Undo Level", 		    &scene_undo_level,	0, 		125);
    PHelper().CreateFloat	(props,"Scene\\Grid\\Cell Size", 	           	&grid_cell_size,	0.1f,	10.f);
    PHelper().CreateU32		(props,"Scene\\Grid\\Cell Count", 	           	&grid_cell_count,	10, 	1000);

    PHelper().CreateBOOL	(props,"Tools\\Box Pick\\Limited Depth",		&bp_lim_depth);
    PHelper().CreateBOOL	(props,"Tools\\Box Pick\\Back Face Culling",	&bp_cull);
    PHelper().CreateFloat	(props,"Tools\\Box Pick\\Depth Tolerance",		&bp_depth_tolerance,0.f, 	10000.f);
    PHelper().CreateFloat	(props,"Tools\\Sens\\Move",			          	&tools_sens_move);
    PHelper().CreateFloat	(props,"Tools\\Sens\\Rotate",		          	&tools_sens_rot);
    PHelper().CreateFloat	(props,"Tools\\Sens\\Scale",		          	&tools_sens_scale);
    PHelper().CreateAngle	(props,"Tools\\Snap\\Angle",		          	&snap_angle,		0, 		PI_MUL_2);
    PHelper().CreateFloat	(props,"Tools\\Snap\\Move",			          	&snap_move, 		0.01f,	1000.f);
    PHelper().CreateFloat	(props,"Tools\\Snap\\Move To", 		          	&snap_moveto,		0.01f,	1000.f);

    PHelper().CreateFlag32	(props,"Sounds\\Use\\Hardware",					&psSoundFlags, 	ss_Hardware);
    PHelper().CreateFlag32	(props,"Sounds\\Use\\EAX",						&psSoundFlags, 	ss_EAX);        

    PHelper().CreateFloat	(props,"Viewport\\Camera\\Move Sens",		    &cam_sens_move);
    PHelper().CreateFloat	(props,"Viewport\\Camera\\Rotate Sens",		    &cam_sens_rot);
    PHelper().CreateFloat	(props,"Viewport\\Camera\\Fly Speed",		    &cam_fly_speed, 	0.01f, 	100.f);
    PHelper().CreateFloat	(props,"Viewport\\Camera\\Fly Altitude",	    &cam_fly_alt, 		0.f, 	1000.f);
    PHelper().CreateColor	(props,"Viewport\\Fog\\Color",				    &fog_color	);
    PHelper().CreateFloat	(props,"Viewport\\Fog\\Fogness",			    &fog_fogness, 		0.f, 	100.f);
    PHelper().CreateFloat	(props,"Viewport\\Near Plane",				    &view_np, 			0.01f,	10.f);
    PHelper().CreateFloat	(props,"Viewport\\Far Plane", 				    &view_fp,			10.f, 	10000.f);
    PHelper().CreateAngle	(props,"Viewport\\FOV",		  				    &view_fov,			deg2rad(0.1f), deg2rad(170.f));
    PHelper().CreateColor	(props,"Viewport\\Clear Color",		           	&scene_clear_color	);
    
    ButtonValue* B = PHelper().CreateButton	(props,"Keyboard\\Common\\File","Load,Save", 0);
    B->OnBtnClickEvent.bind	(this,&CCustomPreferences::OnKeyboardCommonFileClick);
    ECommandVec& cmds		= GetEditorCommands();
    for (u32 cmd_idx=0; cmd_idx<cmds.size(); cmd_idx++){
    	SECommand*& CMD		= cmds[cmd_idx];
        if (CMD&&CMD->editable){
        	VERIFY(!CMD->sub_commands.empty());
		    for (u32 sub_cmd_idx=0; sub_cmd_idx<CMD->sub_commands.size(); sub_cmd_idx++){
            	SESubCommand*& SUB_CMD = CMD->sub_commands[sub_cmd_idx];
                string128 nm; 		sprintf(nm,"%s%s%s",CMD->Desc(),!SUB_CMD->desc.empty()?"\\":"",SUB_CMD->desc.c_str());
                ShortcutValue* V 	= PHelper().CreateShortcut(props,PrepareKey("Keyboard\\Shortcuts",nm), &SUB_CMD->shortcut);
                V->OnValidateResultEvent.bind(CheckValidate);
            }
        }
    }
}
void SSceneSummary::FillProp(PropItemVec& items)
{
    // fill items
    ButtonValue* B =PHelper().CreateButton (items,"Common\\File","Export...",0);
    B->OnBtnClickEvent.bind(this,&SSceneSummary::OnFileClick);
    // fill items
    PHelper().CreateCaption(items,"Common\\Level Name",			Scene->m_LevelOp.m_FNLevelPath.c_str());
    PHelper().CreateCaption(items,"Geometry\\Bounding\\Min", 	shared_str().printf("{%3.2f, %3.2f, %3.2f}",VPUSH(bbox.min)));
    PHelper().CreateCaption(items,"Geometry\\Bounding\\Max", 	shared_str().printf("{%3.2f, %3.2f, %3.2f}",VPUSH(bbox.max)));
    PHelper().CreateCaption(items,"Geometry\\Mesh\\Total Faces",   	shared_str().printf("%d",face_cnt));
    PHelper().CreateCaption(items,"Geometry\\Mesh\\Total Vertices",	shared_str().printf("%d",vert_cnt));
    PHelper().CreateCaption(items,"Geometry\\MU\\Objects",	   	shared_str().printf("%d",mu_objects.size()));
    PHelper().CreateCaption(items,"Geometry\\MU\\References",   shared_str().printf("%d",object_mu_ref_cnt));
    PHelper().CreateCaption(items,"Geometry\\LOD\\Objects",		shared_str().printf("%d",lod_objects.size()));
    PHelper().CreateCaption(items,"Geometry\\LOD\\References",	shared_str().printf("%d",object_lod_ref_cnt));
    PHelper().CreateCaption(items,"Visibility\\HOM\\Faces",		shared_str().printf("%d",hom_face_cnt));
    PHelper().CreateCaption(items,"Visibility\\HOM\\Vertices",	shared_str().printf("%d",hom_vert_cnt));
    PHelper().CreateCaption(items,"Visibility\\Sectors",		shared_str().printf("%d",sector_cnt));
    PHelper().CreateCaption(items,"Visibility\\Portals",		shared_str().printf("%d",portal_cnt));
    PHelper().CreateCaption(items,"Lights\\Count",				shared_str().printf("%d",light_point_cnt+light_spot_cnt));
    PHelper().CreateCaption(items,"Lights\\By Type\\Point",		shared_str().printf("%d",light_point_cnt));
    PHelper().CreateCaption(items,"Lights\\By Type\\Spot",		shared_str().printf("%d",light_spot_cnt));
    PHelper().CreateCaption(items,"Lights\\By Usage\\Dynamic",	shared_str().printf("%d",light_dynamic_cnt));
    PHelper().CreateCaption(items,"Lights\\By Usage\\Static",	shared_str().printf("%d",light_static_cnt));
    PHelper().CreateCaption(items,"Lights\\By Usage\\Breakable",shared_str().printf("%d",light_breakable_cnt));
    PHelper().CreateCaption(items,"Lights\\By Usage\\Procedural",shared_str().printf("%d",light_procedural_cnt));
    PHelper().CreateCaption(items,"Glows\\Count",				shared_str().printf("%d",glow_cnt));
    // objects
    for (OISetIt o_it=objects.begin(); o_it!=objects.end(); o_it++){
    	SObjectInfo* info= (SObjectInfo*)(&(*o_it));
        info->FillProp		(items,"Objects");
    }
    // textures
    CaptionValue* total_count=PHelper().CreateCaption	(items,"Textures\\Count","");
    CaptionValue* total_mem	= PHelper().CreateCaption	(items,"Textures\\Memory Usage","");
    u32 total_mem_usage		= 0; 
    ButtonValue* BB			= PHelper().CreateButton	(items,"Textures\\Highlight Textures\\Command", "Pixel Density,Clear", ButtonValue::flFirstOnly);
    BB->OnBtnClickEvent.bind(this,&SSceneSummary::OnHighlightClick);
    for (PDVecIt pd_it=pm_colors.begin(); pd_it!=pm_colors.end(); pd_it++){
    	string128 tmp;		
        sprintf				(tmp,"Textures\\Highlight Textures\\Color Legend\\Item #%d",pd_it-pm_colors.begin());
    	PHelper().CreateColor(items,PrepareKey(tmp,"Color").c_str(),&pd_it->color);
    	FloatValue* V		= PHelper().CreateFloat(items,PrepareKey(tmp,"Weight (p/m)").c_str(),&pd_it->pm,0,1000000,1,0);
        V->OnAfterEditEvent.bind(this,&SSceneSummary::OnWeightAfterEditClick);
        V->tag				= pd_it-pm_colors.begin();
    }
    for (u32 stt=sttFirst; stt<sttLast; stt++){
        LPCSTR nm			= get_token_name(summary_texture_type_tokens,stt);
        if (nm&&nm[0]){
            u32 cur_mem_usage	= 0; 
            float cur_area		= 0; 
            shared_str pref		= PrepareKey("Textures",nm);
            CaptionValue* mem 	= PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Memory Usage").c_str(), "");
            CaptionValue* area 	= PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Effective Area").c_str(), "");
            for (TISetIt it=textures.begin(); it!=textures.end(); it++){
                STextureInfo* info= (STextureInfo*)(&(*it));
                if (info->type==stt){ 
                    cur_area	+= info->effective_area;
                    info->FillProp(items,pref.c_str(),cur_mem_usage);
                }
            }
            mem->ApplyValue		(shared_str().printf("%d Kb",iFloor(cur_mem_usage/1024)));
            area->ApplyValue 	(shared_str().printf("%3.2f m^2",cur_area));
            total_mem_usage		+= cur_mem_usage;
        }
    }
    total_count->ApplyValue	(shared_str().printf("%d",		textures.size()));
    total_mem->ApplyValue	(shared_str().printf("%d Kb",	iFloor(total_mem_usage/1024)));
	// sound
    PHelper().CreateCaption	(items,"Sounds\\Occluder\\Faces",		shared_str().printf("%d",snd_occ_face_cnt));
    PHelper().CreateCaption	(items,"Sounds\\Occluder\\Vertices",	shared_str().printf("%d",snd_occ_vert_cnt));
    PHelper().CreateCaption	(items,"Sounds\\Sources",				shared_str().printf("%d",sound_source_cnt));
    PHelper().CreateCaption	(items,"Sounds\\Waves\\Count",			shared_str().printf("%d",waves.size()));
    for (RStringSetIt w_it=waves.begin(); w_it!=waves.end(); w_it++)
        PHelper().CreateCaption(items,PrepareKey("Sounds\\Waves",w_it->c_str()),"-");
    // particles
    PHelper().CreateCaption	(items,"Particle System\\Sources",		shared_str().printf("%d",pe_static_cnt));
    PHelper().CreateCaption	(items,"Particle System\\Refs\\Count",	shared_str().printf("%d",pe_static.size()));
    for (RStringSetIt pe_it=pe_static.begin(); pe_it!=pe_static.end(); pe_it++)
        PHelper().CreateCaption(items,PrepareKey("Particle System\\Refs",pe_it->c_str()),"-");
}
void SSceneSummary::STextureInfo::FillProp	(PropItemVec& items, LPCSTR main_pref, u32& mem_use)
{
	if (file_name.size()){
        int tex_mem			= info.MemoryUsage(*file_name);
        mem_use				+= tex_mem;
        AnsiString pref		= PrepareKey(AnsiString(main_pref).c_str(),*file_name).c_str();
        PropValue* V=0;
        V=PHelper().CreateChoose(items,PrepareKey(pref.c_str(),"Texture"), 		&file_name, smTexture); V->Owner()->Enable(FALSE);
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Format"),		info.FormatString());
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Size"), 			shared_str().printf("%d x %d x %s",info.width,info.height,info.HasAlpha()?"32b":"24b"));
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Memory Usage"),	shared_str().printf("%d Kb",iFloor(tex_mem/1024)));
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Effective Area"),shared_str().printf("%3.2f m^2",effective_area));
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Pixel Density"),	shared_str().printf("%3.2f p/m",_sqrt((pixel_area*info.width*info.height)/effective_area)));
/*
//. убрал из-за кол-ва > 4096 
        AnsiString tmp 		= "on demand";
        for (objinf_map_it o_it=objects.begin(); o_it!=objects.end(); o_it++){
        	tmp += AnsiString().sprintf("%s%s[%d*%3.2f]",tmp.Length()?"; ":"",o_it->first.c_str(),o_it->second.ref_count,o_it->second.area);
        }
        PHelper().CreateCaption(items,PrepareKey(pref.c_str(),"Objects"), tmp.c_str());
*/
        if (info.flags.is_any(STextureParams::flDiffuseDetail|STextureParams::flBumpDetail)){
            if (0!=info.detail_name.size()){
                V=PHelper().CreateChoose(items,PrepareKey(pref.c_str(),"Detail Texture"),	&info.detail_name,smTexture); 	V->Owner()->Enable(FALSE);
                PHelper().CreateCaption(items,PrepareKey(pref.c_str(), "Detail Scale"),		shared_str().printf("%3.2f",info.detail_scale));
            }else{
                PHelper().CreateCaption(items,PrepareKey(pref.c_str(), "Detail Texture"),	"INVALID");
                ELog.Msg(mtError,"Empty details on texture: '%s'",*file_name);
            }
        }
        if (info.bump_mode==STextureParams::tbmUse){
            if (0!=info.bump_name.size()){
                V=PHelper().CreateChoose(items,PrepareKey(pref.c_str(),"Bump Texture"),		&info.bump_name,smTexture); 	V->Owner()->Enable(FALSE);
            }else{
                PHelper().CreateCaption(items,PrepareKey(pref.c_str(), "Bump Texture"),		"INVALID");    
                ELog.Msg(mtError,"Empty bump on texture: '%s'",*file_name);
            }
        }
        ButtonValue* B 		= PHelper().CreateButton(items,PrepareKey(pref.c_str(),"Highlight Texture"), "Select,Density =,Density +,Clear", 0);
		B->OnBtnClickEvent.bind(this,&SSceneSummary::STextureInfo::OnHighlightClick);
        B->tag 				= (int)(*file_name);
    }
}
Beispiel #14
0
void PS::CPGDef::FillProp(LPCSTR pref, ::PropItemVec& items, ::ListItem* owner)
{                                   
    ButtonValue* B;
	B=PHelper().CreateButton	(items,PrepareKey(pref,"Control"),"Play,Stop,Stop...",ButtonValue::flFirstOnly);
    B->OnBtnClickEvent.bind		(this,&PS::CPGDef::OnControlClick);
    B=PHelper().CreateButton	(items,PrepareKey(pref,"Edit"),"Append Effect",ButtonValue::flFirstOnly);
    B->OnBtnClickEvent.bind		(this,&PS::CPGDef::OnEffectsEditClick);
    PropValue* V;
	PHelper().CreateName		(items,PrepareKey(pref,"Name"),&m_Name,owner);
    V=PHelper().CreateFloat		(items,PrepareKey(pref,"Time Limit (s)"),	&m_fTimeLimit,	-1.f,1000.f);
    V->OnChangeEvent.bind		(this,&PS::CPGDef::OnParamsChange);

    u32 i = 0;
    for (EffectIt it=m_Effects.begin(); it!=m_Effects.end(); ++it,++i)
    {
    	u32 clr					= (*it)->m_Flags.is(CPGDef::SEffect::flEnabled)?clBlack:clSilver;
        AnsiString nm 			= AnsiString("Effect #")+(i+1);
        
        B=PHelper().CreateButton(items,PrepareKey(pref,nm.c_str()),"Preview,Select,Remove",ButtonValue::flFirstOnly); B->tag = it-m_Effects.begin();
        B->OnBtnClickEvent.bind	(this,&PS::CPGDef::OnEffectEditClick);
        B->Owner()->prop_color	= clr;
        V=PHelper().CreateChoose(items,PrepareKey(pref,nm.c_str(),"Name"),&(*it)->m_EffectName,smPE);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        V=PHelper().CreateFloat	(items,PrepareKey(pref,nm.c_str(),"Start Time (s)"),&(*it)->m_Time0,		0.f,1000.f);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        V=PHelper().CreateFloat	(items,PrepareKey(pref,nm.c_str(),"End Time (s)"),	&(*it)->m_Time1,		0.f,1000.f);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Deferred Stop"),&(*it)->m_Flags,	SEffect::flDefferedStop);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Enabled"),									&(*it)->m_Flags, 	SEffect::flEnabled);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Children\\On Birth"),						&(*it)->m_Flags,	SEffect::flOnBirthChild);
        V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        if ((*it)->m_Flags.is(SEffect::flOnBirthChild)){
	        V=PHelper().CreateChoose(items,PrepareKey(pref,nm.c_str(),"Children\\On Birth\\Effect Name"),			&(*it)->m_OnBirthChildName,smPE);
    	    V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
	        V->Owner()->prop_color	= clr;
        }
        V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Children\\On Play"),						&(*it)->m_Flags,	SEffect::flOnPlayChild);
        V->OnChangeEvent.bind		(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color		= clr;
        if ((*it)->m_Flags.is(SEffect::flOnPlayChild)){
	        V=PHelper().CreateChoose	(items,PrepareKey(pref,nm.c_str(),"Children\\On Play\\Effect Name"),			&(*it)->m_OnPlayChildName,smPE);
    	    V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
	        V->Owner()->prop_color	= clr;
            V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Children\\On Play\\Play After Stop"),		&(*it)->m_Flags,	SEffect::flOnPlayChildRewind);
            V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);
            V->Owner()->prop_color	= clr;
        }
        V=PHelper().CreateFlag32(items,PrepareKey(pref,nm.c_str(),"Children\\On Dead"),						&(*it)->m_Flags,	SEffect::flOnDeadChild);
        V->OnChangeEvent.bind		(this,&PS::CPGDef::OnParamsChange);
        V->Owner()->prop_color	= clr;
        if ((*it)->m_Flags.is(SEffect::flOnDeadChild)){
	        V=PHelper().CreateChoose	(items,PrepareKey(pref,nm.c_str(),"Children\\On Dead\\Effect Name"),			&(*it)->m_OnDeadChildName,smPE);
    	    V->OnChangeEvent.bind	(this,&PS::CPGDef::OnParamsChange);    
	        V->Owner()->prop_color	= clr;
        }
    }
}
Beispiel #15
0
void ESceneGlowTools::FillProp(LPCSTR pref, PropItemVec& items)
{                      
    PHelper().CreateFlag32(items, PrepareKey(pref,"Common\\Test Visibility"),	&m_Flags,	flTestVisibility);
    PHelper().CreateFlag32(items, PrepareKey(pref,"Common\\Draw Cross"),		&m_Flags,	flDrawCross);
	inherited::FillProp	(pref, items);
}
Beispiel #16
0
void CEditShape::FillProp(LPCSTR pref, PropItemVec& values)
{
	inherited::FillProp(pref,values);
	PHelper().CreateCaption	(values, PrepareKey(pref,"Shape usage"),m_shape_type==eShapeCommon?"common":"level bound");
}
void CSE_Motion::FillProps(		LPCSTR pref, PropItemVec &items)
{
	ISE_Abstract* abstract		= smart_cast<ISE_Abstract*>(this); VERIFY(abstract);
	ChooseValue *V				= PHelper().CreateChoose(items, PrepareKey(pref,abstract->name(),"Motion"),&motion_name, smGameAnim);
	V->OnChangeEvent.bind		(this,&CSE_Motion::OnChangeMotion);
}
Beispiel #18
0
void STextureParams::FillProp(LPCSTR base_name, PropItemVec& items, PropValue::TOnChange on_type_change)
{                             
	OnTypeChangeEvent	= on_type_change;
    PropValue* P		= PHelper().CreateToken32	(items, "Type",		(u32*)&type,		ttype_token);
    P->OnChangeEvent.bind(this,&STextureParams::OnTypeChange);
    PHelper().CreateCaption			(items, "Source\\Width",			shared_str().sprintf("%d",width));
    PHelper().CreateCaption			(items, "Source\\Height",			shared_str().sprintf("%d",height));
    PHelper().CreateCaption			(items, "Source\\Alpha",			HasAlpha	()?"present":"absent"); 
	switch (type){
    case ttImage:	
    case ttCubeMap:	
	    PHelper().CreateToken32		(items, "Format",	   				(u32*)&fmt, 		tfmt_token);

	    PHelper().CreateFlag32		(items, "MipMaps\\Enabled",			&flags,				flGenerateMipMaps);
    	PHelper().CreateToken32		(items, "MipMaps\\Filter",			(u32*)&mip_filter,	tparam_token);

    	P = PHelper().CreateToken32	(items, "Bump\\Mode",				(u32*)&bump_mode,	tbmode_token);
        P->OnChangeEvent.bind(this,&STextureParams::OnTypeChange);
        if (tbmUse==bump_mode){
        	AnsiString path;
            path = base_name;
        	PHelper().CreateChoose	(items, "Bump\\Texture",			&bump_name,			smTexture, path.c_str());
        }
        
        PHelper().CreateFlag32		(items, "Details\\Use As Diffuse",	&flags,				flDiffuseDetail);
        PHelper().CreateFlag32		(items, "Details\\Use As Bump (R2)",&flags,				flBumpDetail);
        PHelper().CreateChoose		(items, "Details\\Texture",			&detail_name,		smTexture);
        PHelper().CreateFloat	   	(items, "Details\\Scale",			&detail_scale,		0.1f,10000.f,0.1f,2);

        PHelper().CreateToken32		(items, "Material\\Base",			(u32*)&material,	tmtl_token);
        PHelper().CreateFloat	   	(items, "Material\\Weight",			&material_weight	);
        
//		PHelper().CreateFlag32		(items, "Flags\\Binary Alpha",		&flags,				flBinaryAlpha);
        PHelper().CreateFlag32		(items, "Flags\\Dither",			&flags,				flDitherColor);
        PHelper().CreateFlag32		(items, "Flags\\Dither Each MIP",	&flags,				flDitherEachMIPLevel);
        PHelper().CreateFlag32		(items, "Flags\\Implicit Lighted",	&flags,				flImplicitLighted);

        PHelper().CreateFlag32		(items, "Fade\\Enable Color",		&flags,				flFadeToColor);
		PHelper().CreateFlag32		(items, "Fade\\Enabled Alpha",		&flags,				flFadeToAlpha);
		PHelper().CreateU8			(items,	"Fade\\Delay 'n' MIP",		&fade_delay,		0,255);
		PHelper().CreateU32			(items, "Fade\\% of color to fade in",&fade_amount,		0,100,0);
        PHelper().CreateColor	   	(items, "Fade\\Color",				&fade_color			);
		PHelper().CreateU8			(items,	"Fade\\Alpha",				((u8*)&fade_color)+3,0,255);

        PHelper().CreateFlag32		(items, "Border\\Enabled Color",	&flags,				flColorBorder);
        PHelper().CreateFlag32		(items, "Border\\Enabled Alpha",	&flags,				flAlphaBorder);
        PHelper().CreateColor	   	(items, "Border\\Color",			&border_color		);
    break;
    case ttBumpMap:	
        PHelper().CreateChoose		(items, "Bump\\Special NormalMap",	&ext_normal_map_name,smTexture,base_name);
        PHelper().CreateFloat	   	(items, "Bump\\Virtual Height (m)",	&bump_virtual_height, 0.f, 0.1f, 0.001f, 3);
    break;
    case ttNormalMap:	
	    P = PHelper().CreateToken32	(items, "Format",	   				(u32*)&fmt, 		tfmt_token); P->Owner()->Enable(false);

	    PHelper().CreateFlag32		(items, "MipMaps\\Enabled",			&flags,				flGenerateMipMaps);
    	PHelper().CreateToken32		(items, "MipMaps\\Filter",			(u32*)&mip_filter,	tparam_token);
    break;
    case ttTerrain:	
	    P = PHelper().CreateToken32	(items, "Format",	   				(u32*)&fmt, 		tfmt_token); P->Owner()->Enable(false);

        PHelper().CreateFlag32		(items, "Details\\Use As Diffuse",	&flags,				flDiffuseDetail);
        PHelper().CreateFlag32		(items, "Details\\Use As Bump (R2)",&flags,				flBumpDetail);
        PHelper().CreateChoose		(items, "Details\\Texture",			&detail_name,		smTexture);
        PHelper().CreateFloat	   	(items, "Details\\Scale",			&detail_scale,		0.1f,10000.f,0.1f,2);

        PHelper().CreateToken32		(items, "Material\\Base",			(u32*)&material,	tmtl_token);
        PHelper().CreateFloat	   	(items, "Material\\Weight",			&material_weight	);

        P = PHelper().CreateFlag32	(items, "Flags\\Implicit Lighted",	&flags,				flImplicitLighted);  P->Owner()->Enable(false);
    break;
    }
}