Closed bastianilso closed 1 year ago
given it takes longer a progress indicator would be great.
@Xav1204 could you make this your next priority? this is important for our partner to get fixed.
It's important we make a clean solution for this, so please read carefully:
First we need a prefab UI dialog shown to the therapist, if the exit button is pressed and we are done saving.
In order to know whether we are saving, we need a function in the LoggingManager.cs
which can be used by the Exit Button via the TherapistUi.cs
to check whether we are still saving. Have a look at the function SaveCallback()
in LoggingManager - this is where you can know whether the LoggingManager has finished saving or not (could be a boolean). And then we need to postpone the Application.Quit()
call until after the saving has finished.
Alternatively, we could use OnApplicationQuit()
inside GameDirector.cs
- but I'm not sure to what extend we can use to to "postpone" quitting. Have a look..
In addition to this, we may want a general text indication in the therapist UI.
I suggest you drive this indication by making LoggingManager emit a UnityEvent
, and use text.SetActive()
@bastianilso At the moment I have put in an indicator to show to the therapist how many files are saved. Should I put in a UI element like a progress bar or something else instead of the text on the left or should I leave it like that?
We can see some updates on the UI elements in particular on the save status on the left bottom and also the number of files which are saved on the right top.
When all the files are not saved, we have the warning message panel which open and at the end of the save, the app closes automatically and we can see that all the csv files are downloaded.
it would be good to have a progress bar. but for now maybe this is sufficient. After the saving is done and the green button appears the pink-ish background should disappear shortly after reaching n/n.
@hendrikknoche thanks for your answer I will do it now.
Hi @Xav1204, in the future please let me know when you make UI decisions that go outside of the mockup - this can save us both time (and potential wasted work). You seem to have decided to go in a different direction than what the designs I made suggest. Currently your design implies that the clinician cannot operate the "Start Game" button as long as the saving is going on. I don't think your suggestion is necessarily a problem, - but we need to be aware that it might present new issues such as how to cancel the operation if it takes too long (or is stuck).
On the other hand, I dont recall what LoggingManager will do if we start recording data, while data is being saved. So it might make sense to have something like this. In this case, I would need a technical rationale like this from you (the developer), so that we can discuss. Otherwise I would just have assumed you followed the directions (screenshots) I gave. 🙂
Is the "1/3" "2/3" "3/3" something you added as a replacement for a percentage?
resolved with #214 #226 #232
Saving to CSV is multi-threaded, to ensure that there is no performance impact on Whack-A-Mole, since saving especially our continuous data can take some processing time. However, there is no UI indication that saving is happening and no warning, if clinicians try to close Whack-A-Mole VR before saving is finished.
We should design some indication to address this and to avoid data loss.