1
// This file is part of the "Irrlicht Engine".
2
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
4
#ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__
5
#define __C_GUI_IMAGE_LIST_H_INCLUDED__
7
#include "IGUIImageList.h"
8
#include "IVideoDriver.h"
15
class CGUIImageList : public IGUIImageList
20
CGUIImageList( video::IVideoDriver* Driver );
23
virtual ~CGUIImageList();
25
//! Creates the image list from texture.
26
//! \param texture: The texture to use
27
//! \param imageSize: Size of a single image
28
//! \param useAlphaChannel: true if the alpha channel from the texture should be used
30
//! true if the image list was created
32
video::ITexture* texture,
33
core::dimension2d<s32> imageSize,
34
bool useAlphaChannel );
36
//! Draws an image and clips it to the specified rectangle if wanted
37
//! \param index: Index of the image
38
//! \param destPos: Position of the image to draw
39
//! \param clip: Optional pointer to a rectalgle against which the text will be clipped.
40
//! If the pointer is null, no clipping will be done.
41
virtual void draw( s32 index, const core::position2d<s32>& destPos,
42
const core::rect<s32>* clip = 0 );
44
//! Returns the count of Images in the list.
45
//! \return Returns the count of Images in the list.
46
virtual s32 getImageCount() const
47
{ return ImageCount; }
49
//! Returns the size of the images in the list.
50
//! \return Returns the size of the images in the list.
51
virtual core::dimension2d<s32> getImageSize() const
56
video::IVideoDriver* Driver;
57
video::ITexture* Texture;
59
core::dimension2d<s32> ImageSize;
64
} // end namespace gui
65
} // end namespace irr