ubitxv6/button.h

18 lines
327 B
C
Raw Normal View History

2020-02-09 18:28:46 -05:00
#pragma once
2020-02-09 20:03:37 -05:00
#include <stdint.h>
enum ButtonStatus_e : uint8_t {
Stateless,
Inactive,
Active
};
2020-02-09 18:28:46 -05:00
struct Button {
int16_t x, y, w, h;
const char* text;
void (*text_override)(char* text_out, uint16_t max_text_size);
2020-02-09 18:28:46 -05:00
char morse;
ButtonStatus_e (*status)();
void (*on_select)();//Action to take when selected
2020-02-09 18:28:46 -05:00
};