About BUTTON default transparency and focussable property

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • About BUTTON default transparency and focussable property

    I'm working with a small 320x240 ILI9341-based LCD module and a Cortex-M3 running at 100MHz. I want to be as fast as possible to redraw the elements on the screen, otherwise the user could see some flickering. My platform (small RAM) doesn't allow me to use memory devices, so all drawing operation is really transferred to the ILI9341 controller and this takes some time.

    I noticed BUTTON widget has the transparency flag set by default, immediately after BUTTON_CreateEx(). Do you confirm? I'm using skinning, but my skin redraws the complete rectangular area. So I think it's better to clear the "has transparency" flag to avoid unnecessary redraw of the background window.

    Another optimization can be made on the focussable property. If I have some skinned buttons, I noticed that the previous pressed button is redrawn again when a new button is pressed. I think it happens because the press changes the button with the focus and the skin could show the focus with a graphic element. Because I don't have a keyboard or keypad, I don't need a focus so my skin shows a button the same if it has the focus or it hasn't. In this situation, I think it's better to call the function BUTTON_SetFocussable() passing 0 value. In this way, I can avoid the redraw of the previously pressed button when a new button is pressed. Do you confirm?