Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
helpPages.h
Go to the documentation of this file.
1
56
57#pragma once
58
59#include <stdint.h>
60#include "hdw-btn.h"
61#include "menu.h"
62#include "menuMegaRenderer.h"
63
67typedef struct
68{
69 const char* title;
70 const char* text;
72
85
86helpPageVars_t* initHelpScreen(menu_t* bgMenu, menuMegaRenderer_t* menuRenderer, const helpPage_t* pages,
87 int32_t numPages);
89bool buttonHelp(helpPageVars_t* help, buttonEvt_t* evt);
90void drawHelp(helpPageVars_t* help, int32_t elapsedUs);
A button event containing the button that triggered the event, whether it was pressed or released,...
Definition hdw-btn.h:117
const char * text
The text to be displayed on a help page.
Definition helpPages.h:70
void deinitHelpScreen(helpPageVars_t *help)
Deinitialize a help screen.
Definition helpPages.c:50
const helpPage_t * pages
All the help pages.
Definition helpPages.h:80
int32_t arrowBlinkTimer
A timer used to blink arrows indicating more pages.
Definition helpPages.h:83
bool buttonHelp(helpPageVars_t *help, buttonEvt_t *evt)
Handle a button event on the help screen.
Definition helpPages.c:127
void drawHelp(helpPageVars_t *help, int32_t elapsedUs)
Draw the help screen.
Definition helpPages.c:61
menuMegaRenderer_t * menuRenderer
A renderer to render the menu with.
Definition helpPages.h:79
int32_t numPages
The number of help pages in helpPageVars_t.pages.
Definition helpPages.h:81
int32_t helpIdx
The index of the page currently being displayed.
Definition helpPages.h:82
const char * title
The title for an individual help page.
Definition helpPages.h:69
menu_t * bgMenu
A menu to render behind the help text. Must not have any entries.
Definition helpPages.h:78
helpPageVars_t * initHelpScreen(menu_t *bgMenu, menuMegaRenderer_t *menuRenderer, const helpPage_t *pages, int32_t numPages)
Initialize a help screen.
Definition helpPages.c:34
All the variables required for a help screen.
Definition helpPages.h:77
A help page consisting of a title and text.
Definition helpPages.h:68
A struct containing all the state data to render a mega-style menu and LEDs.
Definition menuMegaRenderer.h:39
struct _menu_t menu_t
The underlying data for a menu. This fundamentally is a list of menuItem_t.
Definition menu.h:153