[FL-1178] Idle screen improvements (#444)
* Dolphin idle screen: Cleanup of debug views; Hold [down] to open debug view; Sequential input for unlocking; * Lock screen popup, WIP * Fix reverse modulus * Lock popup added * Dolphin: timer for handling UI animation sequences * Allow tick events to be discarded on queue overflow and prevent timer service from crash Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -6,16 +6,35 @@
|
||||
#include <input/input.h>
|
||||
#include <furi.h>
|
||||
|
||||
// Idle scree
|
||||
#ifndef MAX
|
||||
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
|
||||
#endif
|
||||
|
||||
#ifndef CLAMP
|
||||
#define CLAMP(x, upper, lower) (MIN(upper, MAX(x, lower)))
|
||||
#endif
|
||||
|
||||
// Idle screen
|
||||
typedef enum {
|
||||
DolphinViewIdleMain,
|
||||
DolphinViewFirstStart,
|
||||
DolphinViewIdleUp,
|
||||
DolphinViewIdleDown,
|
||||
DolphinViewStats,
|
||||
DolphinViewHwMismatch,
|
||||
DolphinViewLockMenu,
|
||||
} DolphinViewIdle;
|
||||
|
||||
// Debug info
|
||||
typedef enum {
|
||||
DolphinViewStatsFw,
|
||||
DolphinViewStatsBoot,
|
||||
DolphinViewStatsMeta,
|
||||
DolphinViewStatsTotalCount,
|
||||
} DolphinViewStatsScreens;
|
||||
|
||||
typedef struct {
|
||||
uint32_t page;
|
||||
} DolphinViewFirstStartModel;
|
||||
@@ -26,20 +45,21 @@ bool dolphin_view_first_start_input(InputEvent* event, void* context);
|
||||
typedef struct {
|
||||
uint32_t icounter;
|
||||
uint32_t butthurt;
|
||||
} DolphinViewIdleUpModel;
|
||||
|
||||
typedef struct {
|
||||
bool show_fw_or_boot;
|
||||
} DolphinViewIdleDownModel;
|
||||
DolphinViewStatsScreens screen;
|
||||
} DolphinViewStatsModel;
|
||||
|
||||
typedef struct {
|
||||
uint8_t idx;
|
||||
} DolphinViewMenuModel;
|
||||
int8_t door_left_x;
|
||||
int8_t door_right_x;
|
||||
uint8_t exit_timeout;
|
||||
bool locked;
|
||||
} DolphinViewLockMenuModel;
|
||||
|
||||
typedef struct {
|
||||
Icon* animation;
|
||||
uint8_t scene_num;
|
||||
|
||||
uint8_t hint_timeout;
|
||||
} DolphinViewMainModel;
|
||||
|
||||
void dolphin_view_idle_main_draw(Canvas* canvas, void* model);
|
||||
|
Reference in New Issue
Block a user