File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -181,9 +181,14 @@ def make_model():
181
181
# 3. Buttons
182
182
playing = solara .use_reactive (False )
183
183
184
+ # 4. Status indicators
185
+ #: current round step count
186
+ step = solara .use_reactive (False )
187
+
184
188
def on_value_play (change ):
185
189
if viz .model .running :
186
190
viz .do_step ()
191
+ step .value = viz .model .schedule .steps
187
192
else :
188
193
playing .value = False
189
194
@@ -207,6 +212,12 @@ def on_value_play(change):
207
212
playing = playing .value ,
208
213
on_playing = playing .set ,
209
214
)
215
+ widgets .IntText (
216
+ value = step .value ,
217
+ description = "Step:" ,
218
+ disabled = True ,
219
+ interval = play_interval ,
220
+ )
210
221
# threaded_do_play is not used for now because it
211
222
# doesn't work in Google colab. We use
212
223
# ipywidgets.Play until it is fixed. The threading
You can’t perform that action at this time.
0 commit comments