From 039be8e31fad7a7b5c66e77f2fb04c2fc7c193a4 Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sat, 6 May 2006 18:49:12 -0400 Subject: [PATCH] Pressing enter on a selected move in the history menu will view the moves annotation. --- src/cboard.c | 9 +++++++++ src/cboard.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/cboard.c b/src/cboard.c index e513647..37ba3e9 100644 --- a/src/cboard.c +++ b/src/cboard.c @@ -2465,6 +2465,14 @@ void do_annotate_move(HISTORY *hp) NAG_PROMPT, edit_nag, NULL, CTRL('T'), in, -1); } +void history_menu_view_annotation(struct menu_input_s *m) +{ + GAME *g = m->data; + + // FIXME RAV + view_annotation(g->history[m->selected]); +} + void history_menu_annotate(struct menu_input_s *m) { GAME *g = m->data; @@ -2482,6 +2490,7 @@ void history_menu(GAME *g) add_menu_key(&keys, KEY_DOWN, history_menu_next); add_menu_key(&keys, KEY_F(1), history_menu_help); add_menu_key(&keys, 'a', history_menu_annotate); + add_menu_key(&keys, '\n', history_menu_view_annotation); construct_menu(LINES, TAG_WIDTH, 0, 0, "Move History Tree", 1, get_history_items, keys, g, history_menu_exit); } diff --git a/src/cboard.h b/src/cboard.h index 1e1b00a..99c164d 100644 --- a/src/cboard.h +++ b/src/cboard.h @@ -98,6 +98,7 @@ const char *history_menu_help_str = { " PGDN/PGUP - next/previous page\n" \ " a-zA-Z0-9 - jump to item\n" \ " a - annotate the selected move\n" \ + " ENTER - view annotation\n" \ " ESCAPE - quit" }; -- 2.11.4.GIT