123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- #ifndef __HULIB__
- #define __HULIB__
- #include "r_defs.h"
- #define HU_CHARERASE KEY_BACKSPACE
- #define HU_MAXLINES 4
- #define HU_MAXLINELENGTH 80
- typedef struct
- {
-
- int x;
- int y;
-
- patch_t** f;
- int sc;
- char l[HU_MAXLINELENGTH+1];
- int len;
-
- int needsupdate;
- } hu_textline_t;
- typedef struct
- {
- hu_textline_t l[HU_MAXLINES];
- int h;
- int cl;
-
- qboolean* on;
- qboolean laston;
- } hu_stext_t;
- typedef struct
- {
- hu_textline_t l;
-
- int lm;
-
- qboolean* on;
- qboolean laston;
- } hu_itext_t;
- void HUlib_init(void);
- void HUlib_clearTextLine(hu_textline_t *t);
- void HUlib_initTextLine(hu_textline_t *t, int x, int y, patch_t **f, int sc);
- qboolean HUlib_addCharToTextLine(hu_textline_t *t, char ch);
- qboolean HUlib_delCharFromTextLine(hu_textline_t *t);
- void HUlib_drawTextLine(hu_textline_t *l, qboolean drawcursor);
- void HUlib_eraseTextLine(hu_textline_t *l);
- void
- HUlib_initSText
- ( hu_stext_t* s,
- int x,
- int y,
- int h,
- patch_t** font,
- int startchar,
- qboolean* on );
- void HUlib_addLineToSText(hu_stext_t* s);
- void
- HUlib_addMessageToSText
- ( hu_stext_t* s,
- const char* prefix,
- const char* msg );
- void HUlib_drawSText(hu_stext_t* s);
- void HUlib_eraseSText(hu_stext_t* s);
- void
- HUlib_initIText
- ( hu_itext_t* it,
- int x,
- int y,
- patch_t** font,
- int startchar,
- qboolean* on );
- void HUlib_delCharFromIText(hu_itext_t* it);
- void HUlib_eraseLineFromIText(hu_itext_t* it);
- void HUlib_resetIText(hu_itext_t* it);
- void
- HUlib_addPrefixToIText
- ( hu_itext_t* it,
- char* str );
- qboolean
- HUlib_keyInIText
- ( hu_itext_t* it,
- unsigned char ch );
- void HUlib_drawIText(hu_itext_t* it);
- void HUlib_eraseIText(hu_itext_t* it);
- #endif
|