1 Star 0 Fork 0

yoyojacky/CSMoE

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ImageList.h 1.36 KB
一键复制 编辑 原始数据 按行查看 历史
//========= Copyright ?1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef IMAGELIST_H
#define IMAGELIST_H
#ifdef _WIN32
#pragma once
#endif
#include <tier1/utlvector.h>
#include <vgui/VGUI2.h>
#include <vgui/IImage.h>
namespace vgui2
{
//-----------------------------------------------------------------------------
// Purpose: holds a collection of images
// used by controls so that images can be refered to by indices
//-----------------------------------------------------------------------------
class ImageList
{
public:
ImageList(bool deleteImagesWhenDone);
~ImageList();
// adds a new image to the list, returning the index it was placed at
int AddImage(vgui2::IImage *image);
// returns the number of images
int GetImageCount();
// returns true if an index is valid
bool IsValidIndex(int imageIndex);
// sets an image at a specified index, growing and adding NULL images if necessary
void SetImageAtIndex(int index, vgui2::IImage *image);
// gets an image, imageIndex is of range [0, GetImageCount)
// image index 0 is always the blank image
vgui2::IImage *GetImage(int imageIndex);
private:
CUtlVector<vgui2::IImage *> m_Images;
bool m_bDeleteImagesWhenDone;
};
} // namespace vgui
#endif // IMAGELIST_H
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yoyojacky/CSMoE.git
git@gitee.com:yoyojacky/CSMoE.git
yoyojacky
CSMoE
CSMoE
master

搜索帮助