‎2021-04-06 10:16 PM
In the TouchGFX program, there are Model, A_Screen, and B_Screen.
It's working in A_Screen, and it's working in Model::tick()
When I have time, I want to move the screen to B_Screen.
To do this, I want to know what to do in Model::tick() to switch from A_Screen to B_Screen.
If anyone knows how, ask me for advice.
Thank you.
Solved! Go to Solution.
‎2021-04-07 06:52 AM
Here's what I did.
static_cast<FrontendApplication*>(Application::getInstance())->goto<screenName>ScreenNoTransition();
‎2021-04-07 06:52 AM
Here's what I did.
static_cast<FrontendApplication*>(Application::getInstance())->goto<screenName>ScreenNoTransition();
‎2021-04-07 07:17 PM
Thank you for teaching me a good way.
I found another way, similar to what you told me.
1. Create a button on the B_Screen (this button has an invisible property). Insert the code that switches the screen to B_Screen using the button function.
2. Copy the class of B_Screen to model.c and call the button made by B_Screen using the class copied.
I did it this way, but I checked that I was doing the action I wanted.
I will test again the way you told me.
Thank you so much from the bottom of my heart
‎2021-04-08 01:04 AM
I'll chip in just to say that I do this as well, it is more than fine but I agree that Michael's solution is cleaner :grinning_face_with_sweat: either with a dummy hardware button or a dummy widget button that i put outside of the canvas.
/Romain
‎2021-04-08 10:48 AM
You're welcome, glad it worked out!