mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -05:00
Replace all visible mentions of <ESC> with <CTRL><C>
Note that pressing <ESC> will often generate up to one second's worth of delay, whereas <CTRL><C> causes no delay.
This commit is contained in:
parent
fcffaa5860
commit
13c6353dd2
@ -136,7 +136,7 @@ void init_game (void)
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// Ask which game to load
|
// Ask which game to load
|
||||||
newtxwin(5, 50, LINE_OFFSET + 6, COL_CENTER(50));
|
newtxwin(5, 54, LINE_OFFSET + 6, COL_CENTER(54));
|
||||||
wbkgd(curwin, ATTR_NORMAL_WINDOW);
|
wbkgd(curwin, ATTR_NORMAL_WINDOW);
|
||||||
box(curwin, 0, 0);
|
box(curwin, 0, 0);
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ void init_game (void)
|
|||||||
attrpr(curwin, ATTR_KEYCODE_STR, "9");
|
attrpr(curwin, ATTR_KEYCODE_STR, "9");
|
||||||
waddstr(curwin, "]");
|
waddstr(curwin, "]");
|
||||||
waddstr(curwin, " or ");
|
waddstr(curwin, " or ");
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<ESC>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<CTRL><C>");
|
||||||
waddstr(curwin, " to cancel: ");
|
waddstr(curwin, " to cancel: ");
|
||||||
|
|
||||||
curs_set(CURS_ON);
|
curs_set(CURS_ON);
|
||||||
@ -164,7 +164,7 @@ void init_game (void)
|
|||||||
case KEY_CTRL('C'):
|
case KEY_CTRL('C'):
|
||||||
case KEY_CTRL('G'):
|
case KEY_CTRL('G'):
|
||||||
case KEY_CTRL('\\'):
|
case KEY_CTRL('\\'):
|
||||||
key = KEY_ESC;
|
key = KEY_CANCEL;
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -180,7 +180,7 @@ void init_game (void)
|
|||||||
|
|
||||||
curs_set(CURS_OFF);
|
curs_set(CURS_OFF);
|
||||||
|
|
||||||
if (key != KEY_ESC) {
|
if (key != KEY_CANCEL) {
|
||||||
game_num = key - '0';
|
game_num = key - '0';
|
||||||
|
|
||||||
wechochar(curwin, key | A_BOLD);
|
wechochar(curwin, key | A_BOLD);
|
||||||
|
@ -131,10 +131,10 @@ const char *help_text[] = {
|
|||||||
"you own a larger proportion of the company.\n"
|
"you own a larger proportion of the company.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The game usually ends after ^B~t^N turns. However, you can end the game sooner\n"
|
"The game usually ends after ^B~t^N turns. However, you can end the game sooner\n"
|
||||||
"by pressing ^K<ESC>^N when asked to select a move. As well, individual players\n"
|
"by pressing ^K<CTRL><C>^N when asked to select a move. As well, individual\n"
|
||||||
"can declare themselves bankrupt at any time. If your debt is large enough,\n"
|
"players can declare themselves bankrupt at any time. If your debt is large\n"
|
||||||
"the Bank may do this for you! If you do not complete your game in the time\n"
|
"enough, the Bank may do this for you! If you do not complete your game in\n"
|
||||||
"you have available, you may save the game and continue it later.\n"
|
"the time you have available, you may save the game and continue it later.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"The ^Bwinner of the game^N is the person with the greatest net worth (total\n"
|
"The ^Bwinner of the game^N is the person with the greatest net worth (total\n"
|
||||||
|
22
src/move.c
22
src/move.c
@ -179,15 +179,15 @@ selection_t get_move (void)
|
|||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<2>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<2>");
|
||||||
waddstr(curwin, " Declare bankruptcy");
|
waddstr(curwin, " Declare bankruptcy");
|
||||||
|
|
||||||
wmove(curwin, 2, 41);
|
wmove(curwin, 2, 42);
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<3>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<3>");
|
||||||
waddstr(curwin, " Save and end the game");
|
waddstr(curwin, " Save and end the game");
|
||||||
|
|
||||||
wmove(curwin, 3, 40);
|
wmove(curwin, 3, 42);
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<ESC>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<CTRL><C>");
|
||||||
waddstr(curwin, " Quit the game");
|
waddstr(curwin, " Quit the game");
|
||||||
|
|
||||||
mvwaddstr(curwin, 1, 2, " Select move ");
|
mvwaddstr(curwin, 1, 8, " Select move ");
|
||||||
waddstr(curwin, "[");
|
waddstr(curwin, "[");
|
||||||
attrpr(curwin, ATTR_MAP_CHOICE, "%c", MOVE_TO_KEY(0));
|
attrpr(curwin, ATTR_MAP_CHOICE, "%c", MOVE_TO_KEY(0));
|
||||||
waddstr(curwin, "-");
|
waddstr(curwin, "-");
|
||||||
@ -197,7 +197,7 @@ selection_t get_move (void)
|
|||||||
waddstr(curwin, "-");
|
waddstr(curwin, "-");
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "3");
|
attrpr(curwin, ATTR_KEYCODE_STR, "3");
|
||||||
waddstr(curwin, "/");
|
waddstr(curwin, "/");
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<ESC>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<CTRL><C>");
|
||||||
waddstr(curwin, "]: ");
|
waddstr(curwin, "]: ");
|
||||||
|
|
||||||
curs_set(CURS_ON);
|
curs_set(CURS_ON);
|
||||||
@ -251,7 +251,7 @@ selection_t get_move (void)
|
|||||||
|
|
||||||
curs_set(CURS_OFF);
|
curs_set(CURS_OFF);
|
||||||
wattron(curwin, A_BOLD);
|
wattron(curwin, A_BOLD);
|
||||||
waddstr(curwin, "<ESC>");
|
waddstr(curwin, "<CTRL><C>");
|
||||||
wattroff(curwin, A_BOLD);
|
wattroff(curwin, A_BOLD);
|
||||||
waddstr(curwin, " (Quit the game)");
|
waddstr(curwin, " (Quit the game)");
|
||||||
break;
|
break;
|
||||||
@ -274,7 +274,7 @@ selection_t get_move (void)
|
|||||||
wrefresh(curwin);
|
wrefresh(curwin);
|
||||||
|
|
||||||
// Ask the player to confirm their choice
|
// Ask the player to confirm their choice
|
||||||
mvwaddstr(curwin, 2, 2, " Are you sure? ");
|
mvwaddstr(curwin, 2, 22, "Are you sure? ");
|
||||||
waddstr(curwin, "[");
|
waddstr(curwin, "[");
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "Y");
|
attrpr(curwin, ATTR_KEYCODE_STR, "Y");
|
||||||
waddstr(curwin, "/");
|
waddstr(curwin, "/");
|
||||||
@ -309,7 +309,7 @@ selection_t get_move (void)
|
|||||||
bool done;
|
bool done;
|
||||||
|
|
||||||
// Ask which game to save
|
// Ask which game to save
|
||||||
newtxwin(6, 50, LINE_OFFSET + 8, COL_CENTER(50));
|
newtxwin(6, 54, LINE_OFFSET + 8, COL_CENTER(54));
|
||||||
wbkgd(curwin, ATTR_NORMAL_WINDOW);
|
wbkgd(curwin, ATTR_NORMAL_WINDOW);
|
||||||
box(curwin, 0, 0);
|
box(curwin, 0, 0);
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ selection_t get_move (void)
|
|||||||
attrpr(curwin, ATTR_KEYCODE_STR, "9");
|
attrpr(curwin, ATTR_KEYCODE_STR, "9");
|
||||||
waddstr(curwin, "]");
|
waddstr(curwin, "]");
|
||||||
waddstr(curwin, " or ");
|
waddstr(curwin, " or ");
|
||||||
attrpr(curwin, ATTR_KEYCODE_STR, "<ESC>");
|
attrpr(curwin, ATTR_KEYCODE_STR, "<CTRL><C>");
|
||||||
waddstr(curwin, " to cancel: ");
|
waddstr(curwin, " to cancel: ");
|
||||||
|
|
||||||
curs_set(CURS_ON);
|
curs_set(CURS_ON);
|
||||||
@ -338,7 +338,7 @@ selection_t get_move (void)
|
|||||||
case KEY_CTRL('C'):
|
case KEY_CTRL('C'):
|
||||||
case KEY_CTRL('G'):
|
case KEY_CTRL('G'):
|
||||||
case KEY_CTRL('\\'):
|
case KEY_CTRL('\\'):
|
||||||
key = KEY_ESC;
|
key = KEY_CANCEL;
|
||||||
done = true;
|
done = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -354,7 +354,7 @@ selection_t get_move (void)
|
|||||||
|
|
||||||
curs_set(CURS_OFF);
|
curs_set(CURS_OFF);
|
||||||
|
|
||||||
if (key != KEY_ESC) {
|
if (key != KEY_CANCEL) {
|
||||||
game_num = key - '0';
|
game_num = key - '0';
|
||||||
|
|
||||||
wechochar(curwin, key | A_BOLD);
|
wechochar(curwin, key | A_BOLD);
|
||||||
|
Loading…
Reference in New Issue
Block a user