forked from flipperdevices/flipperzero-firmware
-
-
Notifications
You must be signed in to change notification settings - Fork 543
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
62 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
const char* acknowledgements_text = | ||
"The developers of Picopass would like to humbly acknowledge the work of those who came before and made this possible.\nWe stand on the shoulders of giants.\nFlavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and Milosch Meriac for their research on iClass. Martin HS (holiman) for their work on the loclass library. Iceman and the Proxmark3 community."; |
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,47 @@ | ||
#include "../picopass_i.h" | ||
#include <dolphin/dolphin.h> | ||
#include "../acknowledgements.h" | ||
|
||
void picopass_scene_acknowledgements_widget_callback( | ||
GuiButtonType result, | ||
InputType type, | ||
void* context) { | ||
Picopass* picopass = context; | ||
if(type == InputTypeShort) { | ||
view_dispatcher_send_custom_event(picopass->view_dispatcher, result); | ||
} | ||
} | ||
|
||
void picopass_scene_acknowledgements_on_enter(void* context) { | ||
Picopass* picopass = context; | ||
|
||
furi_string_reset(picopass->text_box_store); | ||
|
||
FuriString* str = picopass->text_box_store; | ||
furi_string_cat_printf(str, "%s\n", acknowledgements_text); | ||
|
||
text_box_set_font(picopass->text_box, TextBoxFontText); | ||
text_box_set_text(picopass->text_box, furi_string_get_cstr(picopass->text_box_store)); | ||
view_dispatcher_switch_to_view(picopass->view_dispatcher, PicopassViewTextBox); | ||
} | ||
|
||
bool picopass_scene_acknowledgements_on_event(void* context, SceneManagerEvent event) { | ||
Picopass* picopass = context; | ||
bool consumed = false; | ||
|
||
if(event.type == SceneManagerEventTypeCustom) { | ||
if(event.event == GuiButtonTypeLeft) { | ||
consumed = scene_manager_previous_scene(picopass->scene_manager); | ||
} | ||
} else if(event.type == SceneManagerEventTypeBack) { | ||
consumed = scene_manager_previous_scene(picopass->scene_manager); | ||
} | ||
return consumed; | ||
} | ||
|
||
void picopass_scene_acknowledgements_on_exit(void* context) { | ||
Picopass* picopass = context; | ||
|
||
// Clear views | ||
text_box_reset(picopass->text_box); | ||
} |
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