|
Atrinik Client 2.5
|
#include <global.h>Go to the source code of this file.
Functions | |
| int | text_input_center_offset () |
| void | text_input_draw_background (SDL_Surface *surface, int x, int y, int bitmap) |
| void | text_input_draw_text (SDL_Surface *surface, int x, int y, int font, const char *text, const char *color_notation, uint64 flags, int bitmap, SDL_Rect *box) |
| void | text_input_show (SDL_Surface *surface, int x, int y, int font, const char *text, const char *color_notation, uint64 flags, int bitmap, SDL_Rect *box) |
| void | text_input_clear () |
| void | text_input_open (int maxchar) |
| static void | text_input_history_add (const char *text) |
| void | text_input_history_clear () |
| void | text_input_add_string (const char *text) |
| static void | text_input_skip_word (int *i, int left) |
| int | text_input_handle (SDL_KeyboardEvent *key) |
Variables | |
| char | text_input_string [MAX_INPUT_STRING] |
| int | text_input_count |
| static int | text_input_cursor_pos = 0 |
| static int | text_input_max |
| static char | text_input_history [MAX_HISTORY_LINES][MAX_INPUT_STRING] |
| static size_t | text_input_history_pos = 0 |
| int | text_input_string_flag |
| int | text_input_string_end_flag |
| int | text_input_string_esc_flag |
| uint32 | text_input_opened |
Text input API.
Definition in file text_input.c.
| void text_input_add_string | ( | const char * | text | ) |
Put string to the text input.
| text | The string. |
Definition at line 263 of file text_input.c.
| int text_input_center_offset | ( | ) |
Calculate X offset for centering a text input bitmap.
Definition at line 60 of file text_input.c.
| void text_input_clear | ( | ) |
Clear text input.
Definition at line 173 of file text_input.c.
| void text_input_draw_background | ( | SDL_Surface * | surface, |
| int | x, | ||
| int | y, | ||
| int | bitmap | ||
| ) |
Draw text input's background (the bitmap).
| surface | Surface to draw on. |
| x | X position. |
| y | Y position. |
| bitmap | Bitmap to use. |
Definition at line 71 of file text_input.c.
| void text_input_draw_text | ( | SDL_Surface * | surface, |
| int | x, | ||
| int | y, | ||
| int | font, | ||
| const char * | text, | ||
| const char * | color_notation, | ||
| uint64 | flags, | ||
| int | bitmap, | ||
| SDL_Rect * | box | ||
| ) |
Draw text input's text.
| surface | Surface to draw on. |
| x | X position. |
| y | Y position. |
| font | Font to use. |
| text | Text to draw. |
| color_notation | Color to use. |
| flags | Text flags. |
| bitmap | Bitmap to use. |
| box | Contains coordinates to use and maximum string width. |
Definition at line 92 of file text_input.c.
| int text_input_handle | ( | SDL_KeyboardEvent * | key | ) |
Handle text input keyboard event.
| key | The keyboard event. |
Definition at line 295 of file text_input.c.
| static void text_input_history_add | ( | const char * | text | ) | [static] |
Add string to the text input history.
| text | The text to add to the history. |
Definition at line 221 of file text_input.c.
| void text_input_history_clear | ( | ) |
Clear all the text window history.
Definition at line 248 of file text_input.c.
| void text_input_open | ( | int | maxchar | ) |
Open text input.
| maxchar | Maximum number of allowed characters. |
Definition at line 188 of file text_input.c.
| void text_input_show | ( | SDL_Surface * | surface, |
| int | x, | ||
| int | y, | ||
| int | font, | ||
| const char * | text, | ||
| const char * | color_notation, | ||
| uint64 | flags, | ||
| int | bitmap, | ||
| SDL_Rect * | box | ||
| ) |
Show text input.
| surface | Surface to use. |
| x | X position. |
| y | Y position. |
| font | Font to use. |
| text | Text to draw. |
| color_notation | Color to use. |
| flags | Text flags. |
| bitmap | Bitmap to use. |
| box | Contains coordinates to use and maximum string width. |
Definition at line 127 of file text_input.c.
| static void text_input_skip_word | ( | int * | i, |
| int | left | ||
| ) | [static] |
Skips whitespace and the first word in the input string.
| [out] | i | Position to adjust. |
| left | If 1, skip to the left, to the right otherwise. |
Definition at line 276 of file text_input.c.
| int text_input_count |
Number of characters in the text input string.
Definition at line 35 of file text_input.c.
int text_input_cursor_pos = 0 [static] |
Cursor position in the text input string.
Definition at line 37 of file text_input.c.
char text_input_history[MAX_HISTORY_LINES][MAX_INPUT_STRING] [static] |
Text input history.
Definition at line 42 of file text_input.c.
size_t text_input_history_pos = 0 [static] |
Position in the text input history -- used when browsing through the history.
Definition at line 46 of file text_input.c.
int text_input_max [static] |
Maximum allowed characters in the text input string.
Definition at line 39 of file text_input.c.
When the console was opened.
Definition at line 55 of file text_input.c.
| char text_input_string[MAX_INPUT_STRING] |
Current text input string.
Definition at line 33 of file text_input.c.
If 1, we submitted some text using the console.
Definition at line 51 of file text_input.c.
If 1, ESC was pressed while entering some text to console.
Definition at line 53 of file text_input.c.
If 1, we have an open console.
Definition at line 49 of file text_input.c.
1.7.4