~baltix/+junk/irrlicht-test

« back to all changes in this revision

Viewing changes to source/Irrlicht/CGUIImageList.h

  • Committer: Mantas Kriaučiūnas
  • Date: 2011-07-18 13:06:25 UTC
  • Revision ID: mantas@akl.lt-20110718130625-c5pvifp61e7kj1ol
Included whole irrlicht SVN libraries to work around launchpad recipe issue with quilt, see https://answers.launchpad.net/launchpad/+question/165193

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This file is part of the "Irrlicht Engine".
 
2
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
 
3
 
 
4
#ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__
 
5
#define __C_GUI_IMAGE_LIST_H_INCLUDED__
 
6
 
 
7
#include "IGUIImageList.h"
 
8
#include "IVideoDriver.h"
 
9
 
 
10
namespace irr
 
11
{
 
12
namespace gui
 
13
{
 
14
 
 
15
class CGUIImageList : public IGUIImageList
 
16
{
 
17
public:
 
18
 
 
19
        //! constructor
 
20
        CGUIImageList( video::IVideoDriver* Driver );
 
21
 
 
22
        //! destructor
 
23
        virtual ~CGUIImageList();
 
24
 
 
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
 
29
        //! \return
 
30
        //! true if the image list was created
 
31
        bool createImageList( 
 
32
                                video::ITexture*                        texture, 
 
33
                                core::dimension2d<s32>  imageSize, 
 
34
                                bool                                                    useAlphaChannel );
 
35
 
 
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 );
 
43
 
 
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; }
 
48
 
 
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
 
52
        { return ImageSize; }
 
53
 
 
54
private:
 
55
 
 
56
        video::IVideoDriver*            Driver;
 
57
        video::ITexture*                        Texture;
 
58
        s32                                                     ImageCount;
 
59
        core::dimension2d<s32>  ImageSize;
 
60
        s32                                                     ImagesPerRow;
 
61
        bool                                                    UseAlphaChannel;
 
62
};
 
63
 
 
64
} // end namespace gui
 
65
} // end namespace irr
 
66
 
 
67
#endif
 
68