John Zaitseff
019734c8aa
Rename the function getanswer() to get_yn_answer()
2011-07-11 13:37:48 +10:00
John Zaitseff
36a3811cd1
Add the gettxstring() function
2011-07-11 13:18:26 +10:00
John Zaitseff
60ab28c711
Add the modified status variable to gettxline()
...
Also correct a bug in gettxline() that always returned OK!
2011-07-11 12:28:13 +10:00
John Zaitseff
42e05ee20b
Replace individual colour/window attributes with ATTR_ macros
2011-07-11 11:40:52 +10:00
John Zaitseff
dd281f795b
Add gettxline() to read a line of input from the keyboard
2011-07-11 10:31:19 +10:00
John Zaitseff
85e09ab4f2
Replace calls to wprintw() with waddstr() where appropriate
2011-07-11 08:05:36 +10:00
John Zaitseff
1995a6a7b0
Remove the superfluous argument attr_end from attrpr()
...
Instead of using attr_end, simply restore the old window attributes after
printing the string.
2011-07-11 08:01:18 +10:00
John Zaitseff
ad4ed4d744
Add input routines gettxchar() and getanswer(); add various macros
...
In particular, add macros for KEY_TAB, KEY_RETURN and KEY_ESC, and for
CURS_ON and CURS_OFF (instead of using CURS_INVISIBLE and CURS_VISIBLE
directly: this allows redefining CURS_ON to be CURS_NORMAL). Add more
colour pairs.
2011-07-04 22:02:01 +10:00
John Zaitseff
568c3738b2
Add the attrpr() function; add a missing va_end() call in center()
...
The attrpr() function prints a string with a particular set of Curses
attributes.
2011-07-04 19:41:55 +10:00
John Zaitseff
9f6c2af671
Define ATTR: select between attributes for colour and mono screens
2016-12-09 08:54:59 +11:00
John Zaitseff
10c4cb2a22
Add a "y" parameter to center(); add the COL_CENTER macro
2011-07-04 17:54:30 +10:00
John Zaitseff
4f62ef1b58
Add simple functions to manage a stack of Curses windows
2011-07-04 12:41:30 +10:00
John Zaitseff
d9ff917835
Rename MIN_COLUMNS to MIN_COLS for consistency with the COLS variable
...
Also define WIN_COLS and WIN_LINES: the current version of Star Traders
will only use this number of lines and columns in a terminal window. All
calls to newwin() need to have COL_OFFSET and LINE_OFFSET added to the X
and Y starting positions to make this work.
2011-07-02 23:19:40 +10:00
John Zaitseff
abd196d2c5
Add the basic I/O functions init_screen(), end_screen() and center()
2011-07-02 21:25:57 +10:00
John Zaitseff
9e4e4b6d11
Add intf.h and intf.c: basic text input/output interface routines
2011-07-02 14:53:45 +10:00