2021-05-31 11:29 AM
I have a screen and two buttons.
With one I change the value, e.g. uint8_t sec. The other one changes the screen.
How to set that when sec = 0 it is impossible to change the screen. It could be changed with other sec values.
greetings
Andrzej
Solved! Go to Solution.
2021-06-01 05:34 AM
2021-06-01 03:27 AM
Hi,
I suppose you are currently using an Interaction with as Action "Change screen" when the button is pressed ? If yes one way to do this could be to use for this same Interaction as Trigger a fake "Hardware button is clicked" instead of the button. You then create another Interaction with as Trigger the real button and as Action "Call new virtual function". Then in code you just need to overwrite this function in your <screen name>View.cpp with something like this for example:
void Screen1View::function_changeScreen()
{
if (sec != 0 )
{
application().gotoScreen2ScreenNoTransition();
}
}
I'll attach a small example.
/Romain
2021-06-01 04:41 AM
Thank you. What can open this file?
Andrzej
2021-06-01 04:44 AM
It is just a zip file, so any zip tool can be used
/Romain
2021-06-01 04:54 AM
Checking.
Andrzej
2021-06-01 05:12 AM
I do not know. I have an Acer laptop, Window 10, and I'm using the file explorer. I downloaded the program and saved it. He saved himself as blockTransition plik7Z. But in the exploiter, it slides to open as txt.
Andrzej
2021-06-01 05:23 AM
zip
2021-06-01 05:25 AM
Not a 7Z but a zip.
Andrzej
2021-06-01 05:34 AM
2021-06-01 08:04 AM
Thank you.
Is OK
Andrzej