Exemplo n.º 1
0
void TClipMaker::RealUpdateProperties()
{
	m_RTFlags.set	(flRT_UpdateProperties,FALSE);
    // clip props
    PropItemVec		p_items;
    PropValue* V	= 0;
	PHelper().CreateCaption		(p_items,"Length",				FloatTimeToStrTime(m_TotalLength,true,true,true,true).c_str());
    V=PHelper().CreateFloat		(p_items,"Zoom",				&m_Zoom,			1.f,1000.f,0.1f,1);
    V->OnChangeEvent.bind		(this,&TClipMaker::OnZoomChange);
    if (sel_clip){
    	ListItem* l_owner		= m_ClipList->FindItem(*sel_clip->name); VERIFY(l_owner);
	    V=PHelper().CreateName	(p_items,"Current Clip\\Name",	&sel_clip->name,	l_owner);
        V->OnChangeEvent.bind	(this,&TClipMaker::OnNameChange);
	    V=PHelper().CreateFloat	(p_items,"Current Clip\\Length",&sel_clip->length,	0.f,10000.f,0.1f,2);
        V->OnChangeEvent.bind	(this,&TClipMaker::OnClipLengthChange);
        for (u16 k=0; k<4; k++){
            AnsiString mname	= sel_clip->CycleName(k);	
            u16 slot			= sel_clip->CycleSlot(k);
            if (mname.IsEmpty())continue;
            CMotionDef* MD		= ATools->m_RenderObject.FindMotionDef	(mname.c_str(),slot);
            CMotion* MI			= ATools->m_RenderObject.FindMotionKeys	(mname.c_str(),slot);
            SBonePart* BP		= (k<(u16)m_CurrentObject->BoneParts().size())?&m_CurrentObject->BoneParts()[k]:0;
            shared_str tmp;
            if (MI)				tmp.sprintf("%s [%3.2fs, %s]",mname.c_str(),MI->GetLength()/MD->Speed(),MD->bone_or_part?"stop at end":"looped");
            if (BP)				PHelper().CreateCaption	(p_items,PrepareKey("Current Clip\\Cycles",BP->alias.c_str()), tmp);
		}            
        if (sel_clip->fx.valid())PHelper().CreateFloat		(p_items,PrepareKey("Current Clip\\FXs",*sel_clip->fx.name), &sel_clip->fx_power, 0.f, 1000.f);
    }
	m_ClipProps->AssignItems(p_items);
}
void CSE_ALifeInventoryItem::FillProps		(LPCSTR pref, PropItemVec& values)
{
	PHelper().CreateFloat			(values, PrepareKey(pref, *base()->s_name, "Item condition"), 		&m_fCondition, 			0.f, 1.f);
	CSE_ALifeObject					*alife_object = smart_cast<CSE_ALifeObject*>(base());
	R_ASSERT						(alife_object);
	PHelper().CreateFlag32			(values, PrepareKey(pref, *base()->s_name,"ALife\\Useful for AI"),	&alife_object->m_flags,	CSE_ALifeObject::flUsefulForAI);
	PHelper().CreateFlag32			(values, PrepareKey(pref, *base()->s_name,"ALife\\Visible for AI"),	&alife_object->m_flags,	CSE_ALifeObject::flVisibleForAI);
}
Exemplo n.º 3
0
void CGlow::FillProp(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProp(pref, items);
    PropValue* V=0;
    V=PHelper().CreateChoose	(items,PrepareKey(pref,"Texture"), 	&m_TexName,		smTexture);	V->OnChangeEvent.bind(this,&CGlow::ShaderChange);
    V=PHelper().CreateChoose	(items,PrepareKey(pref,"Shader"),	&m_ShaderName,	smEShader);	V->OnChangeEvent.bind(this,&CGlow::ShaderChange);
    PHelper().CreateFloat		(items,PrepareKey(pref,"Radius"),	&m_fRadius,		0.01f,10000.f);
//.	PHelper().CreateFlag<Flags8>(items,PHelper().PrepareKey(pref,"Fixed size"),	&m_Flags, 		gfFixedSize);
}
void CSE_Visual::FillProps		(LPCSTR pref, PropItemVec &items)
{
	ISE_Abstract* abstract		= smart_cast<ISE_Abstract*>(this); VERIFY(abstract);
	ChooseValue *V 				= PHelper().CreateChoose(items, PrepareKey(pref,abstract->name(),"Model\\Visual"),		&visual_name,		smVisual);
	V->OnChangeEvent.bind		(this,&CSE_Visual::OnChangeVisual);
	V							= PHelper().CreateChoose(items,	PrepareKey(pref,abstract->name(),"Model\\Animation"),	&startup_animation, smSkeletonAnims,0,(void*)*visual_name);
	V->OnChangeEvent.bind		(this,&CSE_Visual::OnChangeAnim);
	PHelper().CreateFlag8		(items, PrepareKey(pref,abstract->name(),"Model\\Obstacle"),	&flags,	flObstacle);
}
Exemplo n.º 5
0
void ESoundEnvironment::FillProp(LPCSTR pref, PropItemVec& values)
{
	inherited::FillProp			(pref, values);
	PropValue* P;
    P=PHelper().CreateChoose	(values, PrepareKey(pref,"Environment Inner"),	&m_EnvInner, smSoundEnv);
    P->OnChangeEvent.bind		(this,&ESoundEnvironment::OnChangeEnvs);
    P=PHelper().CreateChoose	(values, PrepareKey(pref,"Environment Outer"),	&m_EnvOuter, smSoundEnv);
    P->OnChangeEvent.bind		(this,&ESoundEnvironment::OnChangeEnvs);
}
Exemplo n.º 6
0
void CGroupObject::FillProp(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProp(pref, items);
    PropValue* V		= PHelper().CreateChoose	(items,PrepareKey(pref,"Reference"),&m_ReferenceName, smGroup); 
    V->OnChangeEvent.bind(this,&CGroupObject::ReferenceChange);
    PHelper().CreateCaption							(items,PrepareKey(pref,"State"), 	IsOpened()?"Opened":"Closed");
	for (ObjectIt it=m_Objects.begin(); it!=m_Objects.end(); it++)
	    PHelper().CreateCaption						(items,PrepareKey(pref,AnsiString().sprintf("%s: objects",Name).c_str(),ParentTools->ClassDesc(),(*it)->Name), "");
}
Exemplo n.º 7
0
void EParticlesObject::FillProp(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProp(pref, items);
    PropValue* V;
    V=PHelper().CreateChoose	(items,PrepareKey(pref, "Reference"),&m_RefName, smParticles);
    V->OnChangeEvent.bind		(this,&EParticlesObject::OnRefChange);
	ButtonValue* B;
    B=PHelper().CreateButton	(items,PrepareKey(pref,"Controls"), 	"Play,Stop",0);
    B->OnBtnClickEvent.bind		(this,&EParticlesObject::OnControlClick);
}
Exemplo n.º 8
0
void CSE_Abstract::FillProps				(LPCSTR pref, PropItemVec& items)
{
	PHelper().CreateToken8		(items,	PrepareKey(pref,"Game Type"),			&s_gameid,		game_types);
    PHelper().CreateU16			(items,	PrepareKey(pref, "Respawn Time (s)"),	&RespawnTime,	0,43200);

//	LPCSTR						gcs = pSettings->r_string(s_name,"GroupControlSection");
//	PHelper().CreateChoose		(items,PrepareKey(pref,*s_name,"Spawn\\group control"),				&m_spawn_control,		smSpawnItem,	0,	(void*)gcs,	16);
	PHelper().CreateFlag32		(items,PrepareKey(pref,*s_name,"Spawn\\enabled"),					&m_spawn_flags,			flSpawnEnabled);
//	PHelper().CreateFloat		(items,PrepareKey(pref,*s_name,"Spawn\\probability"),				&m_spawn_probability,	0.f,			1.f);
//	PHelper().CreateFlag32		(items,PrepareKey(pref,*s_name,"Spawn\\spawn on surge only"),		&m_spawn_flags,			flSpawnOnSurgeOnly);
//	PHelper().CreateFlag32		(items,PrepareKey(pref,*s_name,"Spawn\\spawn if destroyed only"),	&m_spawn_flags,			flSpawnIfDestroyedOnly);
//	PHelper().CreateFlag32		(items,PrepareKey(pref,*s_name,"Spawn\\spawn infinite count"),		&m_spawn_flags,			flSpawnInfiniteCount);
//	PHelper().CreateFlag32		(items,PrepareKey(pref,*s_name,"Spawn\\auto destroy on spawn"),		&m_spawn_flags,			flSpawnDestroyOnSpawn);
}
void CSE_ALifeItemWeapon::FillProps			(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProps			(pref, items);
	PHelper().CreateU8			(items,PrepareKey(pref,*s_name,"Ammo type:"), &ammo_type,0,255,1);
	PHelper().CreateU16			(items,PrepareKey(pref,*s_name,"Ammo: in magazine"),	&a_elapsed,0,30,1);
	

	if (m_scope_status == eAddonAttachable)
	       PHelper().CreateFlag8(items,PrepareKey(pref,*s_name,"Addons\\Scope"), 	&m_addon_flags, eWeaponAddonScope);

	if (m_silencer_status == eAddonAttachable)
        PHelper().CreateFlag8	(items,PrepareKey(pref,*s_name,"Addons\\Silencer"), 	&m_addon_flags, eWeaponAddonSilencer);

	if (m_grenade_launcher_status == eAddonAttachable)
        PHelper().CreateFlag8	(items,PrepareKey(pref,*s_name,"Addons\\Podstvolnik"),&m_addon_flags,eWeaponAddonGrenadeLauncher);
}
Exemplo n.º 10
0
void SSceneSummary::SObjectInfo::FillProp(PropItemVec& items, LPCSTR main_pref)
{
	if (object_name.size()){
        for (PIVecIt it=info.begin(); it!=info.end(); it++)
	        PHelper().CreateCaption(items,PrepareKey(main_pref,it->first.c_str()),	it->second.c_str());
    }
}
Exemplo n.º 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);
            }
        }
    }
}
Exemplo n.º 12
0
void CSceneObject::FillProp(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProp	(pref,items);
    PropValue* V		= PHelper().CreateChoose	(items,PrepareKey(pref,"Reference"),		&m_ReferenceName, smObject); 
    V->OnChangeEvent.bind(this,&CSceneObject::ReferenceChange);
    if (IsDynamic())
	    inherited::AnimationFillProp(pref,items);
}
Exemplo n.º 13
0
//------------------------------------------------------------------------------
void ESceneLightTools::FillProp(LPCSTR pref, PropItemVec& items)
{
    ButtonValue*	B 	= 0;
    // hemisphere
//.	PHelper().CreateRToken32(items, PrepareKey(pref,"Common\\Hemisphere\\Light Control"),	&m_HemiControl, 	&*lcontrols.begin(), lcontrols.size());
    
    // sun
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Sun Shadow\\Visible"),			&m_Flags,			flShowSun);
    PHelper().CreateAngle	(items,	PrepareKey(pref,"Common\\Sun Shadow\\Altitude"),			&m_SunShadowDir.x,	-PI_DIV_2,0);
    PHelper().CreateAngle	(items,	PrepareKey(pref,"Common\\Sun Shadow\\Longitude"),		&m_SunShadowDir.y,	0,PI_MUL_2);
    // light controls
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Controls\\Draw Name"),			&m_Flags,			flShowControlName);
    PHelper().CreateCaption	(items,PrepareKey(pref,"Common\\Controls\\Count"),				shared_str().sprintf("%d",lcontrols.size()));
//	B=PHelper().CreateButton(items,PHelper().PrepareKey(pref,"Common\\Controls\\Edit"),	"Append",	ButtonValue::flFirstOnly);
//	B->OnBtnClickEvent	= OnControlAppendClick;
	RTokenVecIt		_I 	= lcontrols.begin();
    RTokenVecIt		_E 	= lcontrols.end();
    for (;_I!=_E; _I++){
    	if (_I->equal(LCONTROL_HEMI)||_I->equal(LCONTROL_STATIC)||_I->equal(LCONTROL_SUN)){
		    PHelper().CreateCaption(items,	PrepareKey(pref,"Common\\Controls\\System",*_I->name),"");
        }else{
		    B=PHelper().CreateButton(items,	PrepareKey(pref,"Common\\Controls\\User",*_I->name),"Rename,Remove",ButtonValue::flFirstOnly);
            B->OnBtnClickEvent.bind		(this,&ESceneLightTools::OnControlRenameRemoveClick);
        }
    }                              
	inherited::FillProp(pref, items);
}
Exemplo n.º 14
0
void CGroupObject::FillProp(LPCSTR pref, PropItemVec& items)
{
	inherited::FillProp(pref, items);
    PropValue* V		= PHelper().CreateChoose	(items,PrepareKey(pref,"Reference"),&m_ReferenceName_, smGroup); 
    V->OnChangeEvent.bind(this,&CGroupObject::ReferenceChange);

    ButtonValue* B;
    B=PHelper().CreateButton	(items,PrepareKey(pref,"FreezeObjects"), 	"Unique,Reference",0);
    B->OnBtnClickEvent.bind		(this,&CGroupObject::OnFreezeAllClick);

	for (ObjectsInGroup::iterator it=m_ObjectsInGroup.begin(); it!=m_ObjectsInGroup.end(); ++it)
    {
    	string_path					pk;
        sprintf						(pk,"%s (%s)",PrepareKey(pref, it->pObject->Name).c_str(),it->pObject->ParentTool->ClassDesc());
        V = PHelper().CreateFlag32	(items, pk, &it->pObject->m_CO_Flags, flObjectInGroupUnique);
    	V->OnChangeEvent.bind		(this,&CCustomObject::OnChangeIngroupUnique);
    }
}
Exemplo n.º 15
0
void ESceneAIMapTool::FillProp(LPCSTR pref, PropItemVec& items)
{
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Draw Nodes"),			&m_Flags, 		flHideNodes, 0,0, FlagValueCustom::flInvertedDraw);
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Slow Calculate Mode"),	&m_Flags, 		flSlowCalculate);
    PHelper().CreateFloat 	(items, PrepareKey(pref,"Common\\Visible Radius"),		&m_VisRadius, 	10.f, 	250.f);
    PHelper().CreateFloat 	(items, PrepareKey(pref,"Common\\Smooth Height"),		&m_SmoothHeight,0.1f,	100.f);

    PHelper().CreateU32	 	(items, PrepareKey(pref,"Params\\Brush Size"),			&m_BrushSize, 	1, 100);
    PHelper().CreateFloat 	(items, PrepareKey(pref,"Params\\Can Up"),				&m_Params.fCanUP, 	0.f, 10.f);
    PHelper().CreateFloat 	(items, PrepareKey(pref,"Params\\Can Down"),			&m_Params.fCanDOWN, 0.f, 10.f);
}
Exemplo n.º 16
0
void EDetailManager::FillProp(LPCSTR pref, PropItemVec& items)
{
	PropValue* P;
    P=PHelper().CreateFloat	(items, PrepareKey(pref,"Objects per square"),				&ps_r__Detail_density);
    P->OnChangeEvent.bind	(this,&EDetailManager::OnDensityChange);
    P=PHelper().CreateChoose(items, PrepareKey(pref,"Base Texture"),					&m_Base.name, smTexture);
    P->OnChangeEvent.bind	(this,&EDetailManager::OnBaseTextureChange);
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Draw objects"),			&m_Flags,	flObjectsDraw);
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Draw base texture"),		&m_Flags,	flBaseTextureDraw);
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Base texture blended"),	&m_Flags,	flBaseTextureBlended);
    PHelper().CreateFlag32	(items, PrepareKey(pref,"Common\\Draw slot boxes"),			&m_Flags,	flSlotBoxesDraw);
}
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
}
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);
}
Exemplo n.º 19
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);
    }
}
Exemplo n.º 20
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;
        }
    }
}
Exemplo n.º 21
0
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);
}
Exemplo n.º 22
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);
}
Exemplo n.º 23
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;
}
Exemplo n.º 24
0
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);
    }
}
Exemplo n.º 25
0
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()),"-");
}
Exemplo n.º 26
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);
}
Exemplo n.º 29
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");
}