file_exists_error.c 1.0 KB

12345678910111213141516171819202122232425
  1. #include "nfc_playlist.h"
  2. #include "scences/file_exists_error.h"
  3. void nfc_playlist_file_exists_error_scene_on_enter(void* context) {
  4. NfcPlaylist* nfc_playlist = context;
  5. popup_reset(nfc_playlist->popup);
  6. popup_set_header(nfc_playlist->popup, "ERROR File Already Exists", 64, 10, AlignCenter, AlignTop);
  7. popup_set_text(nfc_playlist->popup, "The file already exists, Press back to try again", 64, 50, AlignCenter, AlignTop);
  8. popup_set_context(nfc_playlist->popup, nfc_playlist);
  9. view_dispatcher_switch_to_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileExistsError);
  10. start_blink(nfc_playlist, NfcPlaylistLedState_Error);
  11. }
  12. bool nfc_playlist_file_exists_error_scene_on_event(void* context, SceneManagerEvent event) {
  13. UNUSED(event);
  14. UNUSED(context);
  15. return false;
  16. }
  17. void nfc_playlist_file_exists_error_scene_on_exit(void* context) {
  18. NfcPlaylist* nfc_playlist = context;
  19. stop_blink(nfc_playlist);
  20. popup_reset(nfc_playlist->popup);
  21. scene_manager_previous_scene(nfc_playlist->scene_manager);
  22. }