home · contact · privacy
Client: Add auto-center of map on player each new turn (can be toggled).
[plomrogue] / src / client / control.c
index d5d8d9e7935441848a57ccb9011a97509dee6854..43041eaef820b02ad60f938211cb45ffd2d9f853 100644 (file)
@@ -10,7 +10,7 @@
 #include "keybindings.h" /* get_command_to_keycode(), get_keycode_to_command(),
                           * mod_selected_keyb(), move_keyb_selection()
                           */
-#include "map.h" /* for map_scroll(), map_center() */
+#include "map.h" /* for map_scroll(), map_center(), toggle_autofocus() */
 #include "wincontrol.h" /* shift_active_win(), resize_active_win(),
                          * toggle_win_size_type(), toggle_window(),
                          * cycle_active_win(), scroll_v_screen(),
@@ -107,6 +107,7 @@ static uint8_t try_2args(struct Command * command, char * match,
 static uint8_t try_client_commands(struct Command * command)
 {
     return (   try_0args(command, "map_c", map_center)
+            || try_0args(command, "to_autofocus", toggle_autofocus)
             || try_1args(command, "map_u", map_scroll, '8')
             || try_1args(command, "map_d", map_scroll, '2')
             || try_1args(command, "map_r", map_scroll, '6')