50 lines
No EOL
824 B
C
50 lines
No EOL
824 B
C
// Define once
|
|
#ifndef H_UI
|
|
#define H_UI
|
|
|
|
// Libraries
|
|
#include <furi.h>
|
|
#include <gui/gui.h>
|
|
#include <gui/icon.h>
|
|
|
|
#include "app.h"
|
|
#include "pass.h"
|
|
#include "store.h"
|
|
|
|
// Structures
|
|
typedef struct {
|
|
ViewPort* canvas;
|
|
Gui* gui;
|
|
enum ui_input {
|
|
Up,
|
|
Down,
|
|
Left,
|
|
Right,
|
|
|
|
Ok,
|
|
Back
|
|
} input;
|
|
|
|
int selection;
|
|
int page;
|
|
|
|
bool running;
|
|
bool is_pressing;
|
|
bool press_avail;
|
|
} UIManager;
|
|
|
|
// Constructors
|
|
UIManager* ui_create();
|
|
|
|
// Functions
|
|
void ui_input(InputEvent* event, void* ctx);
|
|
void ui_quit(UIManager* manager);
|
|
|
|
void ui_draw(Canvas* canvas, void* ctx);
|
|
void ui_p_mainmenu(Canvas* canvas, UIManager* manager);
|
|
void ui_p_about(Canvas* canvas);
|
|
void ui_p_view(Canvas* canvas, UIManager* manager);
|
|
|
|
void ui_delete(UIManager* manager);
|
|
|
|
#endif |