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