diff options
Diffstat (limited to 'midend.c')
| -rw-r--r-- | midend.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1220,6 +1220,15 @@ key_label *midend_request_keys(midend *me, int *n) return keys; } +/* Return a good label to show next to a key right now. */ +const char *midend_current_key_label(midend *me, int button) +{ + assert(IS_CURSOR_SELECT(button)); + if (!me->ourgame->current_key_label) return ""; + return me->ourgame->current_key_label( + me->ui, me->states[me->statepos-1].state, button); +} + void midend_redraw(midend *me) { assert(me->drawing); |