mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 21:08:36 -07:00
Merge remote-tracking branch 'OFW/dev' into dev
This commit is contained in:
@@ -35,6 +35,9 @@ typedef struct {
|
||||
const char* secondary_str;
|
||||
uint8_t secondary_str_x;
|
||||
uint8_t secondary_str_y;
|
||||
const char* tertiary_str;
|
||||
uint8_t tertiary_str_x;
|
||||
uint8_t tertiary_str_y;
|
||||
const char* button_label;
|
||||
} DesktopViewPinInputModel;
|
||||
|
||||
@@ -167,6 +170,17 @@ static void desktop_view_pin_input_draw(Canvas* canvas, void* context) {
|
||||
canvas_draw_str(
|
||||
canvas, model->secondary_str_x, model->secondary_str_y, model->secondary_str);
|
||||
}
|
||||
|
||||
if(model->tertiary_str && model->pin.length == 0) {
|
||||
canvas_set_font(canvas, FontSecondary);
|
||||
canvas_draw_str_aligned(
|
||||
canvas,
|
||||
model->tertiary_str_x,
|
||||
model->tertiary_str_y,
|
||||
AlignCenter,
|
||||
AlignBottom,
|
||||
model->tertiary_str);
|
||||
}
|
||||
}
|
||||
|
||||
void desktop_view_pin_input_timer_callback(void* context) {
|
||||
@@ -294,6 +308,20 @@ void desktop_view_pin_input_set_label_secondary(
|
||||
view_commit_model(pin_input->view, true);
|
||||
}
|
||||
|
||||
void desktop_view_pin_input_set_label_tertiary(
|
||||
DesktopViewPinInput* pin_input,
|
||||
uint8_t x,
|
||||
uint8_t y,
|
||||
const char* label) {
|
||||
furi_assert(pin_input);
|
||||
|
||||
DesktopViewPinInputModel* model = view_get_model(pin_input->view);
|
||||
model->tertiary_str = label;
|
||||
model->tertiary_str_x = x;
|
||||
model->tertiary_str_y = y;
|
||||
view_commit_model(pin_input->view, true);
|
||||
}
|
||||
|
||||
void desktop_view_pin_input_set_pin_position(DesktopViewPinInput* pin_input, uint8_t x, uint8_t y) {
|
||||
furi_assert(pin_input);
|
||||
|
||||
|
||||
@@ -24,6 +24,11 @@ void desktop_view_pin_input_set_label_secondary(
|
||||
uint8_t x,
|
||||
uint8_t y,
|
||||
const char* label);
|
||||
void desktop_view_pin_input_set_label_tertiary(
|
||||
DesktopViewPinInput* pin_input,
|
||||
uint8_t x,
|
||||
uint8_t y,
|
||||
const char* label);
|
||||
void desktop_view_pin_input_set_pin_position(DesktopViewPinInput* pin_input, uint8_t x, uint8_t y);
|
||||
View* desktop_view_pin_input_get_view(DesktopViewPinInput*);
|
||||
void desktop_view_pin_input_set_done_callback(
|
||||
|
||||
Reference in New Issue
Block a user