forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 562
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Begins work on rename playlist feature
- Loading branch information
Showing
6 changed files
with
77 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "nfc_playlist.h" | ||
#include "scences/text_input.h" | ||
|
||
void nfc_playlist_text_input_menu_callback(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
scene_manager_previous_scene(nfc_playlist->scene_manager); | ||
} | ||
|
||
void nfc_playlist_text_input_scene_on_enter(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
|
||
text_input_set_header_text(nfc_playlist->text_input, "Enter new file name"); | ||
text_input_set_minimum_length(nfc_playlist->text_input, 1); | ||
text_input_set_result_callback(nfc_playlist->text_input, nfc_playlist_text_input_menu_callback, nfc_playlist, nfc_playlist->text_input_data, 50, true); | ||
view_dispatcher_switch_to_view(nfc_playlist->view_dispatcher, NfcPlaylistView_TextInput); | ||
} | ||
|
||
bool nfc_playlist_text_input_scene_on_event(void* context, SceneManagerEvent event) { | ||
UNUSED(event); | ||
UNUSED(context); | ||
return false; | ||
} | ||
|
||
void nfc_playlist_text_input_scene_on_exit(void* context) { | ||
NfcPlaylist* nfc_playlist = context; | ||
text_input_reset(nfc_playlist->text_input); | ||
} |
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,12 @@ | ||
#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> | ||
#include <gui/modules/text_input.h> | ||
#include <storage/storage.h> | ||
|
||
void nfc_playlist_text_input_scene_on_enter(void* context); | ||
bool nfc_playlist_text_input_scene_on_event(void* context, SceneManagerEvent event); | ||
void nfc_playlist_text_input_scene_on_exit(void* context); |