Exemple #1
0
void CUIStatsPlayerList::Init(CUIXml& xml_doc, LPCSTR path)
{
	// init window
	CUIXmlInit::InitScrollView	(xml_doc, path, 0, this);
	SetFixedScrollBar			(false);


	m_bStatus_mode				= xml_doc.ReadAttribInt(path,0,"status_mode",0)? true: false;
	m_bSpectator				= xml_doc.ReadAttribInt(path,0,"spectator",0)? true: m_bStatus_mode;
	SetSpectator				(m_bSpectator);

	// init item structure
	int tabsCount				= xml_doc.GetNodesNum(path, 0, "field");
	XML_NODE* tab_node			= xml_doc.NavigateToNode(path,0);
	xml_doc.SetLocalRoot		(tab_node);

	for (int i = 0; i < tabsCount; ++i)
	{
		LPCSTR name 			= xml_doc.ReadAttrib("field",i,"name");
		float width 			= xml_doc.ReadAttribFlt("field",i,"width");

		if (0 == xr_strcmp(name, "artefacts") && GameID() != eGameIDArtefactHunt)
			continue;
		
		AddField				(name,width);
	}
	xml_doc.SetLocalRoot		(xml_doc.GetRoot());
	string256					 _path;
	// init item text params
	CUIXmlInit::InitFont		(xml_doc, strconcat(sizeof(_path),_path, path, ":text_format"), 0, m_i.c, m_i.f);
	m_i.h						= xml_doc.ReadAttribFlt(strconcat(sizeof(_path),_path, path, ":text_format"), 0, "height", 25);

	// init list header
	switch (GameID())
	{
	case eGameIDCaptureTheArtefact:
	case eGameIDArtefactHunt:
	case eGameIDTeamDeathmatch:
		if (!m_bSpectator || m_bStatus_mode)
            InitTeamHeader(xml_doc, path);
	case eGameIDDeathmatch:
		InitHeader(xml_doc, path);
	default:
		break;
	}
}
Exemple #2
0
void CUIFrags::InitBackground(CUIXml& xml_doc, LPCSTR path){
	string256 _path;
	CUIXmlInit::InitWindow(xml_doc, path, 0, this);
	CUIXmlInit::InitStatic(xml_doc, strconcat(sizeof(_path),_path, path, ":back_c"), 0, m_pBackC);
	int count = xml_doc.ReadAttribInt(_path, 0, "count", 1);
	m_pBackC->GetStaticItem()->SetTile(1,count,0,0);
	CUIXmlInit::InitStatic(xml_doc, strconcat(sizeof(_path),_path, path, ":back_t"), 0, m_pBackT);
	CUIXmlInit::InitStatic(xml_doc, strconcat(sizeof(_path),_path, path, ":back_b"), 0, m_pBackB);

}
void ui_actor_state_item::init_from_xml( CUIXml& xml, LPCSTR path )
{
	CUIXmlInit::InitWindow( xml, path, 0, this);

	XML_NODE* stored_root = xml.GetLocalRoot();
	XML_NODE* new_root = xml.NavigateToNode( path, 0 );
	xml.SetLocalRoot( new_root );

	LPCSTR hint_text = xml.Read( "hint_text", 0, "no hint" );
	set_hint_text_ST( hint_text );
	
	set_hint_delay( (u32)xml.ReadAttribInt( "hint_text", 0, "delay" ) );

	if ( xml.NavigateToNode( "state_progress", 0 ) )	
	{
		m_progress = UIHelper::CreateProgressBar( xml, "state_progress", this );
	}
	if ( xml.NavigateToNode( "progress_shape", 0 ) )	
	{
		m_sensor = xr_new<CUIProgressShape>();
		AttachChild( m_sensor );
		m_sensor->SetAutoDelete( true );
		CUIXmlInit::InitProgressShape( xml, "progress_shape", 0, m_sensor );
	}
	if ( xml.NavigateToNode( "arrow", 0 ) )	
	{
		m_arrow = xr_new<UI_Arrow>();
		m_arrow->init_from_xml( xml, "arrow", this );
	}
	if ( xml.NavigateToNode( "arrow_shadow", 0 ) )	
	{
		m_arrow_shadow = xr_new<UI_Arrow>();
		m_arrow_shadow->init_from_xml( xml, "arrow_shadow", this );
	}
	if ( xml.NavigateToNode( "icon", 0 ) )	
	{
		m_static = UIHelper::CreateStatic( xml, "icon", this );
//		m_magnitude = xml.ReadAttribFlt( "icon", 0, "magnitude", 1.0f );
		m_static->TextItemControl()->SetText("");
	}
	if ( xml.NavigateToNode( "icon2", 0 ) )	
	{
		m_static2 = UIHelper::CreateStatic( xml, "icon2", this );
		m_static2->TextItemControl()->SetText("");
	}
	if ( xml.NavigateToNode( "icon3", 0 ) )	
	{
		m_static3 = UIHelper::CreateStatic( xml, "icon3", this );
		m_static3->TextItemControl()->SetText("");
	}
	set_arrow( 0.0f );
	xml.SetLocalRoot( stored_root );
}
Exemple #4
0
void CMMSound::Init(CUIXml& xml_doc, LPCSTR path){
	string256 _path;	
	m_bRandom = xml_doc.ReadAttribInt(path, 0, "random")? true : false;

	int nodes_num	= xml_doc.GetNodesNum(path, 0, "menu_music");

	XML_NODE* tab_node = xml_doc.NavigateToNode(path,0);
	xml_doc.SetLocalRoot(tab_node);	
	for (int i = 0; i < nodes_num; ++i)
		m_play_list.push_back(xml_doc.Read("menu_music", i, ""));		
	xml_doc.SetLocalRoot(xml_doc.GetRoot());

    strconcat(sizeof(_path),_path, path,":whell_sound");
	if (check_file(xml_doc.Read(_path, 0, "")))
        m_whell.create(xml_doc.Read(_path, 0, "") ,st_Effect,sg_SourceType);

	strconcat(sizeof(_path),_path, path,":whell_click");
	if (check_file(xml_doc.Read(_path, 0, "")))
        m_whell_click.create(xml_doc.Read(_path, 0, ""),st_Effect,sg_SourceType );
}
Exemple #5
0
void CUIFactionWarWnd::Init()
{
	CUIXml xml;
	xml.Load( CONFIG_PATH, UI_PATH, PDA_FACTION_WAR_XML );

	CUIXmlInit::InitWindow( xml, "main_wnd", 0, this );

	m_background			= UIHelper::CreateFrameLine( xml, "background", this );

	m_center_background		= UIHelper::CreateStatic( xml, "center_background", this );

	m_target_static			= UIHelper::CreateStatic( xml, "target_static", this );
	m_target_caption		= UIHelper::CreateStatic( xml, "target_caption", this );
	//m_target_caption->SetElipsis( 1, 0 );
	m_tc_pos				= m_target_caption->GetWndPos();

	m_target_desc			= UIHelper::CreateStatic( xml, "target_decs", this );
	m_td_pos				= m_target_desc->GetWndPos();

	m_state_static			= UIHelper::CreateStatic( xml, "state_static", this );
	
	m_our_icon				= UIHelper::CreateStatic( xml, "static_our_icon", this );
	m_our_icon_over			= UIHelper::CreateStatic( xml, "static_our_icon_over", this );
	m_our_name				= UIHelper::CreateStatic( xml, "static_our_name", this );
	m_st_our_frac_info		= UIHelper::CreateStatic( xml, "static_our_frac_info", this );
	m_st_our_mem_count		= UIHelper::CreateStatic( xml, "static_our_mem_count", this );
	m_st_our_resource		= UIHelper::CreateStatic( xml, "static_our_resource", this );
	
	m_pb_our_state			= UIHelper::CreateProgressBar( xml, "progress_our_state", this );
	m_pb_our_mem_count		= UIHelper::CreateProgressBar( xml, "progress_our_mem_count", this );
	m_pb_our_resource		= UIHelper::CreateProgressBar( xml, "progress_our_resource", this );

	m_enemy_icon			= UIHelper::CreateStatic( xml, "static_enemy_icon", this );
	m_enemy_icon_over		= UIHelper::CreateStatic( xml, "static_enemy_icon_over", this );
	m_enemy_name			= UIHelper::CreateStatic( xml, "static_enemy_name", this );
	m_st_enemy_frac_info	= UIHelper::CreateStatic( xml, "static_enemy_frac_info", this );
	m_st_enemy_mem_count	= UIHelper::CreateStatic( xml, "static_enemy_mem_count", this );
	m_st_enemy_resource		= UIHelper::CreateStatic( xml, "static_enemy_resource", this );

	m_pb_enemy_state		= UIHelper::CreateProgressBar( xml, "progress_enemy_state", this );
	m_pb_enemy_mem_count	= UIHelper::CreateProgressBar( xml, "progress_enemy_mem_count", this );	
	m_pb_enemy_resource		= UIHelper::CreateProgressBar( xml, "progress_enemy_resource", this );	

	m_static_line1			= UIHelper::CreateFrameLine( xml, "static_line1", this );
	m_static_line2			= UIHelper::CreateFrameLine( xml, "static_line2", this );
	m_static_line3			= UIHelper::CreateFrameLine( xml, "static_line3", this );
	m_static_line4			= UIHelper::CreateFrameLine( xml, "static_line4", this );
	m_static_line_left		= UIHelper::CreateFrameLine( xml, "static_line_left", this );
	m_static_line_right		= UIHelper::CreateFrameLine( xml, "static_line_right", this );

	VERIFY( hint_wnd );
	m_war_states_parent = new CUIWindow();
	m_war_states_parent->SetAutoDelete( true );
	AttachChild( m_war_states_parent );
	Fvector2 pos;
	pos.x = xml.ReadAttribFlt( "static_vs_state", 0, "x" );
	pos.y = xml.ReadAttribFlt( "static_vs_state", 0, "y" );
	m_war_states_parent->SetWndPos( pos );

	for ( u8 i = 0; i < max_war_state; ++i )
	{
		m_war_state[i] = new UIWarState();
		m_war_state[i]->InitXML( xml, "static_vs_state", m_war_states_parent );
		m_war_state[i]->set_hint_wnd( hint_wnd );
	}
	
	float dx = xml.ReadAttribFlt( "static_vs_state", 0, "dx" );
	m_war_states_dx = dx;
	m_war_states_xcenter = xml.ReadAttribFlt( "static_vs_state", 0, "xcenter", 511.0f );

	pos.set( 0.0f, 0.0f );
	m_war_state[0]->SetWndPos( pos );
	for ( u8 i = 1; i < max_war_state; ++i )
	{
		pos.x += m_war_state[i-1]->GetWndSize().x + dx;
		m_war_state[i]->SetWndPos( pos );
	}

	for ( u8 i = 0; i < max_bonuce; ++i )
	{
		m_our_bonuces[i] = UIHelper::CreateStatic( xml, "static_our_bonuce", this );
	}
	dx = xml.ReadAttribFlt( "static_our_bonuce", 0, "dx" );
	pos = m_our_bonuces[0]->GetWndPos();
	for ( u8 i = 1; i < max_bonuce; ++i )
	{
		pos.x += m_our_bonuces[i-1]->GetWndSize().x + dx;
		m_our_bonuces[i]->SetWndPos( pos );
	}

	for ( u8 i = 0; i < max_bonuce; ++i )
	{
		m_enemy_bonuces[i] = UIHelper::CreateStatic( xml, "static_enemy_bonuce", this );
	}
	dx = xml.ReadAttribFlt( "static_enemy_bonuce", 0, "dx" );
	pos = m_enemy_bonuces[0]->GetWndPos();
	for ( u8 i = 1; i < max_bonuce; ++i )
	{
		pos.x += m_enemy_bonuces[i-1]->GetWndSize().x + dx;
		m_enemy_bonuces[i]->SetWndPos( pos );
	}
	int delay = xml.ReadAttribInt( "main_wnd", 0, "update_delay", 3000 );
	m_update_delay = (0 < delay)? (u32)delay : 0;
}
Exemple #6
0
void CUIItemInfo::Init(LPCSTR xml_name){

	CUIXml						uiXml;
	bool xml_result				= uiXml.Init(CONFIG_PATH, UI_PATH, xml_name);
	R_ASSERT2					(xml_result, "xml file not found");

	CUIXmlInit					xml_init;

	if(uiXml.NavigateToNode("main_frame",0))
	{
		Frect wnd_rect;
		wnd_rect.x1		= uiXml.ReadAttribFlt("main_frame", 0, "x", 0);
		wnd_rect.y1		= uiXml.ReadAttribFlt("main_frame", 0, "y", 0);

		wnd_rect.x2		= uiXml.ReadAttribFlt("main_frame", 0, "width", 0);
		wnd_rect.y2		= uiXml.ReadAttribFlt("main_frame", 0, "height", 0);
		
		inherited::Init(wnd_rect.x1, wnd_rect.y1, wnd_rect.x2, wnd_rect.y2);
	}

	if(uiXml.NavigateToNode("static_name",0))
	{
		UIName						= xr_new<CUIStatic>();	 
		AttachChild					(UIName);		
		UIName->SetAutoDelete		(true);
		xml_init.InitStatic			(uiXml, "static_name", 0,	UIName);
	}
	if(uiXml.NavigateToNode("static_weight",0))
	{
		UIWeight				= xr_new<CUIStatic>();	 
		AttachChild				(UIWeight);		
		UIWeight->SetAutoDelete(true);
		xml_init.InitStatic		(uiXml, "static_weight", 0,			UIWeight);
	}

	if(uiXml.NavigateToNode("static_cost",0))
	{
		UICost					= xr_new<CUIStatic>();	 
		AttachChild				(UICost);
		UICost->SetAutoDelete	(true);
		xml_init.InitStatic		(uiXml, "static_cost", 0,			UICost);
	}

	if(uiXml.NavigateToNode("static_condition",0))
	{
		UICondition					= xr_new<CUIStatic>();	 
		AttachChild					(UICondition);
		UICondition->SetAutoDelete	(true);
		xml_init.InitStatic			(uiXml, "static_condition", 0,		UICondition);
	}

	if(uiXml.NavigateToNode("condition_progress",0))
	{
		UICondProgresBar			= xr_new<CUIProgressBar>(); AttachChild(UICondProgresBar);UICondProgresBar->SetAutoDelete(true);
		xml_init.InitProgressBar	(uiXml, "condition_progress", 0, UICondProgresBar);
	}

	if(uiXml.NavigateToNode("descr_list",0))
	{
		UIWpnParams						= xr_new<CUIWpnParams>();
		UIArtefactParams				= xr_new<CUIArtefactParams>();
		UIWpnParams->InitFromXml		(uiXml);
		UIArtefactParams->InitFromXml	(uiXml);
		UIDesc							= xr_new<CUIScrollView>(); 
		AttachChild						(UIDesc);		
		UIDesc->SetAutoDelete			(true);
		m_desc_info.bShowDescrText		= !!uiXml.ReadAttribInt("descr_list",0,"only_text_info", 1);
		xml_init.InitScrollView			(uiXml, "descr_list", 0, UIDesc);
		xml_init.InitFont				(uiXml, "descr_list:font", 0, m_desc_info.uDescClr, m_desc_info.pDescFont);
	}	

	if (uiXml.NavigateToNode("image_static", 0))
	{	
		UIItemImage					= xr_new<CUIStatic>();	 
		AttachChild					(UIItemImage);	
		UIItemImage->SetAutoDelete	(true);
		xml_init.InitStatic			(uiXml, "image_static", 0, UIItemImage);
		UIItemImage->TextureAvailable(true);

		UIItemImage->TextureOff			();
		UIItemImage->ClipperOn			();
		UIItemImageSize.set				(UIItemImage->GetWidth(),UIItemImage->GetHeight());
	}

	xml_init.InitAutoStaticGroup	(uiXml, "auto", 0, this);
}
void CUIActorMenu::Construct()
{
	CUIXml								uiXml;
	uiXml.Load							(CONFIG_PATH, UI_PATH, "actor_menu.xml");

	CUIXmlInit							xml_init;

	xml_init.InitWindow					(uiXml, "main", 0, this);
	m_hint_wnd = UIHelper::CreateHint	(uiXml, "hint_wnd");

	m_LeftBackground					= new CUIStatic();
	m_LeftBackground->SetAutoDelete		(true);
	AttachChild							(m_LeftBackground);
	xml_init.InitStatic					(uiXml, "left_background", 0, m_LeftBackground);

	m_pUpgradeWnd						= new CUIInventoryUpgradeWnd(); 
	AttachChild							(m_pUpgradeWnd);
	m_pUpgradeWnd->SetAutoDelete		(true);
	m_pUpgradeWnd->Init					();

	m_ActorCharacterInfo = new CUICharacterInfo();
	m_ActorCharacterInfo->SetAutoDelete( true );
	AttachChild( m_ActorCharacterInfo );
	m_ActorCharacterInfo->InitCharacterInfo( &uiXml, "actor_ch_info" );

	m_PartnerCharacterInfo = new CUICharacterInfo();
	m_PartnerCharacterInfo->SetAutoDelete( true );
	AttachChild( m_PartnerCharacterInfo );
	m_PartnerCharacterInfo->InitCharacterInfo( &uiXml, "partner_ch_info" );
	
	m_RightDelimiter		= UIHelper::CreateStatic(uiXml, "right_delimiter", this);
	m_ActorTradeCaption		= UIHelper::CreateStatic(uiXml, "right_delimiter:trade_caption", m_RightDelimiter);
	m_ActorTradePrice		= UIHelper::CreateStatic(uiXml, "right_delimiter:trade_price", m_RightDelimiter);
	m_ActorTradeWeightMax	= UIHelper::CreateStatic(uiXml, "right_delimiter:trade_weight_max", m_RightDelimiter);
	m_ActorTradeCaption->AdjustWidthToText();
	
	m_LeftDelimiter			= UIHelper::CreateStatic(uiXml, "left_delimiter", this);
	m_PartnerTradeCaption	= UIHelper::CreateStatic(uiXml, "left_delimiter:trade_caption", m_LeftDelimiter);
	m_PartnerTradePrice		= UIHelper::CreateStatic(uiXml, "left_delimiter:trade_price", m_LeftDelimiter);
	m_PartnerTradeWeightMax	= UIHelper::CreateStatic(uiXml, "left_delimiter:trade_weight_max", m_LeftDelimiter);
	m_PartnerTradeCaption->AdjustWidthToText();

	m_ActorBottomInfo	= UIHelper::CreateStatic(uiXml, "actor_weight_caption", this);
	m_ActorWeight		= UIHelper::CreateStatic(uiXml, "actor_weight", this);
	m_ActorWeightMax	= UIHelper::CreateStatic(uiXml, "actor_weight_max", this);
	m_ActorBottomInfo->AdjustWidthToText();

	m_PartnerBottomInfo	= UIHelper::CreateStatic(uiXml, "partner_weight_caption", this);
	m_PartnerWeight		= UIHelper::CreateStatic(uiXml, "partner_weight", this);
	m_PartnerBottomInfo->AdjustWidthToText();
	m_PartnerWeight_end_x = m_PartnerWeight->GetWndPos().x;

	m_pInventoryBagList			= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_bag", this);
	m_pInventoryBeltList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_belt", this);
	m_pInventoryOutfitList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_outfit", this);
	m_pInventoryDetectorList	= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_detector", this);
	m_pInventoryPistolList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_pistol", this);
	m_pInventoryAutomaticList	= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_automatic", this);
	m_pTradeActorBagList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_actor_trade_bag", this);
	m_pTradeActorList			= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_actor_trade", this);
	m_pTradePartnerBagList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_partner_bag", this);
	m_pTradePartnerList			= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_partner_trade", this);

#ifdef INV_KNIFE_SLOT
	m_pInventoryKnifeList		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_knife", this);
#endif

#ifdef INV_TORCH_SLOT
	m_pInventoryTorchList 		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_torch", this);
#endif

#ifdef INV_BINO_SLOT
	m_pInventoryBinoList 		= UIHelper::CreateDragDropListEx(uiXml, "dragdrop_bino", this);
#endif

#ifdef DRAG_DROP_TRASH
	m_pTrashList = UIHelper::CreateDragDropListEx(uiXml, "dragdrop_trash", this);
	m_pTrashList->m_f_item_drop = CUIDragDropListEx::DRAG_DROP_EVENT(this, &CUIActorMenu::OnItemDrop);
	m_pTrashList->m_f_drag_event = CUIDragDropListEx::DRAG_ITEM_EVENT(this, &CUIActorMenu::OnDragItemOnTrash);
#endif

#ifdef EXT_BELT
	e_af_count = uiXml.ReadAttribInt("dragdrop_belt", 0, "rows_num", 5); //+
	clamp(e_af_count, u32(5), u32(16));
	e_af_count_base = e_af_count - 5;// reserv for outfit
	m_belt_list_over.resize(e_af_count);
#endif //EXT_BELT

	m_belt_list_over[0] = UIHelper::CreateStatic(uiXml, "belt_list_over", this);
	Fvector2 pos;
	pos = m_belt_list_over[0]->GetWndPos();
	float dy = uiXml.ReadAttribFlt("belt_list_over", 0, "dy", 10.0f);
	for ( u8 i = 1; i < e_af_count; ++i )
	{
		pos.y += dy;
		m_belt_list_over[i] = UIHelper::CreateStatic(uiXml, "belt_list_over", this);
		m_belt_list_over[i]->SetWndPos( pos );
	}

	m_ActorMoney	= UIHelper::CreateStatic(uiXml, "actor_money_static", this);
	m_PartnerMoney	= UIHelper::CreateStatic(uiXml, "partner_money_static", this);
	
	m_trade_button		= UIHelper::Create3tButtonEx(uiXml, "trade_button", this);
	m_takeall_button	= UIHelper::Create3tButtonEx(uiXml, "takeall_button", this);
	m_exit_button		= UIHelper::Create3tButtonEx(uiXml, "exit_button", this);

	m_clock_value						= UIHelper::CreateStatic(uiXml, "clock_value", this);

	m_pDeadBodyBagList					= new CUIDragDropListEx(); 
	AttachChild							(m_pDeadBodyBagList);
	m_pDeadBodyBagList->SetAutoDelete	(true);
	xml_init.InitDragDropListEx			(uiXml, "dragdrop_deadbody_bag", 0, m_pDeadBodyBagList);

	m_ActorStateInfo					= new ui_actor_state_wnd();
	m_ActorStateInfo->init_from_xml		(uiXml, "actor_state_info");
	m_ActorStateInfo->SetAutoDelete		(true);
	AttachChild							(m_ActorStateInfo); 

	XML_NODE* stored_root				= uiXml.GetLocalRoot	();
	uiXml.SetLocalRoot					(uiXml.NavigateToNode	("action_sounds",0));
	::Sound->create						(sounds[eSndOpen],		uiXml.Read("snd_open",			0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eSndClose],		uiXml.Read("snd_close",			0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eItemToSlot],	uiXml.Read("snd_item_to_slot",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eItemToBelt],	uiXml.Read("snd_item_to_belt",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eItemToRuck],	uiXml.Read("snd_item_to_ruck",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eProperties],	uiXml.Read("snd_properties",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eDropItem],		uiXml.Read("snd_drop_item",		0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eAttachAddon],	uiXml.Read("snd_attach_addon",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eDetachAddon],	uiXml.Read("snd_detach_addon",	0,	NULL),st_Effect,sg_SourceType);
	::Sound->create						(sounds[eItemUse],		uiXml.Read("snd_item_use",		0,	NULL),st_Effect,sg_SourceType);
	uiXml.SetLocalRoot					(stored_root);

	m_ItemInfo							= new CUIItemInfo();
//-	m_ItemInfo->SetAutoDelete			(true);
//-	AttachChild							(m_ItemInfo);
	m_ItemInfo->InitItemInfo			("actor_menu_item.xml");

	m_upgrade_info						= NULL;
	if ( ai().get_alife() )
	{
		m_upgrade_info						= new UIInvUpgradeInfo();
		m_upgrade_info->SetAutoDelete		(true);
		AttachChild							(m_upgrade_info);
		m_upgrade_info->init_from_xml		("actor_menu_item.xml");
	}

	m_message_box_yes_no				= new CUIMessageBoxEx();	
	m_message_box_yes_no->InitMessageBox( "message_box_yes_no" );
	m_message_box_yes_no->SetAutoDelete	(true);
	m_message_box_yes_no->SetText		( "" );

	m_message_box_ok					= new CUIMessageBoxEx();	
	m_message_box_ok->InitMessageBox	( "message_box_ok" );
	m_message_box_ok->SetAutoDelete		(true);
	m_message_box_ok->SetText			( "" );

	m_UIPropertiesBox					= new CUIPropertiesBox();
	AttachChild							(m_UIPropertiesBox);
	m_UIPropertiesBox->InitPropertiesBox(Fvector2().set(0,0),Fvector2().set(300,300));
	m_UIPropertiesBox->Hide				();
	m_UIPropertiesBox->SetWindowName	( "property_box" );

	InitCallbacks						();

	BindDragDropListEvents				(m_pInventoryBeltList);		
	BindDragDropListEvents				(m_pInventoryPistolList);		
	BindDragDropListEvents				(m_pInventoryAutomaticList);	
	BindDragDropListEvents				(m_pInventoryOutfitList);	
	BindDragDropListEvents				(m_pInventoryDetectorList);	
	BindDragDropListEvents				(m_pInventoryBagList);
	BindDragDropListEvents				(m_pTradeActorBagList);
	BindDragDropListEvents				(m_pTradeActorList);
	BindDragDropListEvents				(m_pTradePartnerBagList);
	BindDragDropListEvents				(m_pTradePartnerList);
	BindDragDropListEvents				(m_pDeadBodyBagList);

#ifdef INV_KNIFE_SLOT
	BindDragDropListEvents				(m_pInventoryKnifeList);
#endif

#ifdef INV_TORCH_SLOT
	BindDragDropListEvents				(m_pInventoryTorchList);
#endif

#ifdef INV_BINO_SLOT
	BindDragDropListEvents				(m_pInventoryBinoList);
#endif

#ifdef DRAG_DROP_TRASH
	m_allowed_drops[iTrashSlot].push_back(iActorBag);
	m_allowed_drops[iTrashSlot].push_back(iActorSlot);
	m_allowed_drops[iTrashSlot].push_back(iActorBelt);
#endif 

	m_allowed_drops[iActorSlot].push_back(iActorBag);
	m_allowed_drops[iActorSlot].push_back(iActorTrade);
	m_allowed_drops[iActorSlot].push_back(iDeadBodyBag);

	m_allowed_drops[iActorBag].push_back(iActorSlot);
	m_allowed_drops[iActorBag].push_back(iActorBelt);
	m_allowed_drops[iActorBag].push_back(iActorTrade);
	m_allowed_drops[iActorBag].push_back(iDeadBodyBag);
	m_allowed_drops[iActorBag].push_back(iActorBag);
	
	m_allowed_drops[iActorBelt].push_back(iActorBag);
	m_allowed_drops[iActorBelt].push_back(iActorTrade);
	m_allowed_drops[iActorBelt].push_back(iDeadBodyBag);
	m_allowed_drops[iActorBelt].push_back(iActorBelt);

	m_allowed_drops[iActorTrade].push_back(iActorSlot);
	m_allowed_drops[iActorTrade].push_back(iActorBag);
	m_allowed_drops[iActorTrade].push_back(iActorBelt);
	m_allowed_drops[iActorTrade].push_back(iActorTrade);

	m_allowed_drops[iPartnerTradeBag].push_back(iPartnerTrade);
	m_allowed_drops[iPartnerTradeBag].push_back(iPartnerTradeBag);
	m_allowed_drops[iPartnerTrade].push_back(iPartnerTradeBag);
	m_allowed_drops[iPartnerTrade].push_back(iPartnerTrade);

	m_allowed_drops[iDeadBodyBag].push_back(iActorSlot);
	m_allowed_drops[iDeadBodyBag].push_back(iActorBag);
	m_allowed_drops[iDeadBodyBag].push_back(iActorBelt);
	m_allowed_drops[iDeadBodyBag].push_back(iDeadBodyBag);

	m_upgrade_selected					= NULL;
	SetCurrentItem						(NULL);
	SetActor							(NULL);
	SetPartner							(NULL);
	SetInvBox							(NULL);

	m_actor_trade						= NULL;
	m_partner_trade						= NULL;
	m_repair_mode						= false;

	DeInitInventoryMode					();
	DeInitTradeMode						();
	DeInitUpgradeMode					();
	DeInitDeadBodySearchMode			();
}