scene_dialog.c 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. #include "../subghz_playlist_creator.h"
  2. #include "scene_dialog.h"
  3. #include <gui/modules/dialog_ex.h>
  4. void scene_dialog_show_custom(
  5. SubGhzPlaylistCreator* app,
  6. const char* header,
  7. const char* text,
  8. const char* left_btn,
  9. const char* right_btn,
  10. DialogExResultCallback callback,
  11. void* context
  12. ) {
  13. app->current_view = SubGhzPlaylistCreatorViewDialog;
  14. dialog_ex_set_header(app->dialog, header, 64, 0, AlignCenter, AlignTop);
  15. dialog_ex_set_text(app->dialog, text, 64, 12, AlignCenter, AlignTop);
  16. dialog_ex_set_icon(app->dialog, 0, 0, NULL);
  17. dialog_ex_set_left_button_text(app->dialog, left_btn);
  18. dialog_ex_set_right_button_text(app->dialog, right_btn);
  19. dialog_ex_set_context(app->dialog, context);
  20. dialog_ex_set_result_callback(app->dialog, callback);
  21. view_dispatcher_switch_to_view(app->view_dispatcher, SubGhzPlaylistCreatorViewDialog);
  22. }
  23. void scene_dialog_show(SubGhzPlaylistCreator* app) {
  24. app->current_view = SubGhzPlaylistCreatorViewDialog;
  25. view_dispatcher_switch_to_view(app->view_dispatcher, SubGhzPlaylistCreatorViewDialog);
  26. }
  27. void scene_dialog_init_view(SubGhzPlaylistCreator* app) {
  28. UNUSED(app);
  29. }