Jump to content

Recommended Posts

Posted

I have implemented a custom draw function for a button (image icon). Due to performance limitations on my system, drawing images is somewhat slow. Because of this, I don't want uGFX to call the draw function every time I press the button as this is unnecessary (I'm not changing the icon upon press) and results in latency. Is there a native or built in way to uGFX that I can implement this?

Posted

Not easily in ugfx V2. V3 (which is still in the design phase) is likely to have a mechanism to handle this.

The solution for uGFX V2 is to copy the source code for the button to your project, rename the create routine to something like gwinButtonExCreate() and then alter the mouse down code so that it doesn't call _gwinUpdate(). For now this is the simplest solution.

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...