aboutsummaryrefslogtreecommitdiff
path: root/midend.c
diff options
context:
space:
mode:
Diffstat (limited to 'midend.c')
-rw-r--r--midend.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/midend.c b/midend.c
index a6f5e6b..1e03693 100644
--- a/midend.c
+++ b/midend.c
@@ -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);