hex_viewer_scene_scene_4.c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include "../hex_viewer.h"
  2. void hex_viewer_scene_scene_4_on_enter(void* context) {
  3. furi_assert(context);
  4. Boilerplate* app = context;
  5. DialogsFileBrowserOptions browser_options;
  6. // This will filter the browser to only show one file type and also add an icon
  7. dialog_file_browser_set_basic_options(&browser_options, SUBGHZ_APP_EXTENSION, &I_sub1_10px);
  8. //Get the Folder you want to browse
  9. browser_options.base_path = SUBGHZ_APP_FOLDER;
  10. FuriString* path;
  11. path = furi_string_alloc();
  12. furi_string_set(path, SUBGHZ_APP_FOLDER);
  13. bool success = dialog_file_browser_show(
  14. app->dialogs, app->file_path, path, &browser_options);
  15. furi_string_free(path);
  16. if(success) {
  17. // Do something with the result in app->file_path
  18. }
  19. if(success) {
  20. // Load page to do something with result
  21. //scene_manager_next_scene(app->scene_manager, BoilerplateViewIdMenu);
  22. scene_manager_previous_scene(app->scene_manager); // temp for showcase
  23. } else {
  24. // This is basically if someone quites the browser
  25. scene_manager_previous_scene(app->scene_manager);
  26. }
  27. }
  28. bool hex_viewer_scene_scene_4_on_event(void* context, SceneManagerEvent event) {
  29. UNUSED(context);
  30. UNUSED(event);
  31. bool consumed = true;
  32. return consumed;
  33. }
  34. void hex_viewer_scene_scene_4_on_exit(void* context) {
  35. UNUSED(context);
  36. }