mfc_editor_scene_file_select.c 886 B

123456789101112131415161718192021222324252627
  1. #include "../mfc_editor_app_i.h"
  2. void mfc_editor_scene_file_select_on_enter(void* context) {
  3. MfcEditorApp* instance = context;
  4. if(mfc_editor_prompt_load_file(instance)) {
  5. if(nfc_device_get_protocol(instance->nfc_device) == NfcProtocolMfClassic) {
  6. FURI_LOG_I(
  7. TAG, "Valid MFC file selected at '%s'", furi_string_get_cstr(instance->file_path));
  8. scene_manager_previous_scene(instance->scene_manager);
  9. } else {
  10. scene_manager_next_scene(instance->scene_manager, MfcEditorSceneInvalidFile);
  11. }
  12. } else {
  13. scene_manager_previous_scene(instance->scene_manager);
  14. }
  15. }
  16. bool mfc_editor_scene_file_select_on_event(void* context, SceneManagerEvent event) {
  17. UNUSED(context);
  18. UNUSED(event);
  19. return false;
  20. }
  21. void mfc_editor_scene_file_select_on_exit(void* context) {
  22. UNUSED(context);
  23. }