metroflip_scene_credits.c 2.3 KB

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