Prusa MINI Firmware overview
button_draw.h File Reference
#include "guitypes.h"

Go to the source code of this file.

Functions

void button_draw (rect_ui16_t rc_btn, const char *text, font_t *pf, int is_selected)
 

Function Documentation

◆ button_draw()

void button_draw ( rect_ui16_t  rc_btn,
const char *  text,
font_t pf,
int  is_selected 
)
5  {
6  color_t back_cl = is_selected ? COLOR_WHITE : COLOR_GRAY;
7  color_t text_cl = is_selected ? COLOR_BLACK : COLOR_WHITE;
8  render_text_align(rc_btn, text, pf, back_cl, text_cl, padding_ui8(0, 0, 0, 0), ALIGN_CENTER);
9 }
Here is the call graph for this function:
Here is the caller graph for this function:
COLOR_WHITE
#define COLOR_WHITE
Definition: guitypes.h:41
ALIGN_CENTER
#define ALIGN_CENTER
Definition: guitypes.h:19
padding_ui8
static padding_ui8_t padding_ui8(uint8_t l, uint8_t t, uint8_t r, uint8_t b)
Definition: guitypes.h:164
COLOR_GRAY
#define COLOR_GRAY
Definition: guitypes.h:50
render_text_align
void render_text_align(rect_ui16_t rc, const char *text, font_t *font, color_t clr0, color_t clr1, padding_ui8_t padding, uint16_t flags)
Definition: display_helper.c:6
COLOR_BLACK
#define COLOR_BLACK
Definition: guitypes.h:40
color_t
uint32_t color_t
Definition: guitypes.h:62