forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from acegoal07/file-select
File select
- Loading branch information
Showing
10 changed files
with
173 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "nfc_playlist.h" | ||
#include "scences/file_select.h" | ||
|
||
void nfc_playlist_file_select_menu_callback(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
scene_manager_previous_scene(nfc_playlist->scene_manager); | ||
} | ||
|
||
void nfc_playlist_file_select_scene_on_enter(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
file_browser_configure( | ||
nfc_playlist->file_browser, | ||
".txt", | ||
furi_string_get_cstr(nfc_playlist->base_file_path), | ||
true, | ||
true, | ||
&I_sub1_10px, | ||
false); | ||
view_dispatcher_switch_to_view(nfc_playlist->view_dispatcher, NfcPlaylistView_FileSelect); | ||
file_browser_set_callback(nfc_playlist->file_browser, nfc_playlist_file_select_menu_callback, nfc_playlist); | ||
file_browser_start(nfc_playlist->file_browser, nfc_playlist->base_file_path); | ||
} | ||
|
||
bool nfc_playlist_file_select_scene_on_event(void* context, SceneManagerEvent event) { | ||
UNUSED(event); | ||
UNUSED(context); | ||
bool consumed = false; | ||
return consumed; | ||
} | ||
|
||
void nfc_playlist_file_select_scene_on_exit(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
file_browser_stop(nfc_playlist->file_browser); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#pragma once | ||
#include <furi.h> | ||
#include <gui/gui.h> | ||
#include <gui/view_dispatcher.h> | ||
#include <gui/scene_manager.h> | ||
#include <gui/modules/file_browser.h> | ||
|
||
void nfc_playlist_file_select_scene_on_enter(void* context); | ||
bool nfc_playlist_file_select_scene_on_event(void* context, SceneManagerEvent event); | ||
void nfc_playlist_file_select_scene_on_exit(void* context); |
Oops, something went wrong.