from Button.hpp:34
class Button : public AbstractButton
{
public:
Button() : AbstractButton(), up(), down(), alpha(255) { }
virtual ~Button() { }
virtual void draw(const Rect& invalidatedArea) const;
virtual void setBitmaps(const Bitmap& bmpReleased, const Bitmap& bmpPressed);
virtual Rect getSolidRect() const;
void setAlpha(uint8_t alpha)
{
this->alpha = alpha;
}
uint8_t getAlpha() const
{
return alpha;
}
Bitmap getCurrentlyDisplayedBitmap() const
{
return (AbstractButton::pressed ? down : up);
}
virtual uint16_t getType() const
{
return (uint16_t)TYPE_BUTTON;
}
protected:
Bitmap up;
Bitmap down;
uint8_t alpha;
};