|
Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
|
Functions | |
| void | textEntryInit (font_t *useFont, int max_len, char *buffer) |
| Initialize the text entry with prettier graphics. | |
| bool | textEntryDraw (int64_t elapsedUs) |
| Draw the text entry UI. | |
| bool | textEntryInput (uint8_t down, uint8_t button) |
| Handle button input for text entry. | |
| void | textEntrySetFont (font_t *newFont) |
| A new font to load into the text entry screen. | |
| void | textEntrySetBgWsg (wsg_t *BG) |
| Sets a background image and sets the BG Mode to use the WSG. | |
| void | textEntrySetBGColor (uint8_t color) |
| Sets the background to use a solid color. | |
| void | textEntrySetBGTransparent () |
| Sets the background to be transparent. | |
| void | textEntrySetTextColor (uint8_t color, bool emphasis) |
| Set the main text color for the keyboard and entry text. | |
| void | textEntrySetEmphasisColor (uint8_t color) |
| Set the emphasis color for the text. | |
| void | textEntrySetShadowboxColor (bool active, uint8_t color) |
| Sets the color of the shadowbox. | |
| void | textEntrySetNewEnterStyle (bool newStyle) |
| Sets the style of the Enter key. | |
| void | textEntrySetNewCapsStyle (bool newStyle) |
| Sets the style of the caps lock key. | |
| void | textEntrySetMultiline (bool multiline) |
| Sets the text entry mode from single line to multi-line. | |
| void | textEntrySoftReset () |
| Allow the text box to continue without a full reset. | |
| void | textEntrySetPrompt (char *prompt) |
| Sets the prompt text to be displayed. Use an empty string ("") to disable. | |
| void | textEntrySetCapMode () |
| Sets the starting mode to capslock. | |
| void | textEntrySetNoShiftMode () |
| Sets the starting mode to lowercase text. | |
| void | textEntrySetShiftMode () |
| Sets the starting mode to Shift, does one capital letter. | |
| void | textEntrySetNounMode () |
| Sets the starting mode to Porper Nouns (Auto capitalizes first letter after a space) | |
Variables | |
| bgMode_t | backgroundMode |
| void textEntryInit | ( | font_t * | useFont, |
| int | max_len, | ||
| char * | buffer ) |
Initialize the text entry with prettier graphics.
| useFont | The font to use |
| max_len | The length of buffer |
| buffer | A char* to store the entered text in |
| bool textEntryDraw | ( | int64_t | elapsedUs | ) |
Draw the text entry UI.
| bool textEntryInput | ( | uint8_t | down, |
| uint8_t | button ) |
Handle button input for text entry.
| down | true if the button was pressed, false if it was released |
| button | The button that was pressed |
| void textEntrySetFont | ( | font_t * | newFont | ) |
A new font to load into the text entry screen.
| newFont | pointer to a font file |
| void textEntrySetBgWsg | ( | wsg_t * | BG | ) |
Sets a background image and sets the BG Mode to use the WSG.
| BG | Pointer to Background image to set |
| void textEntrySetBGColor | ( | uint8_t | color | ) |
Sets the background to use a solid color.
| color | Color to set the background |
| void textEntrySetBGTransparent | ( | void | ) |
Sets the background to be transparent.
| void textEntrySetTextColor | ( | uint8_t | color, |
| bool | emphasis ) |
Set the main text color for the keyboard and entry text.
| color | Color to set the text to. |
| emphasis | Whether emphasis color should also be set to the same color |
| void textEntrySetEmphasisColor | ( | uint8_t | color | ) |
Set the emphasis color for the text.
| color | Color for the emphasis text |
| void textEntrySetShadowboxColor | ( | bool | active, |
| uint8_t | color ) |
Sets the color of the shadowbox.
| active | Whether these boxes should be drawn |
| color | Color for the shadowboxes |
| void textEntrySetNewEnterStyle | ( | bool | newStyle | ) |
Sets the style of the Enter key.
| newStyle | if true, use the new style |
| void textEntrySetNewCapsStyle | ( | bool | newStyle | ) |
Sets the style of the caps lock key.
| newStyle | if true, use the new style |
| void textEntrySetMultiline | ( | bool | multiline | ) |
Sets the text entry mode from single line to multi-line.
| multiline | True if using multi-line, false if not |
| void textEntrySoftReset | ( | void | ) |
Allow the text box to continue without a full reset.
| void textEntrySetPrompt | ( | char * | prompt | ) |
Sets the prompt text to be displayed. Use an empty string ("") to disable.
| prompt | Text string to use |
| void textEntrySetCapMode | ( | void | ) |
Sets the starting mode to capslock.
| void textEntrySetNoShiftMode | ( | void | ) |
Sets the starting mode to lowercase text.
| void textEntrySetShiftMode | ( | void | ) |
Sets the starting mode to Shift, does one capital letter.
| void textEntrySetNounMode | ( | void | ) |
Sets the starting mode to Porper Nouns (Auto capitalizes first letter after a space)
| bgMode_t backgroundMode |