WIP
This commit is contained in:
@@ -14,8 +14,8 @@ extern lv_font_t roboto_bold_font;
|
||||
extern lv_font_t roboto_bold_large_font;
|
||||
#endif
|
||||
|
||||
uint16_t draw_character(rgb565_pixel_t *framebuffer, const lv_font_t *font, const uint16_t x_loc, const uint16_t y_loc, const uint8_t character, rgb565_pixel_t color);
|
||||
uint16_t draw_character(pixel_t *framebuffer, const lv_font_t *font, const uint16_t x_loc, const uint16_t y_loc, const uint8_t character, pixel_t color);
|
||||
|
||||
void draw_string(rgb565_pixel_t *framebuffer, const lv_font_t *font, const uint16_t x_loc, const uint16_t y_loc, const uint8_t *string, rgb565_pixel_t color);
|
||||
void draw_string(pixel_t *framebuffer, const lv_font_t *font, const uint16_t x_loc, const uint16_t y_loc, const uint8_t *string, pixel_t color);
|
||||
|
||||
#endif
|
||||
@@ -5,6 +5,6 @@
|
||||
#include "stdint.h"
|
||||
|
||||
void DisplayTest(pixel_t color);
|
||||
void DrawBox(uint32_t topleft_x_loc, uint32_t topleft_y_loc, uint32_t height, uint32_t width, pixel_t color);
|
||||
void DrawBox(uint32_t topleft_x_loc, uint32_t topleft_y_loc, uint32_t width, uint32_t height, pixel_t color);
|
||||
|
||||
#endif
|
||||
@@ -4,13 +4,16 @@
|
||||
#include "stdint.h"
|
||||
#include "stdbool.h"
|
||||
|
||||
typedef void (*menu_callback_t)(void *args);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint8_t *title;
|
||||
bool enabled; // not enabled = grayed out, unselectable
|
||||
void *highlighted_callback_function;
|
||||
void *selected_callback_function;
|
||||
bool enabled; // not enabled = grayed out, unhighlightable
|
||||
menu_callback_t highlighted_callback_function;
|
||||
void *highlighted_callback_function_args;
|
||||
menu_callback_t selected_callback_function;
|
||||
void *selected_callback_function_args;
|
||||
} graphical_menu_entry_t;
|
||||
|
||||
|
||||
@@ -18,8 +21,12 @@ typedef struct _graphical_menu_t graphical_menu_t;
|
||||
struct _graphical_menu_t {
|
||||
graphical_menu_t *parent_menu;
|
||||
uint8_t num_entries;
|
||||
uint8_t highlighted_idx;
|
||||
graphical_menu_entry_t *entries;
|
||||
};
|
||||
|
||||
void draw_menu(const graphical_menu_t *const menu);
|
||||
void select_menu_entry(const graphical_menu_t *const menu);
|
||||
uint8_t get_selected_menu_entry_idx(void);
|
||||
void set_selected_menu_entry_idx(const graphical_menu_t *const menu, uint8_t idx);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user