nfc_apdu_runner_scene_about.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * @Author: SpenserCai
  3. * @Date: 2025-03-07 16:32:13
  4. * @version:
  5. * @LastEditors: SpenserCai
  6. * @LastEditTime: 2025-03-13 13:07:05
  7. * @Description: file content
  8. */
  9. #include "../nfc_apdu_runner.h"
  10. #include "nfc_apdu_runner_scene.h"
  11. // 关于场景进入回调
  12. void nfc_apdu_runner_scene_about_on_enter(void* context) {
  13. NfcApduRunner* app = context;
  14. TextBox* text_box = app->text_box;
  15. text_box_reset(text_box);
  16. text_box_set_font(text_box, TextBoxFontText);
  17. text_box_set_text(
  18. text_box,
  19. "NFC APDU Runner\n"
  20. "Version: 0.3\n"
  21. "Auther: SpenserCai\n\n"
  22. "This app allows you to run APDU commands from script files.\n\n"
  23. "Supported card types:\n"
  24. "- ISO14443-4A\n"
  25. "- ISO14443-4B\n\n"
  26. "Place your script files in:\n" APP_DIRECTORY_PATH "\n\n"
  27. "File format:\n"
  28. "Filetype: APDU Script\n"
  29. "Version: 1\n"
  30. "CardType: iso14443_4a\n"
  31. "Data: [\"APDU1\",\"APDU2\",...]\n");
  32. view_dispatcher_switch_to_view(app->view_dispatcher, NfcApduRunnerViewTextBox);
  33. }
  34. // 关于场景事件回调
  35. bool nfc_apdu_runner_scene_about_on_event(void* context, SceneManagerEvent event) {
  36. UNUSED(context);
  37. UNUSED(event);
  38. return false;
  39. }
  40. // 关于场景退出回调
  41. void nfc_apdu_runner_scene_about_on_exit(void* context) {
  42. NfcApduRunner* app = context;
  43. text_box_reset(app->text_box);
  44. }