Blinking characters
-
I would like to display blinking characters to the Core2 UI. Any ideas on how I can do this? Is this possible with UIFlow?
-
@marcvl said in Blinking characters:
I would like to display blinking characters to the Core2 UI. Any ideas on how I can do this? Is this possible with UIFlow?
At first thought, you could use a recurring (periodic) timer and overwrite the same text string with the background color, then back to the font color. That should produce a blinking pattern, but I have not tested it yet.
-
If my understanding is correct, you can only have one active timer running at any given moment. The blinking is used to indicate that another timer is running, so I wouldn’t be able to start a new timer without interrupting the other one.
Is there no custom code I could create to generate a blinking effect?
-
You can have multiple timers running at the same time. I like to off-set them by an odd number of milliseconds to reduce the chance of them firing at exactly the same time, but that's up to you and how complicated or time sensitive your program is going to be. Here is an example of two timers running: one for a simple 1-second counter and the other will blink the text in 133 ms periods while the other timer is running (called from the seconds_timer). Buttons A and B will start and stop the counter.
You could also achieve the same blinking text with the
Set label0 show/hide
block, instead of toggling the text color between the primary color and the background color. That worked for me as well. -
That's great! Now, I must be going crazy... I implemented your exact code and my text doesn't blink... It blinks once when I start the timer and that's it.
-
And if I remove the second timer and implement blinking as part of timer 1, then it works. Which is why I originally thought you could only have 1 timer.
-
@marcvl said in Blinking characters:
I implemented your exact code
Not quite exact... I see your issue. You are missing one block that differs from my flow...
-
Embarrassing:). You are right. All works now. I used to put text on the screen using the print function. But doing this as a label is much better. Thanks!
-
@world101 said in Blinking characters:
@marcvl wordle unlimited said in Blinking characters:
I implemented your exact code
Not quite exact... I see your issue. You are missing one block that differs from my flow...
Thank you so so much. This answer was very very useful to me.