flip_world.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #include <font/font.h>
  3. #include <flipper_http/flipper_http.h>
  4. #include <easy_flipper/easy_flipper.h>
  5. #include <furi.h>
  6. #include <furi_hal.h>
  7. #include <gui/gui.h>
  8. #include <gui/view.h>
  9. #include <gui/modules/submenu.h>
  10. #include <gui/view_dispatcher.h>
  11. #include <notification/notification.h>
  12. #include <dialogs/dialogs.h>
  13. #define TAG "FlipWorld"
  14. #define VERSION_TAG "FlipWorld v0.1"
  15. // Define the submenu items for our FlipWorld application
  16. typedef enum
  17. {
  18. FlipWorldSubmenuIndexRun, // Click to run the FlipWorld application
  19. FlipWorldSubmenuIndexAbout,
  20. FlipWorldSubmenuIndexSettings,
  21. } FlipWorldSubmenuIndex;
  22. // Define a single view for our FlipWorld application
  23. typedef enum
  24. {
  25. FlipWorldViewMain, // The main screen
  26. FlipWorldViewSubmenu, // The submenu
  27. FlipWorldViewAbout, // The about screen
  28. FlipWorldViewSettings, // The settings screen
  29. FlipWorldViewTextInput, // The text input screen
  30. } FlipWorldView;
  31. // Define a custom event for our FlipWorld application
  32. typedef enum
  33. {
  34. FlipWorldCustomEventPlay, // Play the game
  35. } FlipWorldCustomEvent;
  36. // Each screen will have its own view
  37. typedef struct
  38. {
  39. // necessary
  40. ViewDispatcher *view_dispatcher; // Switches between our views
  41. View *view_main; // The game screen
  42. View *view_about; // The about screen
  43. Submenu *submenu; // The submenu
  44. VariableItemList *variable_item_list; // The variable item list (settngs)
  45. VariableItem *variable_item_ssid; // The variable item
  46. VariableItem *variable_item_pass; // The variable item
  47. UART_TextInput *text_input; // The text input
  48. char *text_input_buffer; // Buffer for the text input
  49. char *text_input_temp_buffer; // Temporary buffer for the text input
  50. uint32_t text_input_buffer_size; // Size of the text input buffer
  51. } FlipWorldApp;