Swadge 2024
2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
menuSimpleRenderer.h
Go to the documentation of this file.
1
26
27
#pragma once
28
29
#include "
menu.h
"
30
#include "
fs_font.h
"
31
35
typedef
struct
36
{
37
font_t
*
font
;
38
int32_t
numRows
;
39
40
paletteColor_t
borderColor
;
41
paletteColor_t
bgColor
;
42
paletteColor_t
rowTextColor
;
43
}
menuSimpleRenderer_t
;
44
45
menuSimpleRenderer_t
*
initMenuSimpleRenderer
(
font_t
* font,
paletteColor_t
border,
paletteColor_t
bg,
46
paletteColor_t
text, int32_t rows);
47
void
deinitMenuSimpleRenderer
(
menuSimpleRenderer_t
* renderer);
48
void
drawMenuSimple
(
menu_t
* menu,
menuSimpleRenderer_t
* renderer);
font_t
A font is a collection of font_ch_t for all ASCII characters. Each character has the same height and ...
Definition
font.h:66
fs_font.h
menuSimpleRenderer_t::rowTextColor
paletteColor_t rowTextColor
The color of the row text.
Definition
menuSimpleRenderer.h:42
menuSimpleRenderer_t::bgColor
paletteColor_t bgColor
The color of the screen background.
Definition
menuSimpleRenderer.h:41
initMenuSimpleRenderer
menuSimpleRenderer_t * initMenuSimpleRenderer(font_t *font, paletteColor_t border, paletteColor_t bg, paletteColor_t text, int32_t rows)
Initialize a and return a menu renderer.
Definition
menuSimpleRenderer.c:37
menuSimpleRenderer_t::font
font_t * font
The font to render the title with.
Definition
menuSimpleRenderer.h:37
drawMenuSimple
void drawMenuSimple(menu_t *menu, menuSimpleRenderer_t *renderer)
Draw a themed menu to the display and control the LEDs.
Definition
menuSimpleRenderer.c:131
menuSimpleRenderer_t::borderColor
paletteColor_t borderColor
The color of the background border.
Definition
menuSimpleRenderer.h:40
menuSimpleRenderer_t::numRows
int32_t numRows
Definition
menuSimpleRenderer.h:38
deinitMenuSimpleRenderer
void deinitMenuSimpleRenderer(menuSimpleRenderer_t *renderer)
Deinitialize a menu renderer and free associated memory. This will not free the font passed into init...
Definition
menuSimpleRenderer.c:68
menuSimpleRenderer_t
A struct containing all the state data to render a simple menu.
Definition
menuSimpleRenderer.h:36
menu.h
menu_t
struct _menu_t menu_t
The underlying data for a menu. This fundamentally is a list of menuItem_t.
Definition
menu.h:153
paletteColor_t
paletteColor_t
All 216 possible colors, named like cRGB.
Definition
palette.h:23
main
menu
menuSimpleRenderer.h
Generated by
1.13.2