Bitmap on button
Posted: Mon Mar 04, 2013 9:01 am
Hi,
I have over the weekend modified the createbutton function to take two extra arguments i.e. a bitmap for "button pushed" and a bitmap for "button released". The new function also uses the size of the bitmap(square) to determine the touch area. Works really nicely and looks great although my additions are a bit of a hack. The buttons can be designed in any bitmap editor (gimp/corel /paint etc) with shading etc.
Does something like this already exist in the source? Had a quick look but couldn't see anything.
I use ST Embedded GUI tool to convert the images to the correct 565 format(in a C array) as as far as I know gimp only generates 24-bit arrays (might be wrong here) .
Cheers
Graeme
I have over the weekend modified the createbutton function to take two extra arguments i.e. a bitmap for "button pushed" and a bitmap for "button released". The new function also uses the size of the bitmap(square) to determine the touch area. Works really nicely and looks great although my additions are a bit of a hack. The buttons can be designed in any bitmap editor (gimp/corel /paint etc) with shading etc.
Does something like this already exist in the source? Had a quick look but couldn't see anything.
I use ST Embedded GUI tool to convert the images to the correct 565 format(in a C array) as as far as I know gimp only generates 24-bit arrays (might be wrong here) .
Cheers
Graeme