xremote_scene_xr_list.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #include "../xremote.h"
  2. void xremote_scene_xr_list_on_enter(void* context) {
  3. XRemote* app = context;
  4. DialogsFileBrowserOptions browser_options;
  5. dialog_file_browser_set_basic_options(&browser_options, XREMOTE_APP_EXTENSION, &I_xr_10px);
  6. browser_options.base_path = XREMOTE_APP_FOLDER;
  7. FuriString* path;
  8. path = furi_string_alloc();
  9. furi_string_set(path, XREMOTE_APP_FOLDER);
  10. bool success = dialog_file_browser_show(
  11. //app->dialogs, app->file_path, app->file_path, &browser_options);
  12. app->dialogs,
  13. app->file_path,
  14. path,
  15. &browser_options);
  16. furi_string_free(path);
  17. if(success) {
  18. //Load Remote into buffer
  19. success = xremote_cross_remote_load(app->cross_remote, app->file_path);
  20. }
  21. if(success) {
  22. //Load Remote Button View
  23. //scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
  24. scene_manager_next_scene(app->scene_manager, XRemoteSceneTransmit);
  25. } else {
  26. //scene_manager_next_scene(app->scene_manager, XRemoteSceneWip);
  27. scene_manager_previous_scene(app->scene_manager);
  28. }
  29. }
  30. bool xremote_scene_xr_list_on_event(void* context, SceneManagerEvent event) {
  31. UNUSED(context);
  32. UNUSED(event);
  33. bool consumed = true;
  34. return consumed;
  35. }
  36. void xremote_scene_xr_list_on_exit(void* context) {
  37. UNUSED(context);
  38. }