2024-09-26
10:30 AM
- last edited on
2024-09-26
11:21 AM
by
Lina_DABASINSKA
Hi there TouchGFX team!
I have a heart rate variable in my application. On the UI, I have a circle that can be green, yellow or red based on the value of the heart rate variable.
What's the best way of implementing this? I can think in an "if" statement inside the tick handler that checks for the heart rate value but I would like to avoid a polling scenario.
Thanks a lot in advance
Solved! Go to Solution.
2024-09-26 11:13 AM
There are many ways to realise something like this. One would be to create an image object for each coloured circle, the transparency of which can be switched between 0% and 100% as required. This saves computing time and enables lightning-fast switching between the different sprites.
Hope that helps?
Regards
/Peter
2024-09-26 11:13 AM
There are many ways to realise something like this. One would be to create an image object for each coloured circle, the transparency of which can be switched between 0% and 100% as required. This saves computing time and enables lightning-fast switching between the different sprites.
Hope that helps?
Regards
/Peter