commeownder/main/draw.h

26 lines
863 B
C

#pragma once
#include <stdint.h>
typedef struct {
const char *label; // left-aligned; NULL or empty = blank row
char value[16]; // right-aligned formatted string; empty = omit
int cursor; // index into value for edit cursor indicator; -1 = none
} oled_row_t;
void led_init(void);
void led_update_for_count(int count, uint8_t scale);
void led_off(void);
void oled_init(void);
void oled_set_flip(int flip);
void oled_clear(void);
void oled_set_contrast(uint8_t val);
void oled_draw_sleep(void);
void oled_draw_header(void);
void oled_draw_centered(const char *str);
void oled_draw_rows(const oled_row_t *rows, int count, int active);
void oled_draw_list(const char **labels, const int *values, int count, int active);
void oled_draw_players(void);
void oled_draw_settings(void);
void oled_draw_life(void);
void oled_draw_dice(void);