Answer the question
In order to leave comments, you need to log in
How to organize a looped change of pictures?
How to organize I/O switch model? I pressed the button - the picture changed. Again clicked on it - back to the original. and so on ad infinitum.
ps with the first I coped. how to do the opposite? algorithms? Cycles? any ideas!
How to check the status of which picture is currently active?
if ( Image.Source("uri") )
???
Answer the question
In order to leave comments, you need to log in
The switch is an object, its state is the boolean parameter isOn. True - enabled, False - disabled. The object also has a toggle() method that does stupidly:
and then calls a method that redraws the picture. The method of drawing a picture is elementary.
For the general case, you can use a circular queue or similar circular containers. Looked at the first element and at the end of it. Everything is trite and simple!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question