How to add delay in TouchGFX application?
I'm trying to develop an application where i have to display 3 different texts for 5 secs for 3 cycles and then change to different screen.
I'm adding 3 interactions for this.
- Delay for 1 sec when screen1 is entered.
- Execute C++ code when interaction1 is done.
code i'm writing is
for(int i=1;i<=3;i++)
{
textArea.setTypedText(TypedText(T_R1));
textArea.invalidate();
Sleep(5000);
textArea.setTypedText(TypedText(T_R2));
textArea.invalidate();
Sleep(5000);
textArea.setTypedText(TypedText(T_R3));
textArea.invalidate();
Sleep(5000);
}
Here i'm adding #include <windows.h> for using Sleep();
3. After interaction 2 is done, it has to go to screen 2
It is building fine and running but required functionality i'm not able to achieve. Please help me with the different methods available to do this. i don't mind calling a virtual function.
With the built-in functions "Set Text" and "wait for", i'm able to achieve one cycle only .
Also i tried with tick handling but with this method i could not do as i'm not very familiar with it.
