update docs for follow

develop
myk002 2022-07-25 10:55:31 -07:00
parent e13aae2ce1
commit 20ccd3a99c
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 14 additions and 8 deletions

@ -1,5 +1,12 @@
follow follow
====== ======
Makes the game view follow the currently highlighted unit after you exit from the Tags:
current menu or cursor mode. Handy for watching dwarves running around. Deactivated :dfhack-keybind:`follow`
by moving the view manually.
Make the screen follow the selected unit. Once you exit from the current menu or
cursor mode, the screen will stay centered on the unit. Handy for watching
dwarves running around. Deactivated by moving the cursor manually.
Usage::
follow

@ -31,11 +31,10 @@ uint8_t prevMenuWidth;
DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands) DFhackCExport command_result plugin_init ( color_ostream &out, std::vector <PluginCommand> &commands)
{ {
commands.push_back(PluginCommand( commands.push_back(PluginCommand(
"follow", "Make the screen follow the selected unit", "follow",
follow, Gui::view_unit_hotkey, "Make the screen follow the selected unit.",
" Select a unit and run this plugin to make the camera follow it.\n" follow,
" Moving the camera yourself deactivates the plugin.\n" Gui::view_unit_hotkey));
));
followedUnit = 0; followedUnit = 0;
prevX=prevY=prevZ = -1; prevX=prevY=prevZ = -1;
prevMenuWidth = 0; prevMenuWidth = 0;