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
Bitmap on button
Re: Bitmap on button
Hello Graeme,
This sounds like a VERY useful feature. I would appreciate to see it in the main ChibiOS/GFX source code
You could create a pull request and I'll simply clean up your code - if needed. If you don't know how to use git stuff, you can also mail me your source changes. I'll embed them into the repo then.
It would be also nice if you could write just a few lines to show how to exactly use the new feature (Which GIMP settings are required to convert the picture, how to link the source file and how to call the button routine). I'd then put that on the website.
Well done!
~ Tectu
This sounds like a VERY useful feature. I would appreciate to see it in the main ChibiOS/GFX source code
You could create a pull request and I'll simply clean up your code - if needed. If you don't know how to use git stuff, you can also mail me your source changes. I'll embed them into the repo then.
It would be also nice if you could write just a few lines to show how to exactly use the new feature (Which GIMP settings are required to convert the picture, how to link the source file and how to call the button routine). I'd then put that on the website.
Well done!
~ Tectu
Re: Bitmap on button
Hi Tectu,
Thanks.
Sure. Will have to mail it to you as I am clueless on git stuff. Will send it this evening as I don't have the source with me at work.
Graeme
Thanks.
Sure. Will have to mail it to you as I am clueless on git stuff. Will send it this evening as I don't have the source with me at work.
Graeme
Re: Bitmap on button
That sounds right. My mail can be found here (bottom of the page). Sorry, I don't like to write mail's down in public forums, too much spam crawlers
~ Tectu
~ Tectu
Return to “LCD Driver and Graphic Framework”
Who is online
Users browsing this forum: No registered users and 30 guests