Further menu implementations
This commit is contained in:
parent
fc2372f754
commit
9615fdb39d
@ -52,7 +52,7 @@ struct menu_list {
|
||||
const menu_func_t *submenu_list;
|
||||
};
|
||||
|
||||
void menu_handle(struct lcd_menu *menu, uint16_t rotary_encoder_delta, enum button_state push_button);
|
||||
void menu_handle(struct lcd_menu *menu, int16_t rotary_encoder_delta, enum button_state push_button);
|
||||
|
||||
void menu_init(struct lcd_menu *menu, menu_func_t root_node, void (*display_update)(uint8_t row, const char *data));
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <reflow-controller/ui/menu.h>
|
||||
#include <stddef.h>
|
||||
|
||||
void menu_handle(struct lcd_menu *menu, uint16_t rotary_encoder_delta, enum button_state push_button)
|
||||
void menu_handle(struct lcd_menu *menu, int16_t rotary_encoder_delta, enum button_state push_button)
|
||||
{
|
||||
menu_func_t tmp;
|
||||
|
||||
@ -74,10 +74,17 @@ void menu_entry_dropback(struct lcd_menu *menu, menu_func_t parent_func)
|
||||
menu->active_entry_type = MENU_ENTRY_DROPBACK;
|
||||
}
|
||||
|
||||
void menu_entry_enter(struct lcd_menu *menu, menu_func_t parent_func, bool handle_immediately)
|
||||
void menu_entry_enter(struct lcd_menu *menu, menu_func_t entry, bool handle_immediately)
|
||||
{
|
||||
if (!menu)
|
||||
return;
|
||||
|
||||
menu->init_parent = menu->active_entry;
|
||||
menu->active_entry_type = MENU_ENTRY_FIRST_ENTER;
|
||||
menu->active_entry = entry;
|
||||
|
||||
if (handle_immediately)
|
||||
menu_handle(menu, menu->inputs.rotary_encoder_delta, menu->inputs.push_button);
|
||||
}
|
||||
|
||||
void menu_override_lcd_output(struct lcd_menu *menu, uint8_t row_num, const char *text)
|
||||
@ -90,5 +97,7 @@ void menu_override_lcd_output(struct lcd_menu *menu, uint8_t row_num, const char
|
||||
|
||||
void menu_list_display(struct menu_list *list, uint8_t top_row, uint8_t bottom_row)
|
||||
{
|
||||
|
||||
(void)list;
|
||||
(void)top_row;
|
||||
(void)bottom_row;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user