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

32 Commits

Author SHA1 Message Date
John Zaitseff
fcffaa5860 Add checks for KEY_EXIT: same functionality as pressing CTRL-C 2011-07-19 19:22:20 +10:00
John Zaitseff
ccbe7405f8 Replace "out of memory" errors with calls to err_exit_nomem() 2011-07-19 19:16:34 +10:00
John Zaitseff
04879e376e Replace obsoleted vwprintw() with vw_printw() 2011-07-19 15:36:22 +10:00
John Zaitseff
5e15e2a197 Bug fix: only remove thousands separators if present in the locale 2011-07-19 14:54:38 +10:00
John Zaitseff
dc14a0e633 Implement the gettxlong() function to input an integer 2011-07-19 14:15:33 +10:00
John Zaitseff
8b504b645d Implement the gettxdouble() function to input a floating point number 2011-07-19 00:37:10 +10:00
John Zaitseff
a75ec7479d Add center3(): centre three strings 2011-07-16 15:47:05 +10:00
John Zaitseff
5c28cea858 Move the BUFSIZE macro to trader.h; remove the similar GAME_BUFSIZE 2011-07-15 18:52:31 +10:00
John Zaitseff
34c787cc30 Correct some bugs in center(); add the center2() function 2011-07-15 14:55:56 +10:00
John Zaitseff
546c80053f Add the --no-color (and --no-colour) command-line options 2011-07-14 20:19:04 +10:00
John Zaitseff
09d4455c3e Add window attributes for the galaxy map 2011-07-14 15:16:04 +10:00
John Zaitseff
89c3512a1b Modify the wait_for_key() routine to take a window attribute parameter 2011-07-11 17:57:52 +10:00
John Zaitseff
2a3ed550ad Remove the clrline parameter from the center() function 2011-07-11 15:56:01 +10:00
John Zaitseff
4a555235c9 Add the attr parameter to the center() function 2011-07-11 15:45:38 +10:00
John Zaitseff
20f6f6e73a Add the wait_for_key() function 2011-07-11 14:43:16 +10:00
John Zaitseff
5055ea57ac Rename get_yn_answer() to answer_yesno() 2011-07-11 14:23:16 +10:00
John Zaitseff
3ff949efc0 Print the result of the get_yn_answer() function in bold 2011-07-11 13:52:22 +10:00
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