Skip to content

creating MUI lock screen #2515

Answered by olikraus
Claponi asked this question in Q&A
Sep 26, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

I think you need to get the current position via mui_GetCurrentCursorFocusPosition(mui.GetMUI()) and then later restore the cursor position with gotoForm(uint8_t form_id, uint8_t initial_cursor_position).

In other words, you might need to create your own MUIF here, because the existing goto muif will always put the cursor into the first position.

Let me extend the code from here:

u8g2/csrc/mui_u8g2.c

Lines 469 to 497 in eba8b1a

uint8_t mui_u8g2_btn_goto_wm_fi(mui_t *ui, uint8_t msg)
{
switch(msg)
{
case MUIF_MSG_DRAW:
mui_u8g2_draw_button_utf(ui, U8G2_BTN_HCENTER |mui_u8g2_get_fi_flags(ui), 0, 1, MUI_U8G2_V_PADDING, ui->text);
break;
case MUI…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Claponi
Comment options

Comment options

You must be logged in to vote
2 replies
@olikraus
Comment options

Answer selected by Claponi
@Claponi
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants