1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00
Commit Graph

11 Commits

Author SHA1 Message Date
John Zaitseff
dd281f795b Add gettxline() to read a line of input from the keyboard 2011-07-11 10:31:19 +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
ca64093a07 Move definition of "enum curs_type"; rename CURS_VERYVISIBLE
Rename CURS_VERYVISIBLE to CURS_VISIBLE to match the system documentation
for Curses.
2011-07-04 19:15:38 +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