metroflip_scene_credits.c 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #include "../metroflip_i.h"
  2. #include <dolphin/dolphin.h>
  3. #include "../api/metroflip/metroflip_api.h"
  4. #define TAG "Metroflip:Scene:Credits"
  5. void metroflip_scene_credits_on_enter(void* context) {
  6. Metroflip* app = context;
  7. Widget* widget = app->widget;
  8. dolphin_deed(DolphinDeedNfcReadSuccess);
  9. furi_string_reset(app->text_box_store);
  10. FuriString* str = furi_string_alloc();
  11. furi_string_printf(str, "\e#Credits:\n\n");
  12. furi_string_cat_printf(str, "Created by luu176\n");
  13. furi_string_cat_printf(str, "Inspired by Metrodroid\n\n");
  14. furi_string_cat_printf(str, "\e#Parser Credits:\n\n");
  15. furi_string_cat_printf(str, "Rav-Kav Parser: luu176\n\n");
  16. furi_string_cat_printf(str, "Navigo Parser: \n luu176, DocSystem \n\n");
  17. furi_string_cat_printf(str, "Opus Parser: DocSystem\n\n");
  18. furi_string_cat_printf(str, "Metromoney Parser:\n Leptopt1los\n\n");
  19. furi_string_cat_printf(str, "Bip! Parser:\n rbasoalto, gornekich\n\n");
  20. furi_string_cat_printf(str, "CharlieCard Parser:\n zacharyweiss\n\n");
  21. furi_string_cat_printf(str, "Clipper Parser:\n ke6jjj\n\n");
  22. furi_string_cat_printf(str, "Troika Parser:\n gornekich\n\n");
  23. furi_string_cat_printf(str, "ITSO Parser:\n gsp8181, hedger, gornekich\n\n");
  24. furi_string_cat_printf(str, "Opal Parser:\n gornekich\n\n");
  25. furi_string_cat_printf(str, "myki Parser:\n gornekich\n\n");
  26. furi_string_cat_printf(str, "Info Slaves:\n Equip, TheDingo8MyBaby\n\n");
  27. widget_add_text_scroll_element(widget, 0, 0, 128, 64, furi_string_get_cstr(str));
  28. widget_add_button_element(
  29. widget, GuiButtonTypeRight, "Exit", metroflip_exit_widget_callback, app);
  30. furi_string_free(str);
  31. view_dispatcher_switch_to_view(app->view_dispatcher, MetroflipViewWidget);
  32. }
  33. bool metroflip_scene_credits_on_event(void* context, SceneManagerEvent event) {
  34. Metroflip* app = context;
  35. bool consumed = false;
  36. if(event.type == SceneManagerEventTypeCustom) {
  37. if(event.event == GuiButtonTypeLeft) {
  38. consumed = scene_manager_previous_scene(app->scene_manager);
  39. }
  40. } else if(event.type == SceneManagerEventTypeBack) {
  41. scene_manager_search_and_switch_to_previous_scene(app->scene_manager, MetroflipSceneStart);
  42. consumed = true;
  43. }
  44. return consumed;
  45. }
  46. void metroflip_scene_credits_on_exit(void* context) {
  47. Metroflip* app = context;
  48. widget_reset(app->widget);
  49. UNUSED(context);
  50. }