Feature: Add/extend console commands to enable screenshot automation (#9771)
commit25ae42ae8aeec9ddad6b9c9ee43e067a1d74193f
authorDave Shifflett <dave@corpulent.coffee>
Wed, 2 Feb 2022 21:24:29 +0000 (2 15:24 -0600)
committerGitHub <noreply@github.com>
Wed, 2 Feb 2022 21:24:29 +0000 (2 21:24 +0000)
treef49360f6c8c045a7c3e61d61d938327a8adda17d
parentb6c5f4937932029d8ebfd1654ed8d264e0e66de0
Feature: Add/extend console commands to enable screenshot automation (#9771)

* Add: `zoomto` console command for main viewport

Similar in spirit to `scrollto`, `zoomto` takes an absolute zoom level
from the user and sets the main viewport to that level while respecting
both the absolute minimum and maximum zoom levels supported by the game
and any limitations imposed by the local client settings.

* Add: optional `instant` flag for `scrollto` command

Using this flag has two effects:

- if the user has smooth scrolling enabled, the scroll action will take
  place as if it were not enabled
- the viewport is redrawn immediately, so any successive `screenshot`
  command will actually work correctly

The original positional arguments are processed like same before.
src/console_cmds.cpp