From 20fbac8ed1ac18bbcb91b84602bf0cee7037797b Mon Sep 17 00:00:00 2001 From: Derek Stevens Date: Fri, 15 Nov 2019 17:11:01 -0500 Subject: [PATCH] add TextBox.c to README --- README.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2678a40..168e3ff 100644 --- a/README.md +++ b/README.md @@ -172,4 +172,30 @@ moves mapBuffer to mapData and allocates new mapBuffer; if music was loaded in t ###pager() -if the player is warping to a new map chunk, halt the music (if any), unload the current map chunk before pushing mapBuffer to mapData \ No newline at end of file +if the player is warping to a new map chunk, halt the music (if any), unload the current map chunk before pushing mapBuffer to mapData + +##TextBox.c + +###newTextBox() + +returns a pointer to an empty TextBox + +###newGTextBox(SDL_Surface* image) + +returns a pointer to an empty TextBox, with portarit image + +###deleteTextBox(TextBox* target) + +deallocates memory for target + +###addText(TextBox* self, char* text) + +adds the string of text as a line in the TextBox pointed to by self + +###textBoxInput(TextBox* self, int* textIsRelevent) + +increments TextBox cursor, handles keyboard input while TextBox is onscreen + +###displayTextBox(TextBox* self) + +takes control of the main loop and draws the room, foreground, and the TextBox over it all, and passes input to textBoxInput()