From c6cf9a6a9c03f17362171aeed1a22244d99b7530 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Tue, 3 Feb 2009 17:33:47 -0700 Subject: Disable alpha values affecting two widgets which would otherwise take alpha values under SDL. Signed-off-by: Ira Rice --- src/resources/image.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/resources') diff --git a/src/resources/image.h b/src/resources/image.h index a4048803..5b376053 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -91,6 +91,12 @@ class Image : public Resource */ virtual void unload(); + /** + * Returns the image. + */ + virtual const Image* getImage() const + { return this; } + /** * Returns the width of the image. */ @@ -114,7 +120,7 @@ class Image : public Resource /** * Sets the alpha value of this image. */ - void setAlpha(float alpha); + virtual void setAlpha(float alpha); /** * Returns the alpha value of this image. @@ -180,6 +186,12 @@ class SubImage : public Image */ ~SubImage(); + /** + * Returns the image. + */ + virtual const Image* getImage() const + { return mParent; } + /** * Creates a new image with the desired clipping rectangle. * -- cgit v1.2.3-70-g09d2