[FL-1968] Pin code locking (#788)
* Gui: code input module * Gui: fix size to fit frame * Desktop: PIN config and lock option * Gui: code input: cleanup, offset input fields if no header present * Desktop: move code unlock to desktop_locked scene * Desktop: fix unlock with back key * Desktop: bump settings version * Desktop: correct scene usage. Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
@@ -15,10 +15,16 @@
|
||||
#define DOOR_R_POS_MIN 60
|
||||
|
||||
typedef enum {
|
||||
DesktopLockedEventUnlock,
|
||||
DesktopLockedEventUpdate,
|
||||
DesktopLockedEventUnlock = 10U,
|
||||
DesktopLockedEventUpdate = 11U,
|
||||
DesktopLockedEventInputReset = 12U,
|
||||
} DesktopLockedEvent;
|
||||
|
||||
typedef enum {
|
||||
DesktopLockedWithPin,
|
||||
DesktopLockedNoPin,
|
||||
} DesktopLockedSceneState;
|
||||
|
||||
typedef struct DesktopLockedView DesktopLockedView;
|
||||
|
||||
typedef void (*DesktopLockedViewCallback)(DesktopLockedEvent event, void* context);
|
||||
@@ -42,6 +48,7 @@ typedef struct {
|
||||
int8_t door_right_x;
|
||||
bool animation_seq_end;
|
||||
|
||||
bool pin_lock;
|
||||
} DesktopLockedViewModel;
|
||||
|
||||
void desktop_locked_set_callback(
|
||||
@@ -58,5 +65,4 @@ void desktop_locked_manage_redraw(DesktopLockedView* locked_view);
|
||||
View* desktop_locked_get_view(DesktopLockedView* locked_view);
|
||||
DesktopLockedView* desktop_locked_alloc();
|
||||
void desktop_locked_free(DesktopLockedView* locked_view);
|
||||
void desktop_main_unlocked(DesktopMainView* main_view);
|
||||
void desktop_main_reset_hint(DesktopMainView* main_view);
|
||||
void desktop_locked_with_pin(DesktopLockedView* lock_menu, bool locked);
|
Reference in New Issue
Block a user