dtmf_dolphin_scene_dialer.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #include "../dtmf_dolphin_i.h"
  2. // #include "../dtmf_dolphin_data.h"
  3. // #include "../dtmf_dolphin_audio.h"
  4. void dtmf_dolphin_scene_dialer_on_enter(void *context) {
  5. DTMFDolphinApp* app = context;
  6. DTMFDolphinScene scene_id = DTMFDolphinSceneDialer;
  7. enum DTMFDolphinSceneState state = scene_manager_get_scene_state(app->scene_manager, scene_id);
  8. switch (state)
  9. {
  10. case DTMFDolphinSceneStateBluebox:
  11. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_BLUEBOX);
  12. break;
  13. case DTMFDolphinSceneStateRedboxUS:
  14. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_US);
  15. break;
  16. case DTMFDolphinSceneStateRedboxUK:
  17. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_REDBOX_UK);
  18. break;
  19. case DTMFDolphinSceneStateMisc:
  20. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_MISC);
  21. break;
  22. default:
  23. dtmf_dolphin_data_set_current_section(DTMF_DOLPHIN_TONE_BLOCK_DIALER);
  24. break;
  25. }
  26. view_dispatcher_switch_to_view(app->view_dispatcher, DTMFDolphinViewDialer);
  27. }
  28. bool dtmf_dolphin_scene_dialer_on_event(void* context, SceneManagerEvent event) {
  29. DTMFDolphinApp* app = context;
  30. UNUSED(app);
  31. UNUSED(event);
  32. bool consumed = false;
  33. // if(event.type == SceneManagerEventTypeTick) {
  34. // consumed = true;
  35. // }
  36. return consumed;
  37. }
  38. void dtmf_dolphin_scene_dialer_on_exit(void* context) {
  39. UNUSED(context);
  40. }