|
|
|
@ -1342,7 +1342,6 @@ menu_move_back_and_leave_ui(void)
|
|
|
|
static void
|
|
|
|
static void
|
|
|
|
menu_push_submenu(const menuitem_t *submenu)
|
|
|
|
menu_push_submenu(const menuitem_t *submenu)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ui_mode = UI_MENU; // Only needed for auto mode setting
|
|
|
|
|
|
|
|
erase_menu_buttons();
|
|
|
|
erase_menu_buttons();
|
|
|
|
if (menu_current_level < MENU_STACK_DEPTH_MAX-1)
|
|
|
|
if (menu_current_level < MENU_STACK_DEPTH_MAX-1)
|
|
|
|
menu_current_level++;
|
|
|
|
menu_current_level++;
|
|
|
|
@ -1359,6 +1358,10 @@ menu_push_submenu(const menuitem_t *submenu)
|
|
|
|
// request_to_redraw_grid();
|
|
|
|
// request_to_redraw_grid();
|
|
|
|
area_width = AREA_WIDTH_NORMAL - MENU_BUTTON_WIDTH;
|
|
|
|
area_width = AREA_WIDTH_NORMAL - MENU_BUTTON_WIDTH;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ui_mode != UI_MENU){
|
|
|
|
|
|
|
|
draw_menu(); // Draw menu only on enter menu mode
|
|
|
|
|
|
|
|
ui_mode = UI_MENU; // Only needed for auto mode setting
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
void
|
|
|
|
@ -1898,8 +1901,6 @@ draw_menu_buttons(const menuitem_t *menu)
|
|
|
|
blit8BitWidthBitmap(button_start+3, y+(MENU_BUTTON_HEIGHT-ICON_HEIGHT)/2, ICON_WIDTH, ICON_HEIGHT, &check_box[button.icon*2*ICON_HEIGHT]);
|
|
|
|
blit8BitWidthBitmap(button_start+3, y+(MENU_BUTTON_HEIGHT-ICON_HEIGHT)/2, ICON_WIDTH, ICON_HEIGHT, &check_box[button.icon*2*ICON_HEIGHT]);
|
|
|
|
text_offs = button_start+6+ICON_WIDTH+1;
|
|
|
|
text_offs = button_start+6+ICON_WIDTH+1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ili9341_drawstring_size(button.text, text_offs, y+(button_height-2*FONT_GET_HEIGHT)/2, 2);
|
|
|
|
|
|
|
|
ili9341_drawstring_10x14(button.text, text_offs, y+(button_height-wFONT_GET_HEIGHT)/2);
|
|
|
|
|
|
|
|
#ifdef __ICONS__
|
|
|
|
#ifdef __ICONS__
|
|
|
|
if (menu[i].type & MT_ICON) {
|
|
|
|
if (menu[i].type & MT_ICON) {
|
|
|
|
blit8BitWidthBitmap(button_start+MENU_FORM_WIDTH-2*FORM_ICON_WIDTH-8,y+(button_height-FORM_ICON_HEIGHT)/2,FORM_ICON_WIDTH,FORM_ICON_HEIGHT,& left_icons[((menu[i].data >>4)&0xf)*2*FORM_ICON_HEIGHT]);
|
|
|
|
blit8BitWidthBitmap(button_start+MENU_FORM_WIDTH-2*FORM_ICON_WIDTH-8,y+(button_height-FORM_ICON_HEIGHT)/2,FORM_ICON_WIDTH,FORM_ICON_HEIGHT,& left_icons[((menu[i].data >>4)&0xf)*2*FORM_ICON_HEIGHT]);
|
|
|
|
@ -1907,7 +1908,9 @@ draw_menu_buttons(const menuitem_t *menu)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
int local_slider_positions = 0;
|
|
|
|
int local_slider_positions = 0;
|
|
|
|
|
|
|
|
int local_text_shift = 0;
|
|
|
|
if (MT_MASK(menu[i].type) == MT_KEYPAD) {
|
|
|
|
if (MT_MASK(menu[i].type) == MT_KEYPAD) {
|
|
|
|
|
|
|
|
local_text_shift = 2;
|
|
|
|
if (menu[i].data == KM_CENTER) {
|
|
|
|
if (menu[i].data == KM_CENTER) {
|
|
|
|
local_slider_positions = LCD_WIDTH/2+setting.slider_position;
|
|
|
|
local_slider_positions = LCD_WIDTH/2+setting.slider_position;
|
|
|
|
plot_printf(step_text_freq[0], sizeof step_text_freq[0], "-%3.0FHz", (float)setting.slider_span);
|
|
|
|
plot_printf(step_text_freq[0], sizeof step_text_freq[0], "-%3.0FHz", (float)setting.slider_span);
|
|
|
|
@ -1942,6 +1945,8 @@ draw_menu_buttons(const menuitem_t *menu)
|
|
|
|
goto draw_slider;
|
|
|
|
goto draw_slider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// ili9341_drawstring_size(button.text, text_offs, y+(button_height-2*FONT_GET_HEIGHT)/2-local_text_shift, 2);
|
|
|
|
|
|
|
|
ili9341_drawstring_10x14(button.text, text_offs, y+(button_height-wFONT_GET_HEIGHT)/2-local_text_shift);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
int button_width = MENU_BUTTON_WIDTH;
|
|
|
|
int button_width = MENU_BUTTON_WIDTH;
|
|
|
|
int button_start = LCD_WIDTH - MENU_BUTTON_WIDTH;
|
|
|
|
int button_start = LCD_WIDTH - MENU_BUTTON_WIDTH;
|
|
|
|
|