all repos — hyperkaos @ main

lightweight modular puzzle/adventure game engine in C with SDL 1.2

TextBox.h (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
typedef struct textBox
{
    SDL_Surface* portrait;
    SDL_Surface** message;

    int lines;
    int cursor;
    int scroll;
    int scrollFrom;
} TextBox;

TextBox* newTextBox();
TextBox* newGTextBox(SDL_Surface* image);
void deleteTextBox(TextBox* target);

void addText(TextBox* self, char* text);
void displayTextBox(TextBox* self);
void textBoxInput(TextBox* self, int* textIsRelevent);