AnimatedImageButtonStyle
An animated image button style. An animated image button style. This class is supposed to be used with one of the ButtonTrigger classes to create a functional button. This class will show the first or last image of an animated image depending on the state of the button (pressed or released). When the state changes the button will show the sequence of images in forward or reversed order.
The AnimatedImageButtonStyle will set the size of the enclosing container (normally AbstractButtonContainer) to the size of the first Bitmap. This can be overridden by calling setWidth/setHeight after setting the bitmaps.
The position of the bitmap can be adjusted with setBitmapXY (default is upper left corner).
Template Parameters:
- T Generic type parameter. Typically a AbstractButtonContainer subclass.
Inherits from: T
Public Functions
| AnimatedImageButtonStyle() | |
| void | setBitmaps(const Bitmap & bitmapStart, const Bitmap & bitmapEnd) |
| Sets the bitmaps. | |
| void | setBitmapXY(uint16_t x, uint16_t y) |
| Sets bitmap x and y. | |
| void | setUpdateTicksInterval(uint8_t updateInterval) |
| Sets update ticks interval. | |
Protected Functions
| virtual void | handleAlphaUpdated() |
| Handles what should happen when the alpha is updated. | |
| virtual void | handlePressedUpdated() |
| Handles what should happen when the pressed state is updated. | |
Protected Attributes
| AnimatedImage | buttonAnimatedImage |
| The button animated image. | |
Public Functions Documentation
AnimatedImageButtonStyle
setBitmaps
| void setBitmaps | ( | const Bitmap & | bitmapStart , | ||
| const Bitmap & | bitmapEnd | ||||
| ) |
Sets the bitmaps.
| bitmapStart | The bitmap start. |
| bitmapEnd | The bitmap end. |
setBitmapXY
| void setBitmapXY | ( | uint16_t | x , | ||
| uint16_t | y | ||||
| ) |
Sets bitmap x and y.
| x | An uint16_t to process. |
| y | An uint16_t to process. |
setUpdateTicksInterval
| void setUpdateTicksInterval | ( | uint8_t | updateInterval | ) | |
Sets update ticks interval.
| updateInterval | The update interval. |
Protected Functions Documentation
handleAlphaUpdated
| virtual void handleAlphaUpdated | ( | ) |
Handles what should happen when the alpha is updated.
handlePressedUpdated
| virtual void handlePressedUpdated | ( | ) |
Handles what should happen when the pressed state is updated.
Protected Attributes Documentation
buttonAnimatedImage
AnimatedImage buttonAnimatedImage
The button animated image.