Add some getters to IGUIImage: getImage, getColor
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3520 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
a204bb3543
commit
481f550313
|
@ -1,5 +1,7 @@
|
|||
Changes in 1.8 (??.??.2011)
|
||||
|
||||
- Add some getters to IGUIImage: getImage, getColor
|
||||
|
||||
- API change: Added write only lock mode for textures. The lock method has changed the signature and uses an enum parameter now instead of a bool. The default is still to lock for read/write (previously 'false'). The old 'true' value should be replaced by ETLM_READ_ONLY.
|
||||
|
||||
- Speedup deleting of particles
|
||||
|
|
|
@ -25,10 +25,13 @@ namespace gui
|
|||
IGUIImage(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle)
|
||||
: IGUIElement(EGUIET_IMAGE, environment, parent, id, rectangle) {}
|
||||
|
||||
//! Sets an image
|
||||
//! Sets an image texture
|
||||
virtual void setImage(video::ITexture* image) = 0;
|
||||
|
||||
//! Sets the colour of the image
|
||||
//! Gets the image texture
|
||||
virtual video::ITexture* getImage() const = 0;
|
||||
|
||||
//! Sets the color of the image
|
||||
virtual void setColor(video::SColor color) = 0;
|
||||
|
||||
//! Sets if the image should scale to fit the element
|
||||
|
@ -37,6 +40,9 @@ namespace gui
|
|||
//! Sets if the image should use its alpha channel to draw itself
|
||||
virtual void setUseAlphaChannel(bool use) = 0;
|
||||
|
||||
//! Gets the color of the image
|
||||
virtual video::SColor getColor() const = 0;
|
||||
|
||||
//! Returns true if the image is scaled to fit, false if not
|
||||
virtual bool isImageScaled() const = 0;
|
||||
|
||||
|
|
|
@ -49,6 +49,11 @@ void CGUIImage::setImage(video::ITexture* image)
|
|||
Texture->grab();
|
||||
}
|
||||
|
||||
//! Gets the image texture
|
||||
video::ITexture* CGUIImage::getImage() const
|
||||
{
|
||||
return Texture;
|
||||
}
|
||||
|
||||
//! sets the color of the image
|
||||
void CGUIImage::setColor(video::SColor color)
|
||||
|
@ -56,6 +61,11 @@ void CGUIImage::setColor(video::SColor color)
|
|||
Color = color;
|
||||
}
|
||||
|
||||
//! Gets the color of the image
|
||||
video::SColor CGUIImage::getColor() const
|
||||
{
|
||||
return Color;
|
||||
}
|
||||
|
||||
//! draws the element and its children
|
||||
void CGUIImage::draw()
|
||||
|
|
|
@ -28,6 +28,9 @@ namespace gui
|
|||
//! sets an image
|
||||
virtual void setImage(video::ITexture* image);
|
||||
|
||||
//! Gets the image texture
|
||||
virtual video::ITexture* getImage() const;
|
||||
|
||||
//! sets the color of the image
|
||||
virtual void setColor(video::SColor color);
|
||||
|
||||
|
@ -40,6 +43,9 @@ namespace gui
|
|||
//! sets if the image should use its alpha channel to draw itself
|
||||
virtual void setUseAlphaChannel(bool use);
|
||||
|
||||
//! Gets the color of the image
|
||||
virtual video::SColor getColor() const;
|
||||
|
||||
//! Returns true if the image is scaled to fit, false if not
|
||||
virtual bool isImageScaled() const;
|
||||
|
||||
|
|
Loading…
Reference in New Issue