A basic graphics package for the LPC4088 Display Module.
Dependents: lpc4088_displaymodule_demo_sphere sampleGUI sampleEmptyGUI lpc4088_displaymodule_fs_aid ... more
Fork of DMBasicGUI by
Diff: Application/ImageButton.h
- Revision:
- 3:3fabfe3339b8
- Parent:
- 2:efae611de184
- Child:
- 4:a73760d09423
--- a/Application/ImageButton.h Fri Dec 19 07:37:24 2014 +0000 +++ b/Application/ImageButton.h Fri Dec 19 09:12:51 2014 +0100 @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef BUTTON_H -#define BUTTON_H +#ifndef IMAGEBUTTON_H +#define IMAGEBUTTON_H #include "Clickable.h" #include "Image.h" @@ -36,12 +36,21 @@ * @param y the upper left corner of the button * @param width the width of the button * @param height the height of the button + */ + ImageButton(COLOR_T* fb, uint16_t x, uint16_t y, uint16_t width, uint16_t height); + ~ImageButton(); + + /** Loads the mandatory "normal" state image and the optional "pressed" state image + * * @param imgUp the image for the normal state * @param imgDown the image for the pressed state (or NULL to use the same) + * + * @returns + * true on success + * false on failure */ - ImageButton(COLOR_T* fb, uint16_t x, uint16_t y, uint16_t width, uint16_t height, const char* imgUp, const char* imgDown = 0); - ~ImageButton(); - + bool loadImages(const char* imgUp, const char* imgDown = 0); + /** Draws the button */ virtual void draw(); @@ -51,4 +60,4 @@ Image::ImageData_t _imgDown; }; -#endif /* BUTTON_H */ +#endif /* IMAGEBUTTON_H */