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


C++ ImageList::AddImage方法代码示例

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


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

示例1: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseMapsPage::ApplySchemeSettings(IScheme *pScheme)
{
    BaseClass::ApplySchemeSettings(pScheme);

    OnButtonToggled(m_pFilter, false);

    // Images
    ImageList *imageList = new ImageList(false);
    //MOM_TODO: Load custom images for the map selector
    imageList->AddImage(scheme()->GetImage("servers/icon_password", false));//Completed icon (index 1)
    imageList->AddImage(scheme()->GetImage("servers/icon_bots", false));//Linear map icon (index 2)
    imageList->AddImage(scheme()->GetImage("servers/icon_robotron", false));//Staged map icon (index 3)
    //imageList->AddImage(scheme()->GetImage("servers/icon_secure_deny", false));

    int passwordColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_password_column", false));//Completed column header image
    int botColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_bots_column", false));//Map layout (staged/linear) column header image
    //int secureColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_robotron_column", false));
    m_pGameList->SetImageList(imageList, true);
    m_pGameList->SetColumnHeaderImage(HEADER_COMPLETED, passwordColumnImage);
    m_pGameList->SetColumnHeaderImage(HEADER_MAPLAYOUT, botColumnImage);
    //m_pGameList->SetColumnHeaderImage(HEADER_STAGEDMAP, secureColumnImage);

    //Font
    m_hFont = pScheme->GetFont("ListSmall", IsProportional());
    if (!m_hFont)
        m_hFont = pScheme->GetFont("DefaultSmall", IsProportional());
    m_pGameList->SetFont(m_hFont);
}
开发者ID:Asunaya,项目名称:game,代码行数:31,代码来源:BaseMapsPage.cpp

示例2: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: lays out controls
//-----------------------------------------------------------------------------
void DirectorySelectDialog::ApplySchemeSettings(IScheme *pScheme)
{
	ImageList *imageList = new ImageList(false);
	imageList->AddImage(scheme()->GetImage("Resource/icon_folder", false));
	imageList->AddImage(scheme()->GetImage("Resource/icon_folder_selected", false));
	m_pDirTree->SetImageList(imageList, true);

	BaseClass::ApplySchemeSettings(pScheme);
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:12,代码来源:DirectorySelectDialog.cpp

示例3: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: Apply scheme settings
//-----------------------------------------------------------------------------
void PerforceFileList::ApplySchemeSettings(IScheme *pScheme)
{
    BaseClass::ApplySchemeSettings( pScheme );

    ImageList *pImageList = new ImageList( false );
    pImageList->AddImage( scheme()->GetImage( "resource/icon_file", false ) );
    pImageList->AddImage( scheme()->GetImage( "resource/icon_folder", false ) );
    pImageList->AddImage( scheme()->GetImage( "resource/icon_folder_selected", false ) );

    SetImageList( pImageList, true );
}
开发者ID:GOGIBERRY,项目名称:source-sdk-2013,代码行数:14,代码来源:PerforceFileList.cpp

示例4: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseGamesPage::ApplySchemeSettings(IScheme *pScheme)
{
	BaseClass::ApplySchemeSettings(pScheme);

	OnButtonToggled( m_pFilter, false );

	// load the password icon
	ImageList *imageList = new ImageList(false);
	imageList->AddImage(scheme()->GetImage("servers/icon_password", false));
	imageList->AddImage(scheme()->GetImage("servers/icon_bots", false));
	imageList->AddImage(scheme()->GetImage("servers/icon_robotron", false));
	imageList->AddImage(scheme()->GetImage("servers/icon_secure_deny", false));

	int passwordColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_password_column", false));
	int botColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_bots_column", false));
	int secureColumnImage = imageList->AddImage(scheme()->GetImage("servers/icon_robotron_column", false));

	m_pGameList->SetImageList(imageList, true);
	m_hFont = pScheme->GetFont( "ListSmall", IsProportional() );
	if ( !m_hFont )
		m_hFont = pScheme->GetFont( "DefaultSmall", IsProportional() );

	m_pGameList->SetFont( m_hFont );
	m_pGameList->SetColumnHeaderImage(0, passwordColumnImage);
	m_pGameList->SetColumnHeaderImage(1, botColumnImage);
	m_pGameList->SetColumnHeaderImage(2, secureColumnImage);
}
开发者ID:DeadZoneLuna,项目名称:SourceEngine2007,代码行数:30,代码来源:BaseGamesPage.cpp

示例5: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseGamesPage::ApplySchemeSettings(IScheme *pScheme)
{
	BaseClass::ApplySchemeSettings(pScheme);
	m_pGameList->SetFont(pScheme->GetFont("DefaultSmall", IsProportional()));
		// load the password icon
	ImageList *imageList = new ImageList(false);
	s_PasswordImage[0] = 0;	// index 0 is always blank
	s_PasswordImage[1] = imageList->AddImage(scheme()->GetImage("servers/icon_password", false));
	m_pGameList->SetImageList(imageList, true);
	m_pGameList->SetVisible( true );
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:14,代码来源:BaseGamesPage.cpp

示例6: ApplySchemeSettings

//-----------------------------------------------------------------------------
// Purpose: sets up screen
//-----------------------------------------------------------------------------
void CClientScoreBoardDialog::ApplySchemeSettings( IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );
	ImageList *imageList = new ImageList(false);
//	s_VoiceImage[0] = 0;	// index 0 is always blank
//	s_VoiceImage[CVoiceStatus::VOICE_NEVERSPOKEN] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_speaker1", true));
//	s_VoiceImage[CVoiceStatus::VOICE_NOTTALKING] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_speaker2", true));
//	s_VoiceImage[CVoiceStatus::VOICE_TALKING] = imageList->AddImage(scheme()->GetImage( "gfx/vgui/640_speaker3", true));
//	s_VoiceImage[CVoiceStatus::VOICE_BANNED] = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_voiceblocked", true));
	
	TrackerImage = imageList->AddImage(scheme()->GetImage("gfx/vgui/640_scoreboardtracker", true));

	// resize the images to our resolution
	for (int i = 0; i < imageList->GetImageCount(); i++ )
	{
		int wide, tall;
		imageList->GetImage(i)->GetSize(wide, tall);
		imageList->GetImage(i)->SetSize(scheme()->GetProportionalScaledValue(wide), scheme()->GetProportionalScaledValue(tall));
	}

	m_pPlayerList->SetImageList(imageList, false);
	m_pPlayerList->SetVisible( true );
}
开发者ID:RaisingTheDerp,项目名称:raisingthebar,代码行数:26,代码来源:ClientScoreBoardDialog.cpp


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